23 Q_ASSERT(ptr !=
nullptr);
41 Q_ASSERT(ptr !=
nullptr);
86 template <
class CastedType>
89 return dynamic_cast<CastedType
>(
get());
106 operator bool()
const
108 return (
m_ptr !=
nullptr);
145 return (m_ptr !=
nullptr);
152 Q_ASSERT(m_ptr !=
nullptr);
168 return (m_ptr == ptr.
m_ptr);
175 return (m_ptr != ptr.
m_ptr);
182 return m_ptr < ptr.
m_ptr;
189 return m_ptr > ptr.
m_ptr;
196 return m_ptr <= ptr.
m_ptr;
203 return m_ptr >= ptr.
m_ptr;
210 return (m_ptr == ptr);
217 return (m_ptr != ptr);
224 return (m_ptr < ptr);
231 return (m_ptr > ptr);
238 return (m_ptr <= ptr);
245 return (m_ptr >= ptr);
284 std::swap(m_ptr, ptr.
m_ptr);
static void Delete(Type *ptr)
static void Delete(Type *ptr)
Implementation of pointer wrapper.
bool operator==(const Type *ptr) const
bool operator>(const Type *ptr) const
TPointerBase< Type > & operator=(const TPointerBase< Type > ptr)
bool operator>=(const Type *ptr) const
Type & operator*() const
Get an access to object pointed at.
bool operator>=(const TPointerBase< Type > &ptr) const
void Swap(TPointerBase &ptr)
Swap two pointers.
TPointerBase(Type *ptr=nullptr)
Construct and assign internal pointer.
bool IsValid() const
Check if internal pointer not nullptr.
Type * operator->() const
void SetPtr(Type *ptr)
Set value of internal stored pointer.
void Reset()
Set internal pointer value to nullptr.
Type * get() const
Return access to internal stored pointer.
bool operator<(const TPointerBase< Type > &ptr) const
bool operator>(const TPointerBase< Type > &ptr) const
bool operator<=(const TPointerBase< Type > &ptr) const
bool operator!=(const Type *ptr) const
bool operator!=(const TPointerBase< Type > &ptr) const
bool operator<(const Type *ptr) const
bool operator<=(const Type *ptr) const
bool operator==(const TPointerBase< Type > &ptr) const