Tizen Native API
6.0
|
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. |
Detailed Description
template<typename T>
class Dali::IntrusivePtr< T >
Templated intrusive pointer class.
Uses the Dali:RefObject type with actual reference counting. The object is responsible for destroying itself.
- Since:
- 2.4, DALi version 1.0.0
Member Typedef Documentation
typedef void(IntrusivePtr::* Dali::IntrusivePtr< T >::BooleanType)() const |
Pointer-to-member type.
Objects can be implicitly converted to this for validity checks.
Constructor & Destructor Documentation
Dali::IntrusivePtr< T >::IntrusivePtr | ( | ) |
Standard constructor to unassigned object.
- Since:
- 2.4, DALi version 1.0.0
Dali::IntrusivePtr< T >::IntrusivePtr | ( | T * | p | ) |
Constructor to attach existing object.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] p Pointer to object
Dali::IntrusivePtr< T >::IntrusivePtr | ( | IntrusivePtr< U > const & | rhs | ) |
Copy constructor.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] rhs Const reference to an IntrusivePtr
- Template Parameters:
-
U Reference counter object type
Dali::IntrusivePtr< T >::IntrusivePtr | ( | IntrusivePtr< T > const & | rhs | ) |
Copy constructor.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] rhs Const reference to an IntrusivePtr
Dali::IntrusivePtr< T >::~IntrusivePtr | ( | ) |
Destructor.
Object will self-destruct if reference count is zero.
- Since:
- 2.4, DALi version 1.0.0
Member Function Documentation
T* Dali::IntrusivePtr< T >::Detach | ( | ) |
Detaches pointer from intrusive ptr counting.
Use with care.
- Since:
- 2.4, DALi version 1.0.0
- Returns:
- Pointer to reference counted object
T* Dali::IntrusivePtr< T >::Get | ( | ) | const |
Gets pointer to reference counted object.
- Since:
- 2.4, DALi version 1.0.0
- Returns:
- 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.
- Since:
- 2.4, DALi version 1.0.0
T& Dali::IntrusivePtr< T >::operator* | ( | ) | const |
Dereference operator override.
- Since:
- 2.4, DALi version 1.0.0
- Returns:
- Reference to reference counted object
T* Dali::IntrusivePtr< T >::operator-> | ( | ) | const |
Pointer operator override.
- Since:
- 2.4, DALi version 1.0.0
- Returns:
- Pointer to reference counted object
IntrusivePtr& Dali::IntrusivePtr< T >::operator= | ( | IntrusivePtr< T > const & | rhs | ) |
Assignment operator.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
rhs Const reference to intrusive pointer
- Returns:
- Reference to reference counted object
IntrusivePtr& Dali::IntrusivePtr< T >::operator= | ( | T * | rhs | ) |
Assignment operator.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
rhs Pointer to object to wrap
- Returns:
- A Reference to this object
void Dali::IntrusivePtr< T >::Reset | ( | ) |
Reset intrusive pointer.
- Since:
- 2.4, DALi version 1.0.0
void Dali::IntrusivePtr< T >::Reset | ( | T * | rhs | ) |
Reset intrusive pointer with reference counted object.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] rhs Pointer to object