AudioManager  7.5.11
Native Application Runtime Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
am::CAmSerializer Class Reference

magic class that does the serialization of functions calls The constructor must be called within the main threadcontext, after that using the overloaded template function call will serialize all calls and call them within the main thread context. More...

#include <CAmSerializer.h>

Public Member Functions

template<typename Class , typename Method , typename Tuple >
void doAsyncCall (Class intsance, Method method, Tuple &arguments)
 instantiates a async delegate with given arguments and sends the delegate pointer over the pipe More...
 
template<typename Class , typename Method , typename Return , typename Tuple >
void doSyncCall (Class intsance, Method method, Return &result, Tuple &arguments)
 instantiates a sync delegate with given arguments and sends the delegate pointer over the pipe More...
 
int getListDelegatePoiters ()
 get the size of delegate pointers More...
 
template<class TClass , class TRet , class... TArgs>
void syncCall (TClass *instance, TRet(TClass::*method)(TArgs...), TRet &result, TArgs &...arguments)
 calls a function with variadic arguments threadsafe More...
 
template<class TClass , class TRet , class... TArgs>
void asyncCall (TClass *instance, TRet(TClass::*method)(TArgs...), TArgs &...arguments)
 calls a function with variadic arguments threadsafe More...
 
template<class TClass >
void asyncCall (TClass *instance, void(TClass::*function)())
 calls a function with no arguments threadsafe More...
 
template<class TClass1 , class Targ >
void asyncCall (TClass1 *instance, void(TClass1::*function)(Targ), Targ argument)
 calls a function with one arguments asynchronously threadsafe More...
 
template<class TClass1 , class Targ >
void asyncCall (TClass1 *instance, void(TClass1::*function)(Targ &), Targ &argument)
 calls a function with one argument called by reference asynchronously threadsafe More...
 
template<class TClass1 , class Targ , class Targ1 >
void asyncCall (TClass1 *instance, void(TClass1::*function)(Targ argument, Targ1 argument1), Targ argument, Targ1 argument1)
 calls a function with two arguments asynchronously threadsafe. More...
 
template<class TClass1 , class Targ , class Targ1 >
void asyncCall (TClass1 *instance, void(TClass1::*function)(Targ &argument, Targ1 argument1), Targ &argument, Targ1 argument1)
 calls a function with two arguments asynchronously threadsafe, first argument is a reference. More...
 
template<class TClass1 , class Targ , class Targ1 >
void asyncCall (TClass1 *instance, void(TClass1::*function)(Targ argument, Targ1 &argument1), Targ argument, Targ1 &argument1)
 calls a function with two arguments asynchronously threadsafe, second argument is a reference. More...
 
template<class TClass1 , class Targ , class Targ1 >
void asyncCall (TClass1 *instance, void(TClass1::*function)(Targ &argument, Targ1 &argument1), Targ &argument, Targ1 &argument1)
 calls a function with two arguments asynchronously threadsafe, both arguments are references. More...
 
template<class TClass1 , class Targ , class Targ1 , class Targ2 >
void asyncCall (TClass1 *instance, void(TClass1::*function)(Targ argument, Targ1 argument1, Targ2 argument2), Targ argument, Targ1 argument1, Targ2 argument2)
 calls a function with three arguments asynchronously threadsafe. More...
 
template<class TClass1 , class Targ , class Targ1 , class Targ2 >
void asyncCall (TClass1 *instance, void(TClass1::*function)(Targ &argument, Targ1 argument1, Targ2 argument2), Targ &argument, Targ1 argument1, Targ2 argument2)
 calls a function with three arguments asynchronously threadsafe. More...
 
template<class TClass1 , class Targ , class Targ1 , class Targ2 >
void asyncCall (TClass1 *instance, void(TClass1::*function)(Targ argument, Targ1 &argument1, Targ2 argument2), Targ argument, Targ1 &argument1, Targ2 argument2)
 calls a function with three arguments asynchronously threadsafe. More...
 
