Tizen Native API
6.0
|
The ObjectRegistry notifies it's observers when an object is created. More...
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. | |
ObjectRegistry & | operator= (const ObjectRegistry &rhs) |
This assignment operator is required for (smart) pointer semantics. | |
ObjectCreatedSignalType & | ObjectCreatedSignal () |
This signal is emitted when an object is created. | |
ObjectDestroyedSignalType & | ObjectDestroyedSignal () |
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
typedef Signal< void ( BaseHandle ) > Dali::ObjectRegistry::ObjectCreatedSignalType |
Object created signal.
- Since:
- 3.0, DALi version 1.0.0
typedef Signal< void ( const Dali::RefObject* ) Dali::ObjectRegistry::ObjectDestroyedSignalType) |
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
Dali::ObjectRegistry::ObjectRegistry | ( | const ObjectRegistry & | handle | ) |
This copy constructor is required for (smart) pointer semantics.
- Since:
- 3.0, DALi version 1.0.0
- Parameters:
-
[in] handle A 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] rhs A reference to the copied handle
- Returns:
- A reference to this