template<class _objectType, class _userDataType, class _callBackReturnType, class _callBackArgumentType>
struct osaHeapCallBack< _objectType, _userDataType, _callBackReturnType, _callBackArgumentType >
Adapter for callback functions with one user defined argument and adapter instance created on the heap. The adapter instance is automatically destroyed with delete after processing the callback. This is used for CreateThread() R MyCallback( A1 arg1 ) is redirected to [virtual] R O::MyMemberCallback( U UserData ); PKAZ: Clean up the above comment.
template<class _objectType , class _userDataType , class _callBackReturnType , class _callBackArgumentType >
static void* osaHeapCallBack< _objectType, _userDataType, _callBackReturnType, _callBackArgumentType >::CallbackAndDestroy |
( |
_callBackArgumentType |
obj | ) |
|
|
inlinestatic |
The static function to be passed as the 'start routine' argument of functions such as pthread_create. We use the argument to the 'start routine' to send an object that packs the member function to be called, along with the receiver object and user data.
- Parameters
-
obj | This object must be of type _callBackArgumentType, which is the same as that of the 'start routine' prototype defined by the platform. g |
- Returns
- The result of the callback method which must be of type _callBackReturnType type, which is the same as the return type of the 'start routine' defined by the platform.