Dali 3D User Interface Engine
Dali::Signal< _Signature > Class Template Reference

Base Template class to provide signals. More...

#include <dali-signal.h>

Inheritance diagram for Dali::Signal< _Signature >:
Inheritance graph
[legend]

Detailed Description

template<typename _Signature>
class Dali::Signal< _Signature >

Base Template class to provide signals.

To create a signal for this class, you first have to define a typedef within your handle's scope:

class MyHandle : public Handle
{
public:
// Typedefs
typedef Signal< void ()> VoidSignalType;
typedef Signal< bool ()> BoolSignalType;
typedef Signal< void ( float )> ParamSignalType;
...
public:
// Signals
VoidSignalType& VoidSignal();
BoolSignalType& BoolSignal();
ParamSignalType& ParamSignal();
...
};

The methods are required in the handle class so that the application writer can retrieve the Signal in order to connect/disconnect.

In the implementation class, the members should be defined and the methods should be provided to retrieve the signal itself. These will be called by the equivalent methods in the MyHandle class.

class MyObject : public Object
{
...
public:
MyHandle::VoidSignalType& VoidSignal()
{
return mVoidSignal;
}
MyHandle::BoolSignalType& BoolSignal()
{
return mBoolSignal;
}
MyHandle::ParamSignalType& ParamSignal()
{
return mParamSignal;
}
private:
// Signals
MyHandle::VoidSignalType mVoidSignal;
MyHandle::BoolSignalType mBoolSignal;
MyHandle::ParamSignalType mParamSignal;
...
};

.0

Definition at line 135 of file dali-signal.h.


The documentation for this class was generated from the following file:
Dali Docs Home
Read more about Dali