Tizen Native API
6.0
|
A template for Signals with 2 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)(Arg0 arg0, Arg1 arg1)) |
Connects a function. | |
void | Disconnect (Ret(*func)(Arg0 arg0, Arg1 arg1)) |
Disconnects a function. | |
template<class X > | |
void | Connect (X *obj, Ret(X::*func)(Arg0 arg0, Arg1 arg1)) |
Connects a member function. | |
template<class X > | |
void | Disconnect (X *obj, Ret(X::*func)(Arg0 arg0, Arg1 arg1)) |
Disconnects a member function. | |
template<class X > | |
void | Connect (SlotDelegate< X > &delegate, Ret(X::*func)(Arg0 arg0, Arg1 arg1)) |
Connects a member function. | |
template<class X > | |
void | Disconnect (SlotDelegate< X > &delegate, Ret(X::*func)(Arg0 arg0, Arg1 arg1)) |
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 (Arg0 arg0, Arg1 arg1) |
Emits the signal. |
Detailed Description
template<typename Ret, typename Arg0, typename Arg1>
class Dali::Signal< Ret(Arg0, Arg1) >
A template for Signals with 2 parameters and a return value.
- Since:
- 2.4, DALi version 1.0.0
Constructor & Destructor Documentation
template<typename Ret , typename Arg0 , typename Arg1 >
Dali::Signal< Ret(Arg0, Arg1) >::Signal | ( | ) |
Default constructor.
- Since:
- 2.4, DALi version 1.0.0
template<typename Ret , typename Arg0 , typename Arg1 >
Dali::Signal< Ret(Arg0, Arg1) >::~Signal | ( | ) |
Non-virtual destructor.
- Since:
- 2.4, DALi version 1.0.0
Member Function Documentation
template<typename Ret , typename Arg0 , typename Arg1 >
void Dali::Signal< Ret(Arg0, Arg1) >::Connect | ( | Ret(*)(Arg0 arg0, Arg1 arg1) | func | ) |
Connects a function.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] func The function to connect
template<typename Ret , typename Arg0 , typename Arg1 >
template<class X >
void Dali::Signal< Ret(Arg0, Arg1) >::Connect | ( | X * | obj, |
Ret(X::*)(Arg0 arg0, Arg1 arg1) | func | ||
) |
Connects a member function.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] obj An object which must implement the ConnectionTrackerInterface [in] func The member function to connect
template<typename Ret , typename Arg0 , typename Arg1 >
template<class X >
void Dali::Signal< Ret(Arg0, Arg1) >::Connect | ( | SlotDelegate< X > & | delegate, |
Ret(X::*)(Arg0 arg0, Arg1 arg1) | func | ||
) |
Connects a member function.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] delegate A slot delegate [in] func The member function to connect
template<typename Ret , typename Arg0 , typename Arg1 >
template<class X >
void Dali::Signal< Ret(Arg0, Arg1) >::Connect | ( | ConnectionTrackerInterface * | connectionTracker, |
const X & | func | ||
) |
Connects a function object.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] connectionTracker A connection tracker which can be used to disconnect [in] func The function object to copy
template<typename Ret , typename Arg0 , typename Arg1 >
void Dali::Signal< Ret(Arg0, Arg1) >::Connect | ( | ConnectionTrackerInterface * | connectionTracker, |
FunctorDelegate * | delegate | ||
) |
Connects a function object using FunctorDelegate.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] connectionTracker A connection tracker which can be used to disconnect [in] delegate A newly allocated FunctorDelegate (ownership is taken)
template<typename Ret , typename Arg0 , typename Arg1 >
void Dali::Signal< Ret(Arg0, Arg1) >::Disconnect | ( | Ret(*)(Arg0 arg0, Arg1 arg1) | func | ) |
Disconnects a function.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] func The function to disconnect
template<typename Ret , typename Arg0 , typename Arg1 >
template<class X >
void Dali::Signal< Ret(Arg0, Arg1) >::Disconnect | ( | X * | obj, |
Ret(X::*)(Arg0 arg0, Arg1 arg1) | func | ||
) |
Disconnects a member function.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] obj An object which must implement the ConnectionTrackerInterface [in] func The member function to disconnect
template<typename Ret , typename Arg0 , typename Arg1 >
template<class X >
void Dali::Signal< Ret(Arg0, Arg1) >::Disconnect | ( | SlotDelegate< X > & | delegate, |
Ret(X::*)(Arg0 arg0, Arg1 arg1) | func | ||
) |
Disconnects a member function.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] delegate A slot delegate [in] func The member function to disconnect
template<typename Ret , typename Arg0 , typename Arg1 >
Ret Dali::Signal< Ret(Arg0, Arg1) >::Emit | ( | Arg0 | arg0, |
Arg1 | arg1 | ||
) |
Emits the signal.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] arg0 The first value to pass to callbacks [in] arg1 The second value to pass to callbacks
- Returns:
- The value returned by the last callback, or a default constructed value if no callbacks are connected
template<typename Ret , typename Arg0 , typename Arg1 >
bool Dali::Signal< Ret(Arg0, Arg1) >::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 , typename Arg0 , typename Arg1 >
std::size_t Dali::Signal< Ret(Arg0, Arg1) >::GetConnectionCount | ( | ) | const |
Queries the number of slots.
- Since:
- 2.4, DALi version 1.0.0
- Returns:
- The number of slots connected to this signal