Tizen Native API
5.5
|
Templated intrusive pointer class. More...
Public Types | |
typedef void(IntrusivePtr::* | BooleanType )() const |
Pointer-to-member type. | |
Public Member Functions | |
IntrusivePtr () | |
Standard constructor to unassigned object. | |
IntrusivePtr (T *p) | |
Constructor to attach existing object. | |
template<typename U > | |
IntrusivePtr (IntrusivePtr< U > const &rhs) | |
Copy constructor. | |
IntrusivePtr (IntrusivePtr const &rhs) | |
Copy constructor. | |
~IntrusivePtr () | |
Destructor. | |
T * | Get () const |
Gets pointer to reference counted object. | |
T * | operator-> () const |
Pointer operator override. | |
T & | operator* () const |
Dereference operator override. | |
IntrusivePtr & | operator= (IntrusivePtr const &rhs) |
Assignment operator. | |
IntrusivePtr & | operator= (T *rhs) |
Assignment operator. | |
void | Reset () |
Reset intrusive pointer. | |
void | Reset (T *rhs) |
Reset intrusive pointer with reference counted object. | |
operator BooleanType () const | |
Converts an object handle to a BooleanType. | |
T * | Detach () |
Detaches pointer from intrusive ptr counting. |
Templated intrusive pointer class.
Uses the Dali:RefObject type with actual reference counting. The object is responsible for destroying itself.
typedef void(IntrusivePtr::* Dali::IntrusivePtr< T >::BooleanType)() const |
Pointer-to-member type.
Objects can be implicitly converted to this for validity checks.
Dali::IntrusivePtr< T >::IntrusivePtr | ( | ) |
Standard constructor to unassigned object.
Dali::IntrusivePtr< T >::IntrusivePtr | ( | T * | p | ) |
Constructor to attach existing object.
[in] | p | Pointer to object |
Dali::IntrusivePtr< T >::IntrusivePtr | ( | IntrusivePtr< U > const & | rhs | ) |
Copy constructor.
[in] | rhs | Const reference to an IntrusivePtr |
U | Reference counter object type |
Dali::IntrusivePtr< T >::IntrusivePtr | ( | IntrusivePtr< T > const & | rhs | ) |
Copy constructor.
[in] | rhs | Const reference to an IntrusivePtr |
Dali::IntrusivePtr< T >::~IntrusivePtr | ( | ) |
Destructor.
Object will self-destruct if reference count is zero.
T* Dali::IntrusivePtr< T >::Detach | ( | ) |
Detaches pointer from intrusive ptr counting.
Use with care.
T* Dali::IntrusivePtr< T >::Get | ( | ) | const |
Gets pointer to reference counted object.
Dali::IntrusivePtr< T >::operator BooleanType | ( | ) | const |
Converts an object handle to a BooleanType.
This is useful for checking whether the handle is NULL.
T& Dali::IntrusivePtr< T >::operator* | ( | ) | const |
Dereference operator override.
T* Dali::IntrusivePtr< T >::operator-> | ( | ) | const |
Pointer operator override.
IntrusivePtr& Dali::IntrusivePtr< T >::operator= | ( | IntrusivePtr< T > const & | rhs | ) |
Assignment operator.
rhs | Const reference to intrusive pointer |
IntrusivePtr& Dali::IntrusivePtr< T >::operator= | ( | T * | rhs | ) |
Assignment operator.
rhs | Pointer to object to wrap |
void Dali::IntrusivePtr< T >::Reset | ( | ) |
Reset intrusive pointer.
void Dali::IntrusivePtr< T >::Reset | ( | T * | rhs | ) |
Reset intrusive pointer with reference counted object.
[in] | rhs | Pointer to object |