AudioManager  7.6.6
Native Application Runtime Environment
am::V2::CAmSerializer Class Reference

#include <CAmSerializer.h>

Public Member Functions

size_t getListDelegatePointers ()
 get the size of delegate pointers More...
 
template<class TFunc >
void asyncInvocation (TFunc invocation)
 calls a function with variadic arguments threadsafe More...
 
template<class TClass , class TMeth , class TRet , class... TArgs>
void asyncCall (TClass *instance, TMeth method, TArgs &&...arguments)
 calls a function with variadic arguments threadsafe More...
 
template<class TClass , class TMeth , class... TArgs>
void asyncCall (TClass *instance, TMeth method, TArgs &&...arguments)
 
template<class TFunc , class TRet >
void syncInvocation (TFunc invocation, TRet &&result)
 calls a function with variadic arguments threadsafe More...
 
template<class TFunc >
void syncInvocation (TFunc invocation)
 calls a function with variadic arguments threadsafe More...
 
template<class TClass , class TMeth , class TRet , class... TArgs>
void syncCall (TClass *instance, TMeth method, TRet &result, TArgs &&...arguments)
 calls a function with variadic arguments threadsafe More...
 
template<class TClass , class TMeth , class... TArgs>
void syncCall (TClass *instance, TMeth method, TArgs &&...arguments)
 
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

Definition at line 856 of file CAmSerializer.h.

Constructor & Destructor Documentation

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

The constructor must be called in the mainthread context !

Parameters
iSocketHandlerpointer to the CAmSocketHandler

Definition at line 1174 of file CAmSerializer.h.

am::V2::CAmSerializer::~CAmSerializer ( )
inline

Definition at line 1203 of file CAmSerializer.h.

Member Function Documentation

template<class TClass , class TMeth , class TRet , class... TArgs>
void am::V2::CAmSerializer::asyncCall ( TClass *  instance,
TMeth  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 AClass
{
public:
void instanceMethod(int x);
}
CAmSerializer serial(&Sockethandler);
AClass anInstance;
serial.asyncCall(&anInstance,&AClass::instanceMethod, 100);

Definition at line 1028 of file CAmSerializer.h.

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

Definition at line 1035 of file CAmSerializer.h.

template<class TFunc >
void am::V2::CAmSerializer::asyncInvocation ( TFunc  invocation)
inline

calls a function with variadic arguments threadsafe

Parameters
invocationis a type is produced by std::bind

Example:

CAmSerializer serial(&Sockethandler);
serial.asyncInvocation(std::bind([]()->bool{return true;}));

Definition at line 999 of file CAmSerializer.h.

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

checker callback for sockethandling, for more, see CAmSocketHandler

Definition at line 1141 of file CAmSerializer.h.

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

dispatcher callback for sockethandling, for more, see CAmSocketHandler

Definition at line 1153 of file CAmSerializer.h.

size_t am::V2::CAmSerializer::getListDelegatePointers ( )
inline

get the size of delegate pointers

Definition at line 984 of file CAmSerializer.h.

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

receiver callback for sockethandling, for more, see CAmSocketHandler

Definition at line 1124 of file CAmSerializer.h.

template<class TClass , class TMeth , class TRet , class... TArgs>
void am::V2::CAmSerializer::syncCall ( TClass *  instance,
TMeth  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 AClass
{
public:
int instanceMethod(int x);
}
CAmSerializer serial(&Sockethandler);
AClass anInstance;
int result;
serial.syncCall(&anInstance,&AClass::instanceMethod, result, 100);

Definition at line 1108 of file CAmSerializer.h.

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

Definition at line 1115 of file CAmSerializer.h.

template<class TFunc , class TRet >
void am::V2::CAmSerializer::syncInvocation ( TFunc  invocation,
TRet &&  result 
)
inline

calls a function with variadic arguments threadsafe

Parameters
invocationis a type is produced by std::bind
resultfrom type TRet

Example:

CAmSerializer serial(&Sockethandler);
bool result;
serial.syncCall(std::bind([]()->bool{return true;}), result);

Definition at line 1053 of file CAmSerializer.h.

template<class TFunc >
void am::V2::CAmSerializer::syncInvocation ( TFunc  invocation)
inline

calls a function with variadic arguments threadsafe

Parameters
invocationis a type produced by std::bind

Example:

CAmSerializer serial(&Sockethandler);
serial.syncCall(std::bind([]()->bool{return true;}));

Definition at line 1075 of file CAmSerializer.h.

Member Data Documentation

TAmShPollCheck<CAmSerializer> am::V2::CAmSerializer::checkerCallbackT

Definition at line 1168 of file CAmSerializer.h.

TAmShPollDispatch<CAmSerializer> am::V2::CAmSerializer::dispatcherCallbackT

Definition at line 1167 of file CAmSerializer.h.

TAmShPollFired<CAmSerializer> am::V2::CAmSerializer::receiverCallbackT

Definition at line 1166 of file CAmSerializer.h.


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