Tizen Native API  3.0
Dali::RefObject Class Reference

Base class for reference counted objects. More...

Inheritance diagram for Dali::RefObject:
Dali::BaseObject Dali::CustomActorImpl Dali::NativeImageInterface Dali::Toolkit::ItemLayout Dali::Toolkit::Ruler Dali::Toolkit::Internal::Control Dali::NativeImageSource Dali::Toolkit::DefaultRuler Dali::Toolkit::FixedRuler

Public Member Functions

void Reference ()
 Increments the object's reference count.
void Unreference ()
 Decrements the object's reference count.
int ReferenceCount ()
 Retrieves the object's reference count.

Protected Member Functions

 RefObject ()
 Default constructor.
virtual ~RefObject ()
 RefObject is intended as a base class.
 RefObject (const RefObject &rhs)
 Copy constructor.
RefObjectoperator= (const RefObject &rhs)
 Assignment operator.

Detailed Description

Base class for reference counted objects.

Typically this should be used with an instrusive pointer, instead of calling Reference() and Unreference() methods directly.

Since:
3.0, DALi version 1.0.0

Constructor & Destructor Documentation

Dali::RefObject::RefObject ( ) [protected]

Default constructor.

Since:
3.0, DALi version 1.0.0
virtual Dali::RefObject::~RefObject ( ) [protected, virtual]

RefObject is intended as a base class.

A RefObject may only be deleted when its reference count is zero.

Since:
3.0, DALi version 1.0.0
Dali::RefObject::RefObject ( const RefObject rhs) [protected]

Copy constructor.

The newly copied object will have a reference count of zero.

Since:
3.0, DALi version 1.0.0
Parameters:
[in]rhsThe object to copy

Member Function Documentation

RefObject& Dali::RefObject::operator= ( const RefObject rhs) [protected]

Assignment operator.

The newly copied object will have a reference count of zero.

Since:
3.0, DALi version 1.0.0
Parameters:
[in]rhsThe object to copy
Returns:
A reference to this

Increments the object's reference count.

Since:
3.0, DALi version 1.0.0

Retrieves the object's reference count.

Since:
3.0, DALi version 1.0.0
Returns:
The reference count

Decrements the object's reference count.

When the reference count drops to zero, the object will self-destruct.

Since:
3.0, DALi version 1.0.0