template<class TClass1 , class Targ , class Targ1 , class Targ2 >
void asyncCall (TClass1 *instance, void(TClass1::*function)(Targ argument, Targ1 argument1, Targ2 &argument2), Targ argument, Targ1 argument1, Targ2 &argument2)
 calls a function with three arguments asynchronously threadsafe. More...
 
template<class TClass1 , class Targ , class Targ1 , class Targ2 >
void asyncCall (TClass1 *instance, void(TClass1::*function)(Targ argument, Targ1 &argument1, Targ2 &argument2), Targ argument, Targ1 &argument1, Targ2 &argument2)
 calls a function with three arguments asynchronously threadsafe. More...
 
template<class TClass1 , class Targ , class Targ1 , class Targ2 >
void asyncCall (TClass1 *instance, void(TClass1::*function)(Targ &argument, Targ1 &argument1, Targ2 &argument2), Targ &argument, Targ1 &argument1, Targ2 &argument2)
 calls a function with three arguments asynchronously threadsafe. More...
 
template<class TClass1 , class Targ , class Targ1 , class Targ2 >
void asyncCall (TClass1 *instance, void(TClass1::*function)(Targ &argument, Targ1 &argument1, Targ2 argument2), Targ &argument, Targ1 &argument1, Targ2 argument2)
 calls a function with three arguments asynchronously threadsafe. More...
 
template<class TClass1 , class Targ , class Targ1 , class Targ2 >
void asyncCall (TClass1 *instance, void(TClass1::*function)(Targ &argument, Targ1 argument1, Targ2 &argument2), Targ &argument, Targ1 argument1, Targ2 &argument2)
 calls a function with three arguments asynchronously threadsafe. More...
 
template<class TClass1 , class Targ , class Targ1 , class Targ2 , class Targ3 >
void asyncCall (TClass1 *instance, void(TClass1::*function)(Targ argument, Targ1 argument1, Targ2 argument2, Targ3 argument3), Targ argument, Targ1 argument1, Targ2 argument2, Targ3 argument3)
 calls a function with four arguments asynchronously threadsafe. More...
 
template<class TClass1 , class TretVal >
void syncCall (TClass1 *instance, TretVal(TClass1::*function)(), TretVal &retVal)
 calls a synchronous function with no arguments threadsafe More...
 
template<class TClass1 , class TretVal , class TargCall , class Targ >
void syncCall (TClass1 *instance, TretVal(TClass1::*function)(TargCall), TretVal &retVal, Targ &argument)
 calls a function with one argument synchronous threadsafe More...
 
template<class TClass1 , class TretVal , class TargCall , class Targ >
void syncCall (TClass1 *instance, TretVal(TClass1::*function)(TargCall) const, TretVal &retVal, Targ &argument)
 calls a function with one argument synchronous threadsafe for const functions. More...
 
template<class TClass1 , class TretVal , class TargCall , class Targ1Call , class Targ , class Targ1 >
void syncCall (TClass1 *instance, TretVal(TClass1::*function)(TargCall, Targ1Call), TretVal &retVal, Targ &argument, Targ1 &argument1)
 calls a function with two arguments synchronously threadsafe. More...
 
template<class TClass1 , class TretVal , class TargCall , class Targ1Call , class Targ , class Targ1 >
void syncCall (TClass1 *instance, TretVal(TClass1::*function)(TargCall, Targ1Call) const, TretVal &retVal, Targ &argument, Targ1 &argument1)
 calls a function with two arguments synchronously threadsafe const. More...
 
template<class TClass1 , class TretVal , class TargCall , class TargCall1 , class TargCall2 , class Targ , class Targ1 , class Targ2 >
void syncCall (TClass1 *instance, TretVal(TClass1::*function)(TargCall, TargCall1, TargCall2), TretVal &retVal, Targ &argument, Targ1 &argument1, Targ2 &argument2)
 calls a function with three arguments synchronously threadsafe. More...
 
