Dali 3D User Interface Engine
List of all members | Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions
Dali::CallbackBase Class Reference

Callback base class to hold the data for callback function and member function calls. More...

#include <callback.h>

Inheritance diagram for Dali::CallbackBase:
Inheritance graph
[legend]
Collaboration diagram for Dali::CallbackBase:
Collaboration graph
[legend]

Classes

struct  Impl
 struct to hold the extra data needed for member functions. More...
 

Public Member Functions

 CallbackBase ()
 Default constructor .0. More...
 
 ~CallbackBase ()
 Destructor .0. More...
 
void Reset ()
 Resets the object pointer so that we know not to call methods of this object any more. More...
 

Static Public Member Functions

static void Execute (CallbackBase &callback)
 Function to call the function or member function dispatcher. More...
 
template<typename R >
static R ExecuteReturn (CallbackBase &callback)
 Function to call the function or member function dispatcher. More...
 
template<typename P1 >
static void Execute (CallbackBase &callback, P1 param1)
 Function to call the function or member function dispatcher. More...
 
template<typename R , typename P1 >
static R ExecuteReturn (CallbackBase &callback, P1 param1)
 Function to call the function or member function dispatcher. More...
 
template<typename P1 , typename P2 >
static void Execute (CallbackBase &callback, P1 param1, P2 param2)
 Function to call the function or member function dispatcher. More...
 
template<typename R , typename P1 , typename P2 >
static R ExecuteReturn (CallbackBase &callback, P1 param1, P2 param2)
 Function to call the function or member function dispatcher. More...
 
template<typename P1 , typename P2 , typename P3 >
static void Execute (CallbackBase &callback, P1 param1, P2 param2, P3 param3)
 Function to call the function or member function dispatcher. More...
 
template<typename R , typename P1 , typename P2 , typename P3 >
static R ExecuteReturn (CallbackBase &callback, P1 param1, P2 param2, P3 param3)
 Function to call the function or member function dispatcher. More...
 

Public Attributes

ImplmImpl
 Implementation pointer. More...
 
union {
   MemberFunction   mMemberFunction
 Pointer to member function. More...
 
   Function   mFunction
 Static function. More...
 
}; 
 

Protected Types

typedef void(* Function )(void)
 Function with static linkage .0. More...
 
typedef void(CallbackBase::* MemberFunction )(void)
 Member function .0. More...
 
typedef void(* Dispatcher )(CallbackBase &base)
 Used to call the correct member function .0. More...
 
typedef void(* Destructor )(void *object)
 Used to destroy mObjectPointer (NULL if not mObjectPointer is not owned) .0. More...
 

Protected Member Functions

 CallbackBase (const CallbackBase &rhs)
 Copy constructor operator not declared. More...
 
const CallbackBaseoperator= (const CallbackBase &rhs)
 assignment operator not declared. More...
 
 CallbackBase (Function function)
 Constructor for function with static linkage. More...
 
 CallbackBase (void *object, MemberFunction function, Dispatcher dispatcher)
 Constructor for member function. More...
 
 CallbackBase (void *object, MemberFunction function, Dispatcher dispatcher, Destructor destructor)
 Constructor for member function. More...
 

Detailed Description

Callback base class to hold the data for callback function and member function calls.

.0

Definition at line 41 of file callback.h.

Member Typedef Documentation

typedef void(* Dali::CallbackBase::Destructor)(void *object)
protected

Used to destroy mObjectPointer (NULL if not mObjectPointer is not owned) .0.

Definition at line 338 of file callback.h.

typedef void(* Dali::CallbackBase::Dispatcher)(CallbackBase &base)
protected

Used to call the correct member function .0.

Definition at line 332 of file callback.h.

typedef void(* Dali::CallbackBase::Function)(void)
protected

Function with static linkage .0.

Definition at line 320 of file callback.h.

typedef void(CallbackBase::* Dali::CallbackBase::MemberFunction)(void)
protected

Member function .0.

Definition at line 326 of file callback.h.

Constructor & Destructor Documentation

Dali::CallbackBase::CallbackBase ( )

Default constructor .0.

Definition at line 27 of file callback.cpp.

Dali::CallbackBase::~CallbackBase ( )

Destructor .0.

Definition at line 33 of file callback.cpp.

References Reset().

Here is the call graph for this function:

Dali::CallbackBase::CallbackBase ( const CallbackBase rhs)
protected

Copy constructor operator not declared.

.0

Dali::CallbackBase::CallbackBase ( Function  function)
protected

Constructor for function with static linkage.

.0

Parameters
[in]functionThe function to call.

Definition at line 38 of file callback.cpp.

Dali::CallbackBase::CallbackBase ( void *  object,
MemberFunction  function,
Dispatcher  dispatcher 
)
protected

Constructor for member function.

.0

Parameters
[in]objectThe object to call (not owned).
[in]functionThe member function of the object.
[in]dispatcherUsed to call the actual object.

Definition at line 44 of file callback.cpp.

References Dali::CallbackBase::Impl::mDestructorDispatcher, mImpl, Dali::CallbackBase::Impl::mMemberFunctionDispatcher, and Dali::CallbackBase::Impl::mObjectPointer.

Dali::CallbackBase::CallbackBase ( void *  object,
MemberFunction  function,
Dispatcher  dispatcher,
Destructor  destructor 
)
protected

Constructor for member function.

.0

Parameters
[in]objectThe object to call (owned).
[in]functionThe member function of the object.
dispatcherUsed to call the actual object.
destructorUsed to delete the owned object.

Definition at line 53 of file callback.cpp.

