Tizen Native API  5.0
Dali::ObjectRegistry Class Reference

The ObjectRegistry notifies it's observers when an object is created. More...

Inheritance diagram for Dali::ObjectRegistry:
Dali::BaseHandle

Public Types

typedef Signal< void(BaseHandle) > ObjectCreatedSignalType
 Object created signal.
typedef Signal< void(const
Dali::RefObject *) 
ObjectDestroyedSignalType )
 Object destroyed signal.

Public Member Functions

 ObjectRegistry ()
 Allows the creation of an empty objectRegistry handle.
 ~ObjectRegistry ()
 Destructor.
 ObjectRegistry (const ObjectRegistry &handle)
 This copy constructor is required for (smart) pointer semantics.
ObjectRegistryoperator= (const ObjectRegistry &rhs)
 This assignment operator is required for (smart) pointer semantics.
ObjectCreatedSignalTypeObjectCreatedSignal ()
 This signal is emitted when an object is created.
ObjectDestroyedSignalTypeObjectDestroyedSignal ()
 This signal is emitted when an object is destroyed.

Detailed Description

The ObjectRegistry notifies it's observers when an object is created.

Handle to the created Object is passed in the call back function. The Handle is passed as Dali::Object handle, which can be DownCast to the appropriate type.

Care should be taken to not store the handle in the Observer, as this will have adverse effect on the life time of the Internal Object. The Handle should only be used to connect to signals.

Usage: ObjectRegistry registry = Stage::GetObjectRegistry(); registry.ObjectCreatedSignal().Connect( ObjectCreatedCallbackFunc );

Signals | Signal Name | Method | |------------------|------------------------------| | objectCreated | ObjectCreatedSignal() | | objectDestroyed | ObjectDestroyedSignal() |

Since:
3.0, DALi version 1.0.0

Member Typedef Documentation

Object created signal.

Since:
3.0, DALi version 1.0.0

Object destroyed signal.

Since:
3.0, DALi version 1.0.0

Constructor & Destructor Documentation

Allows the creation of an empty objectRegistry handle.

To retrieve the current objectRegistry, this handle can be set using Stage::GetCurrent().GetObjectRegistry().

Since:
3.0, DALi version 1.0.0

Destructor.

This is non-virtual since derived Handle types must not contain data or virtual methods.

Since:
3.0, DALi version 1.0.0

This copy constructor is required for (smart) pointer semantics.

Since:
3.0, DALi version 1.0.0
Parameters:
[in]handleA reference to the copied handle

Member Function Documentation

This signal is emitted when an object is created.

A callback of the following type may be connected:

   void YourCallbackName(BaseHandle object);
Since:
3.0, DALi version 1.0.0
Returns:
The signal to connect to
Precondition:
The Object has been initialized.

This signal is emitted when an object is destroyed.

WARNING: Since this signal is emitted when the object is in the process of being destroyed, the RefObject pointer passed in the signal should not be modified in anyways. And should NOT be used to create an handle. which will affect the life time of this destroyed object and leads to undefined behaviour.

The only intended use is for Toolkit controls which want to keep track of objects being created and destroyed for internal bookkeeping.

A callback of the following type may be connected:

   void YourCallbackName(const Dali::RefObject* objectPointer);
Since:
3.0, DALi version 1.0.0
Returns:
The signal to connect to
Precondition:
The Object has been initialized.
ObjectRegistry& Dali::ObjectRegistry::operator= ( const ObjectRegistry rhs)

This assignment operator is required for (smart) pointer semantics.

Since:
3.0, DALi version 1.0.0
Parameters:
[in]rhsA reference to the copied handle
Returns:
A reference to this