template<class TClass1 , class TretVal , class TargCall , class TargCall1 , class TargCall2 , class Targ , class Targ1 , class Targ2 >
void syncCall (TClass1 *instance, TretVal(TClass1::*function)(TargCall, TargCall1, TargCall2) const, TretVal &retVal, Targ &argument, Targ1 &argument1, Targ2 &argument2)
 calls a const function with three arguments synchronously threadsafe. More...
 
template<class TClass1 , class TretVal , class TargCall , class TargCall1 , class TargCall2 , class TargCall3 , class Targ , class Targ1 , class Targ2 , class Targ3 >
void syncCall (TClass1 *instance, TretVal(TClass1::*function)(TargCall, TargCall1, TargCall2, TargCall3), TretVal &retVal, Targ &argument, Targ1 &argument1, Targ2 &argument2, Targ3 &argument3)
 calls a function with four arguments synchronously threadsafe. More...
 
template<class TClass1 , class TretVal , class TargCall , class TargCall1 , class TargCall2 , class TargCall3 , class TargCall4 , class Targ , class Targ1 , class Targ2 , class Targ3 , class Targ4 >
void syncCall (TClass1 *instance, TretVal(TClass1::*function)(TargCall, TargCall1, TargCall2, TargCall3, TargCall4), TretVal &retVal, Targ &argument, Targ1 &argument1, Targ2 &argument2, Targ3 &argument3, Targ4 &argument4)
 calls a function with five arguments synchronously threadsafe. More...
 
template<class TClass1 , class TretVal , class TargCall , class TargCall1 , class TargCall2 , class TargCall3 , class TargCall4 , class TargCall5 , class Targ , class Targ1 , class Targ2 , class Targ3 , class Targ4 , class Targ5 >
void syncCall (TClass1 *instance, TretVal(TClass1::*function)(TargCall, TargCall1, TargCall2, TargCall3, TargCall4, TargCall5), TretVal &retVal, Targ &argument, Targ1 &argument1, Targ2 &argument2, Targ3 &argument3, Targ4 &argument4, Targ5 &argument5)
 calls a function with six arguments synchronously threadsafe. More...
 
void receiverCallback (const pollfd pollfd, const sh_pollHandle_t handle, void *userData)
 receiver callback for sockethandling, for more, see CAmSocketHandler More...
 
bool checkerCallback (const sh_pollHandle_t handle, void *userData)
 checker callback for sockethandling, for more, see CAmSocketHandler More...
 
bool dispatcherCallback (const sh_pollHandle_t handle, void *userData)
 dispatcher callback for sockethandling, for more, see CAmSocketHandler More...
 
 CAmSerializer (CAmSocketHandler *iSocketHandler)
 The constructor must be called in the mainthread context ! More...
 
 ~CAmSerializer ()
 

Public Attributes

TAmShPollFired< CAmSerializerreceiverCallbackT
 
TAmShPollDispatch< CAmSerializerdispatcherCallbackT
 
TAmShPollCheck< CAmSerializercheckerCallbackT
 

Detailed Description

magic class that does the serialization of functions calls The constructor must be called within the main threadcontext, after that using the overloaded template function call will serialize all calls and call them within the main thread context.


More details can be found here: Utilizing The Mainloop as Threadsafe Call Method

Warning
asynchronous calls may be used in the mainthread context, but if you want to use synchronous calls make sure that you use one instance of this class per thread otherwise you could be lost in never returning calls.
Examples of the usage can be found in IAmCommandReceiverShadow of the ControlPlugin or IAmRoutingReceiverShadow of the PluginRoutingInterfaceAsync.

Definition at line 49 of file CAmSerializer.h.

Constructor & Destructor Documentation

am::CAmSerializer::CAmSerializer ( CAmSocketHandler iSocketHandler)
inline

The constructor must be called in the mainthread context !

