Allows pthread_create() to dispatch to an object member function that takes a single argument, used internally. More...
#include <CodaObject.hxx>
Public Member Functions | |
pthreadDispatcher (C *c, R(C::*mfp)(T), T mfArg) | |
Constructor stores object pointer, member function pointer, member function arg. | |
Static Public Member Functions | |
static void * | dispatchIt (void *pthreadArg) |
Static function given to pthread_create dispatches to member function. | |
Public Attributes | |
C * | c |
Pointer to object of type C having the member function. | |
R(C::* | mfp )(T) |
Pointer to member function of object of type C, return is of type R. | |
T | mfArg |
Member function arg is of type T. |
Allows pthread_create() to dispatch to an object member function that takes a single argument, used internally.
Static function dispatchIt() is actually given to pthread_create(). The pthread_create() user arg is a pointer to this dispatcher object, which contains all info needed to dispatch correctly.
Definition at line 92 of file CodaObject.hxx.
codaObject::pthreadDispatcher< C, R, T >::pthreadDispatcher | ( | C * | c, | |
R(C::*)(T) | mfp, | |||
T | mfArg | |||
) | [inline] |
Constructor stores object pointer, member function pointer, member function arg.
c | Pointer to object | |
mfp | Pointer to member function | |
mfArg | Arg to give to member function when invoked |
Definition at line 105 of file CodaObject.hxx.
static void* codaObject::pthreadDispatcher< C, R, T >::dispatchIt | ( | void * | pthreadArg | ) | [inline, static] |
Static function given to pthread_create dispatches to member function.
pthreadArg | Pointer to dispatcher object |
Definition at line 113 of file CodaObject.hxx.
C* codaObject::pthreadDispatcher< C, R, T >::c |
Pointer to object of type C having the member function.
Definition at line 94 of file CodaObject.hxx.
Referenced by codaObject::pthreadDispatcher< SessionObject, void *, void * >::dispatchIt().
T codaObject::pthreadDispatcher< C, R, T >::mfArg |
Member function arg is of type T.
Definition at line 96 of file CodaObject.hxx.
Referenced by codaObject::pthreadDispatcher< SessionObject, void *, void * >::dispatchIt().
R(C::* codaObject::pthreadDispatcher< C, R, T >::mfp)(T) |
Pointer to member function of object of type C, return is of type R.
Referenced by codaObject::pthreadDispatcher< SessionObject, void *, void * >::dispatchIt().