References Dali::CallbackBase::Impl::mDestructorDispatcher, mImpl, Dali::CallbackBase::Impl::mMemberFunctionDispatcher, and Dali::CallbackBase::Impl::mObjectPointer.

Member Function Documentation

static void Dali::CallbackBase::Execute ( CallbackBase callback)
inlinestatic
template<typename P1 >
static void Dali::CallbackBase::Execute ( CallbackBase callback,
P1  param1 
)
inlinestatic

Function to call the function or member function dispatcher.

This function template gets instantiated at the call site .0

Parameters
[in]callbackThe callback to call.
[in]param1The first parameter to pass into the function.

Definition at line 131 of file callback.h.

References TestChaining::Function1(), mFunction, mImpl, Dali::CallbackBase::Impl::mMemberFunctionDispatcher, and Dali::CallbackBase::Impl::mObjectPointer.

Here is the call graph for this function:

template<typename P1 , typename P2 >
static void Dali::CallbackBase::Execute ( CallbackBase callback,
P1  param1,
P2  param2 
)
inlinestatic

Function to call the function or member function dispatcher.

This function template gets instantiated at the call site. .0

Parameters
[in]callbackThe callback to call.
[in]param1The first parameter to pass into the function.
[in]param2The second parameter to pass into the function.

Definition at line 194 of file callback.h.

References TestChaining::Function2(), mFunction, mImpl, Dali::CallbackBase::Impl::mMemberFunctionDispatcher, and Dali::CallbackBase::Impl::mObjectPointer.

Here is the call graph for this function:

template<typename P1 , typename P2 , typename P3 >
static void Dali::CallbackBase::Execute ( CallbackBase callback,
P1  param1,
P2  param2,
P3  param3 
)
inlinestatic

Function to call the function or member function dispatcher.

This function template gets instantiated at the call site. .0

Parameters
[in]callbackThe callback to call.
[in]param1The first parameter to pass into the function.
[in]param2The second parameter to pass into the function.
[in]param3The third parameter to pass into the function.

Definition at line 259 of file callback.h.

References TestChaining::Function2(), mFunction, mImpl, Dali::CallbackBase::Impl::mMemberFunctionDispatcher, and Dali::CallbackBase::Impl::mObjectPointer.

Here is the call graph for this function:

template<typename R >
static R Dali::CallbackBase::ExecuteReturn ( CallbackBase callback)
inlinestatic

Function to call the function or member function dispatcher.

.0

Parameters
[in]callbackThe callback to call.
Returns
value from the function

Definition at line 100 of file callback.h.

References TestChaining::Function1(), mFunction, mImpl, Dali::CallbackBase::Impl::mMemberFunctionDispatcher, and Dali::CallbackBase::Impl::mObjectPointer.

Here is the call graph for this function:

template<typename R , typename P1 >
static R Dali::CallbackBase::ExecuteReturn ( CallbackBase callback,
P1  param1 
)
inlinestatic

Function to call the function or member function dispatcher.

This function template gets instantiated at the call site .0

Parameters
[in]callbackThe callback to call.
[in]param1The first parameter to pass into the function.
Returns
the value from the function

Definition at line 161 of file callback.h.

References TestChaining::Function1(), mFunction, mImpl, Dali::CallbackBase::Impl::mMemberFunctionDispatcher, and Dali::CallbackBase::Impl::mObjectPointer.

Here is the call graph for this function:

template<typename R , typename P1 , typename P2 >
static R Dali::CallbackBase::ExecuteReturn ( CallbackBase callback,
P1  param1,
P2  param2 
)
inlinestatic

Function to call the function or member function dispatcher.

This function template gets instantiated at the call site .0

Parameters
[in]callbackThe callback to call.
[in]param1The first parameter to pass into the function.
[in]param2The second parameter to pass into the function.
Returns
The return value from the function

Definition at line 225 of file callback.h.

References TestChaining::Function2(), mFunction, mImpl, Dali::CallbackBase::Impl::mMemberFunctionDispatcher, and Dali::CallbackBase::Impl::mObjectPointer.

Here is the call graph for this function:

template<typename R , typename P1 , typename P2 , typename P3 >
static R Dali::CallbackBase::ExecuteReturn ( CallbackBase callback,
P1  param1,
P2  param2,
P3  param3 
)
inlinestatic

Function to call the function or member function dispatcher.

This function template gets instantiated at the call site .0

Parameters
[in]callbackThe callback to call.
[in]param1The first parameter to pass into the function.
[in]param2The second parameter to pass into the function.
[in]param3The third parameter to pass into the function.
Returns
The return value from the function

Definition at line 291 of file callback.h.

References TestChaining::Function2(), mFunction, mImpl, Dali::CallbackBase::Impl::mMemberFunctionDispatcher, and Dali::CallbackBase::Impl::mObjectPointer.

Here is the call graph for this function:

const CallbackBase& Dali::CallbackBase::operator= ( const CallbackBase rhs)
protected

assignment operator not declared.

.0

void Dali::CallbackBase::Reset ( )

Resets the object pointer so that we know not to call methods of this object any more.

.0

Definition at line 62 of file callback.cpp.

References Dali::CallbackBase::Impl::mDestructorDispatcher, mFunction, mImpl, and Dali::CallbackBase::Impl::mObjectPointer.

Referenced by ~CallbackBase().

Here is the caller graph for this function:

Member Data Documentation

union { ... }
Function Dali::CallbackBase::mFunction

Static function.

Definition at line 399 of file callback.h.

Referenced by Execute(), ExecuteReturn(), Dali::operator==(), and Reset().

Impl* Dali::CallbackBase::mImpl
MemberFunction Dali::CallbackBase::mMemberFunction

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