Parameters
iSocketHandlerpointer to the CAmSocketHandler

Definition at line 764 of file CAmSerializer.h.

am::CAmSerializer::~CAmSerializer ( )
inline

Definition at line 792 of file CAmSerializer.h.

Member Function Documentation

template<class TClass , class TRet , class... TArgs>
void am::CAmSerializer::asyncCall ( TClass *  instance,
TRet(TClass::*)(TArgs...)  method,
TArgs &...  arguments 
)
inline

calls a function with variadic arguments threadsafe

Parameters
instancethe instance of the class that shall be called
functionthe function that shall be called as member function pointer.
Template Parameters
TClassthe type of the Class to be called
TRetthe type of the result
TArgsargument list

Example

class MyGreatClass
{
public:
int AGreatMethod(int x);
}
CAmSerializer serial(&Sockethandler);
MyGreatClass anInstance;
serial.asyncCall<MyGreatClass, void, int>(&anInstance,&MyGreatClass::AGreatMethod, 100);

Definition at line 318 of file CAmSerializer.h.

template<class TClass >
void am::CAmSerializer::asyncCall ( TClass *  instance,
void(TClass::*)()  function 
)
inline

calls a function with no arguments threadsafe

Parameters
instancethe instance of the class that shall be called
functionthe function that shall be called as memberfunction pointer.
Template Parameters
TClass1the type of the Class to be called

Example

class myClass
{
public:
void myfunction();
}
CAmSerializer serial(&Sockethandler);
myClass instanceMyClass;
serial<CommandSender>(&instanceMyClass,&myClass::myfunction);

Definition at line 342 of file CAmSerializer.h.

template<class TClass1 , class Targ >
void am::CAmSerializer::asyncCall ( TClass1 *  instance,
void(TClass1::*)(Targ)  function,
Targ  argument 
)
inline

calls a function with one arguments asynchronously threadsafe

Parameters
instancethe instance of the class that shall be called
functionthe function that shall be called as memberfunction pointer.
argumentthe argument
Template Parameters
TClass1the type of the Class to be called
Targthe type of the argument to be called

Example

class myClass
{
public:
void myfunction(int k);
}
CAmSerializer serial(&Sockethandler);
myClass instanceMyClass;
serial<CommandSender,int>(&instanceMyClass,&myClass::myfunction,k);

Definition at line 369 of file CAmSerializer.h.

template<class TClass1 , class Targ >
void am::CAmSerializer::asyncCall ( TClass1 *  instance,
void(TClass1::*)(Targ &)  function,
Targ &  argument 
)
inline

calls a function with one argument called by reference asynchronously threadsafe

Parameters
instancethe instance of the class that shall be called
functionthe function that shall be called as memberfunction pointer.
argumentthe argument
Template Parameters
TClass1the type of the Class to be called
Targthe type of the argument to be called

Example

class myClass
{
public:
void myfunction(int k);
}
CAmSerializer serial(&Sockethandler);
myClass instanceMyClass;
serial<CommandSender,int>(&instanceMyClass,&myClass::myfunction,k);

Definition at line 396 of file CAmSerializer.h.

template<class TClass1 , class Targ , class Targ1 >
void am::CAmSerializer::asyncCall ( TClass1 *  instance,
void(TClass1::*)(Targ argument, Targ1 argument1)  function,
Targ  argument,
Targ1  argument1 
)
inline

calls a function with two arguments asynchronously threadsafe.

for more see asyncCall with one argument

Parameters
instancepointer to the instance of the class
functionmemberfunction poitner
argumentthe first argument
argument1the second argument
Template Parameters
TClass1the type of the Class to be called
Targthe type of the argument to be called
Targ1the type of the first argument to be called

Definition at line 413 of file CAmSerializer.h.

template<class TClass1 , class Targ , class Targ1 >
void am::CAmSerializer::asyncCall ( TClass1 *  instance,
void(TClass1::*)(Targ &argument, Targ1 argument1)  function,
Targ &  argument,
Targ1  argument1 
)
inline

