Tizen Native API  3.0
Dali::Signal< Ret() > Class Template Reference

A template for Signals with no parameters and a return value. More...

Public Member Functions

 Signal ()
 Default constructor.
 ~Signal ()
 Non-virtual destructor.
bool Empty () const
 Queries whether there are any connected slots.
std::size_t GetConnectionCount () const
 Queries the number of slots.
void Connect (Ret(*func)())
 Connects a function.
void Disconnect (Ret(*func)())
 Disconnects a function.
template<class X >
void Connect (X *obj, Ret(X::*func)())
 Connects a member function.
template<class X >
void Disconnect (X *obj, Ret(X::*func)())
 Disconnects a member function.
template<class X >
void Connect (SlotDelegate< X > &delegate, Ret(X::*func)())
 Connects a member function.
template<class X >
void Disconnect (SlotDelegate< X > &delegate, Ret(X::*func)())
 Disconnects a member function.
template<class X >
void Connect (ConnectionTrackerInterface *connectionTracker, const X &func)
 Connects a function object.
void Connect (ConnectionTrackerInterface *connectionTracker, FunctorDelegate *delegate)
 Connects a function object using FunctorDelegate.
Ret Emit ()
 Emits the signal.

Detailed Description

template<typename Ret>
class Dali::Signal< Ret() >

A template for Signals with no parameters and a return value.

Since:
2.4, DALi version 1.0.0

Constructor & Destructor Documentation

template<typename Ret >
Dali::Signal< Ret() >::Signal ( )

Default constructor.

Since:
2.4, DALi version 1.0.0
template<typename Ret >
Dali::Signal< Ret() >::~Signal ( )

Non-virtual destructor.

Since:
2.4, DALi version 1.0.0

Member Function Documentation

template<typename Ret >
void Dali::Signal< Ret() >::Connect ( Ret(*)()  func)

Connects a function.

Since:
2.4, DALi version 1.0.0
Parameters:
[in]funcThe function to connect
template<typename Ret >
template<class X >
void Dali::Signal< Ret() >::Connect ( X *  obj,
Ret(X::*)()  func 
)

Connects a member function.

Since:
2.4, DALi version 1.0.0
Parameters:
[in]objAn object which must implement the ConnectionTrackerInterface
[in]funcThe member function to connect
template<typename Ret >
template<class X >
void Dali::Signal< Ret() >::Connect ( SlotDelegate< X > &  delegate,
Ret(X::*)()  func 
)

Connects a member function.

Since:
2.4, DALi version 1.0.0
Parameters:
[in]delegateA slot delegate
[in]funcThe member function to connect
template<typename Ret >
template<class X >
void Dali::Signal< Ret() >::Connect ( ConnectionTrackerInterface connectionTracker,
const X &  func 
)

Connects a function object.

Since:
2.4, DALi version 1.0.0
Parameters:
[in]connectionTrackerA connection tracker which can be used to disconnect
[in]funcThe function object to copy
template<typename Ret >
void Dali::Signal< Ret() >::Connect ( ConnectionTrackerInterface connectionTracker,
FunctorDelegate delegate 
)

Connects a function object using FunctorDelegate.

Since:
2.4, DALi version 1.0.0
Parameters:
[in]connectionTrackerA connection tracker which can be used to disconnect
[in]delegateA newly allocated FunctorDelegate (ownership is taken)
template<typename Ret >
void Dali::Signal< Ret() >::Disconnect ( Ret(*)()  func)

Disconnects a function.

Since:
2.4, DALi version 1.0.0
Parameters:
[in]funcThe function to disconnect
template<typename Ret >
template<class X >
void Dali::Signal< Ret() >::Disconnect ( X *  obj,
Ret(X::*)()  func 
)

Disconnects a member function.

Since:
2.4, DALi version 1.0.0
Parameters:
[in]objAn object which must implement the ConnectionTrackerInterface
[in]funcThe member function to disconnect
template<typename Ret >
template<class X >
void Dali::Signal< Ret() >::Disconnect ( SlotDelegate< X > &  delegate,
Ret(X::*)()  func 
)

Disconnects a member function.

Since:
2.4, DALi version 1.0.0
Parameters:
[in]delegateA slot delegate
[in]funcThe member function to disconnect
template<typename Ret >
Ret Dali::Signal< Ret() >::Emit ( )

Emits the signal.

Since:
2.4, DALi version 1.0.0
Returns:
The value returned by the last callback, or a default constructed value if no callbacks are connected
template<typename Ret >
bool Dali::Signal< Ret() >::Empty ( ) const

Queries whether there are any connected slots.

Since:
2.4, DALi version 1.0.0
Returns:
True if there are any slots connected to the signal
template<typename Ret >
std::size_t Dali::Signal< Ret() >::GetConnectionCount ( ) const

Queries the number of slots.

Since:
2.4, DALi version 1.0.0
Returns:
The number of slots connected to this signal