calls a function with two arguments asynchronously threadsafe, first argument is a reference.

for more see asyncCall with one argument

Parameters
instancepointer to the instance of the class
functionmemberfunction poitner
argumentthe first argument
argument1the second argument
Template Parameters
TClass1the type of the Class to be called
Targthe type of the argument to be called
Targ1the type of the first argument to be called

Definition at line 430 of file CAmSerializer.h.

template<class TClass1 , class Targ , class Targ1 >
void am::CAmSerializer::asyncCall ( TClass1 *  instance,
void(TClass1::*)(Targ argument, Targ1 &argument1)  function,
Targ  argument,
Targ1 &  argument1 
)
inline

calls a function with two arguments asynchronously threadsafe, second argument is a reference.

for more see asyncCall with one argument

Parameters
instancepointer to the instance of the class
functionmemberfunction poitner
argumentthe first argument
argument1the second argument
Template Parameters
TClass1the type of the Class to be called
Targthe type of the argument to be called
Targ1the type of the first argument to be called

Definition at line 447 of file CAmSerializer.h.

template<class TClass1 , class Targ , class Targ1 >
void am::CAmSerializer::asyncCall ( TClass1 *  instance,
void(TClass1::*)(Targ &argument, Targ1 &argument1)  function,
Targ &  argument,
Targ1 &  argument1 
)
inline

calls a function with two arguments asynchronously threadsafe, both arguments are references.

for more see asyncCall with one argument

Parameters
instancepointer to the instance of the class
functionmemberfunction poitner
argumentthe first argument
argument1the second argument
Template Parameters
TClass1the type of the Class to be called
Targthe type of the argument to be called
Targ1the type of the first argument to be called

Definition at line 464 of file CAmSerializer.h.

template<class TClass1 , class Targ , class Targ1 , class Targ2 >
void am::CAmSerializer::asyncCall ( TClass1 *  instance,
void(TClass1::*)(Targ argument, Targ1 argument1, Targ2 argument2)  function,
Targ  argument,
Targ1  argument1,
Targ2  argument2 
)
inline

calls a function with three arguments asynchronously threadsafe.

for more see other asycCall

Definition at line 474 of file CAmSerializer.h.

template<class TClass1 , class Targ , class Targ1 , class Targ2 >
void am::CAmSerializer::asyncCall ( TClass1 *  instance,
void(TClass1::*)(Targ &argument, Targ1 argument1, Targ2 argument2)  function,
Targ &  argument,
Targ1  argument1,
Targ2  argument2 
)
inline

calls a function with three arguments asynchronously threadsafe.

for more see other asycCall

Definition at line 484 of file CAmSerializer.h.

template<class TClass1 , class Targ , class Targ1 , class Targ2 >
void am::CAmSerializer::asyncCall ( TClass1 *  instance,
void(TClass1::*)(Targ argument, Targ1 &argument1, Targ2 argument2)  function,
Targ  argument,
Targ1 &  argument1,
Targ2  argument2 
)
inline

calls a function with three arguments asynchronously threadsafe.

for more see other asycCall

Definition at line 495 of file CAmSerializer.h.

template<class TClass1 , class Targ , class Targ1 , class Targ2 >
void am::CAmSerializer::asyncCall ( TClass1 *  instance,
void(TClass1::*)(Targ argument, Targ1 argument1, Targ2 &argument2)  function,
Targ  argument,
Targ1  argument1,
Targ2 &  argument2 
)
inline

calls a function with three arguments asynchronously threadsafe.

for more see other asycCall

Definition at line 505 of file CAmSerializer.h.

template<class TClass1 , class Targ , class Targ1 , class Targ2 >
void am::CAmSerializer::asyncCall ( TClass1 *  instance,
void(TClass1::*)(Targ argument, Targ1 &argument1, Targ2 &argument2)  function,
Targ  argument,
Targ1 &  argument1,
Targ2 &  argument2 
)
inline

calls a function with three arguments asynchronously threadsafe.

for more see other asycCall

Definition at line 515 of file CAmSerializer.h.

template<class TClass1 , class Targ , class Targ1 , class Targ2 >
void am::CAmSerializer::asyncCall ( TClass1 *  instance,
void(TClass1::*)(Targ &argument, Targ1 &argument1, Targ2 &argument2)  function,
Targ &  argument,
Targ1 &  argument1,
Targ2 &  argument2 
)
inline

calls a function with three arguments asynchronously threadsafe.

for more see other asycCall

Definition at line 525 of file CAmSerializer.h.

template<class TClass1 , class Targ , class Targ1 , class Targ2 >
void am::CAmSerializer::asyncCall ( TClass1 *  instance,
void(TClass1::*)(Targ &argument, Targ1 &argument1, Targ2 argument2)  function,
Targ &  argument,
Targ1 &  argument1,
Targ2  argument2 
)
inline

calls a function with three arguments asynchronously threadsafe.

for more see other asycCall

Definition at line 535 of file CAmSerializer.h.

template<class TClass1 , class Targ , class Targ1 , class Targ2 >
void am::CAmSerializer::asyncCall ( TClass1 *  instance,
void(TClass1::*)(Targ &argument, Targ1 argument1, Targ2 &argument2)  function,
Targ &  argument,
Targ1  argument1,
Targ2 &  argument2 
)
inline

calls a function with three arguments asynchronously threadsafe.

for more see other asycCall

Definition at line 545 of file CAmSerializer.h.

template<class TClass1 , class Targ , class Targ1 , class Targ2 , class Targ3 >
void am::CAmSerializer::asyncCall ( TClass1 *  instance,
void(TClass1::*)(Targ argument, Targ1 argument1, Targ2 argument2, Targ3 argument3)  function,
Targ  argument,
Targ1  argument1,
Targ2  argument2,
Targ3  argument3 
)
inline

calls a function with four arguments asynchronously threadsafe.

for more see other asycCall

Definition at line 555 of file CAmSerializer.h.

bool am::CAmSerializer::checkerCallback ( const sh_pollHandle_t  handle,
void *  userData 
)
inline

checker callback for sockethandling, for more, see CAmSocketHandler

Definition at line 731 of file CAmSerializer.h.

bool am::CAmSerializer::dispatcherCallback ( const sh_pollHandle_t  handle,
void *  userData 
)
inline

dispatcher callback for sockethandling, for more, see CAmSocketHandler

Definition at line 743 of file CAmSerializer.h.

template<typename Class , typename Method , typename Tuple >
void am::CAmSerializer::doAsyncCall ( Class  intsance,
Method  method,
Tuple &  arguments 
)
inline

instantiates a async delegate with given arguments and sends the delegate pointer over the pipe

Definition at line 210 of file CAmSerializer.h.

template<typename Class , typename Method , typename Return , typename Tuple >
void am::CAmSerializer::doSyncCall ( Class  intsance,
Method  method,
Return &  result,
Tuple &  arguments 
)
inline

instantiates a sync delegate with given arguments and sends the delegate pointer over the pipe

Definition at line 223 of file CAmSerializer.h.

int am::CAmSerializer::getListDelegatePoiters ( )
inline

get the size of delegate pointers

Definition at line 264 of file CAmSerializer.h.

void am::CAmSerializer::receiverCallback ( const pollfd  pollfd,
const sh_pollHandle_t  handle,
void *  userData 
)
inline

receiver callback for sockethandling, for more, see CAmSocketHandler

Definition at line 714 of file CAmSerializer.h.

template<class TClass , class TRet , class... TArgs>
void am::CAmSerializer::syncCall ( TClass *  instance,
TRet(TClass::*)(TArgs...)  method,
TRet &  result,
TArgs &...  arguments 
)
inline

calls a function with variadic arguments threadsafe

Parameters
instancethe instance of the class that shall be called
functionthe function that shall be called as member function pointer.
outputvariable.
Template Parameters
TClassthe type of the Class to be called
TRetthe type of the result
TArgsargument list

Example

class MyGreatClass
{
public:
int AGreatMethod(int x);
}
CAmSerializer serial(&Sockethandler);
MyGreatClass anInstance;
int result;
serial.syncCall<MyGreatClass, int, int>(&anInstance,&MyGreatClass::AGreatMethod, result, 100);

Definition at line 291 of file CAmSerializer.h.

template<class TClass1 , class TretVal >
void am::CAmSerializer::syncCall ( TClass1 *  instance,
TretVal(TClass1::*)()  function,
TretVal &  retVal 
)
inline

calls a synchronous function with no arguments threadsafe

Parameters
instancethe instance of the class that shall be called
functionthe function that shall be called as memberfunction pointer.
retValthe return parameter, no const allowed !
Template Parameters
TClass1the type of the class to be called
TretValthe type of the return parameter

Example

class myClass
{
public:
am_Error_e myfunction();
}
CAmSerializer serial(&Sockethandler);
myClass instanceMyClass;
am_Error_e error;
serial<CommandSender,am_Error_e>(&instanceMyClass,&myClass::myfunction, error);

All arguments given to synchronous functions must be non-const since the results of the operations will be written back to the arguments.

Definition at line 584 of file CAmSerializer.h.

template<class TClass1 , class TretVal , class TargCall , class Targ >
void am::CAmSerializer::syncCall ( TClass1 *  instance,
TretVal(TClass1::*)(TargCall)  function,
TretVal &  retVal,
Targ &  argument 
)
inline

calls a function with one argument synchronous threadsafe

Parameters
instancethe instance of the class that shall be called
functionthe function that shall be called as memberfunction pointer.
retValthe return parameter, no const allowed !
argumentthe argument, no const allowed !
Template Parameters
TClass1the type of the class to be called
TretValthe type of the return parameter
TargCallthe type of the argument like in the function to be called. here all references and const must be respected!
Targthe type of the argument, here no const and no references allowed !

Example

class myClass
{
public:
am_Error_e myfunction(int k);
}
CAmSerializer serial(&Sockethandler);
myClass instanceMyClass;
am_Error_e error;
int l;
serial<CommandSender,am_Error_e,int>(&instanceMyClass,&myClass::myfunction,error,l);

All arguments given to synchronous functions must be non-const since the results of the operations will be written back to the arguments.

Definition at line 617 of file CAmSerializer.h.

template<class TClass1 , class TretVal , class TargCall , class Targ >
void am::CAmSerializer::syncCall ( TClass1 *  instance,
TretVal(TClass1::*)(TargCall) const  function,
TretVal &  retVal,
Targ &  argument 
)
inline

calls a function with one argument synchronous threadsafe for const functions.

For more see syncCall with one argument

Definition at line 628 of file CAmSerializer.h.

template<class TClass1 , class TretVal , class TargCall , class Targ1Call , class Targ , class Targ1 >
void am::CAmSerializer::syncCall ( TClass1 *  instance,
TretVal(TClass1::*)(TargCall, Targ1Call)  function,
TretVal &  retVal,
Targ &  argument,
Targ1 &  argument1 
)
inline

calls a function with two arguments synchronously threadsafe.

For more see syncCall with one argument

Definition at line 639 of file CAmSerializer.h.

template<class TClass1 , class TretVal , class TargCall , class Targ1Call , class Targ , class Targ1 >
void am::CAmSerializer::syncCall ( TClass1 *  instance,
TretVal(TClass1::*)(TargCall, Targ1Call) const  function,
TretVal &  retVal,
Targ &  argument,
Targ1 &  argument1 
)
inline

calls a function with two arguments synchronously threadsafe const.

For more see syncCall with one argument

Definition at line 649 of file CAmSerializer.h.

template<class TClass1 , class TretVal , class TargCall , class TargCall1 , class TargCall2 , class Targ , class Targ1 , class Targ2 >
void am::CAmSerializer::syncCall ( TClass1 *  instance,
TretVal(TClass1::*)(TargCall, TargCall1, TargCall2)  function,
TretVal &  retVal,
Targ &  argument,
Targ1 &  argument1,
Targ2 &  argument2 
)
inline

calls a function with three arguments synchronously threadsafe.

for more see syncCall with one argument

Definition at line 660 of file CAmSerializer.h.

template<class TClass1 , class TretVal , class TargCall , class TargCall1 , class TargCall2 , class Targ , class Targ1 , class Targ2 >
void am::CAmSerializer::syncCall ( TClass1 *  instance,
TretVal(TClass1::*)(TargCall, TargCall1, TargCall2) const  function,
TretVal &  retVal,
Targ &  argument,
Targ1 &  argument1,
Targ2 &  argument2 
)
inline

calls a const function with three arguments synchronously threadsafe.

for more see syncCall with one argument

Definition at line 671 of file CAmSerializer.h.

template<class TClass1 , class TretVal , class TargCall , class TargCall1 , class TargCall2 , class TargCall3 , class Targ , class Targ1 , class Targ2 , class Targ3 >
void am::CAmSerializer::syncCall ( TClass1 *  instance,
TretVal(TClass1::*)(TargCall, TargCall1, TargCall2, TargCall3)  function,
TretVal &  retVal,
Targ &  argument,
Targ1 &  argument1,
Targ2 &  argument2,
Targ3 &  argument3 
)
inline

calls a function with four arguments synchronously threadsafe.

for more see syncCall with one argument

Definition at line 682 of file CAmSerializer.h.

template<class TClass1 , class TretVal , class TargCall , class TargCall1 , class TargCall2 , class TargCall3 , class TargCall4 , class Targ , class Targ1 , class Targ2 , class Targ3 , class Targ4 >
void am::CAmSerializer::syncCall ( TClass1 *  instance,
TretVal(TClass1::*)(TargCall, TargCall1, TargCall2, TargCall3, TargCall4)  function,
TretVal &  retVal,
Targ &  argument,
Targ1 &  argument1,
Targ2 &  argument2,
Targ3 &  argument3,
Targ4 &  argument4 
)
inline

calls a function with five arguments synchronously threadsafe.

for more see syncCall with one argument

Definition at line 693 of file CAmSerializer.h.

template<class TClass1 , class TretVal , class TargCall , class TargCall1 , class TargCall2 , class TargCall3 , class TargCall4 , class TargCall5 , class Targ , class Targ1 , class Targ2 , class Targ3 , class Targ4 , class Targ5 >
void am::CAmSerializer::syncCall ( TClass1 *  instance,
TretVal(TClass1::*)(TargCall, TargCall1, TargCall2, TargCall3, TargCall4, TargCall5)  function,
TretVal &  retVal,
Targ &  argument,
Targ1 &  argument1,
Targ2 &  argument2,
Targ3 &  argument3,
Targ4 &  argument4,
Targ5 &  argument5 
)
inline

calls a function with six arguments synchronously threadsafe.

for more see syncCall with one argument

Definition at line 704 of file CAmSerializer.h.

Member Data Documentation

TAmShPollCheck<CAmSerializer> am::CAmSerializer::checkerCallbackT

Definition at line 758 of file CAmSerializer.h.

TAmShPollDispatch<CAmSerializer> am::CAmSerializer::dispatcherCallbackT

Definition at line 757 of file CAmSerializer.h.

TAmShPollFired<CAmSerializer> am::CAmSerializer::receiverCallbackT

Definition at line 756 of file CAmSerializer.h.


The documentation for this class was generated from the following file: