![]() |
VR-Forces 4.7 Class Documentation
|
DtCallbackList; DtNoArgumentCallbackList. More...

Classes | |
| struct | DtCallbackInfoType |
Public Types | |
| typedef void(* | DtCallbackFunctionType )(T_CallbackArg, void *) |
| The function signature of the callback function. | |
Public Member Functions | |
| DtCallbackList () | |
| Default constructor. | |
| DtCallbackList (const DtCallbackList &orig) | |
| Copy constructor. | |
| bool | addCallback (DtCallbackFunctionType fcn, void *usrData) |
| Adds a new callback to the list. | |
| bool | removeCallback (DtCallbackFunctionType fcn, void *usrData) |
| Removes the specified callback from the list. | |
| void | invokeCallbacks (T_CallbackArg arg) |
| Invokes all the callbacks currently on the callback list. | |
| void | removeAll () |
| Removes all callbacks that have been registered. | |
Protected Types | |
| typedef std::list < boost::shared_ptr < DtCallbackInfoType > > | DtCallbackListType |
Protected Attributes | |
| tbb::spin_mutex | myMutex |
| DtCallbackListType | myCallbackList |
| unsigned | myCallbackCount |
Private Member Functions | |
| DtCallbackList & | operator= (const DtCallbackList &orig) |
DtCallbackList; DtNoArgumentCallbackList.
This is a templated class which manages a list of callbacks. A class is instantiated from this template by specifying the argument to be passed into the callback function. A callback function signature is created by this class (as the DtCallbackFunctionType definition) using the specified argument.
| typedef void(* DtCallbackList< T_CallbackArg >::DtCallbackFunctionType)(T_CallbackArg, void *) |
The function signature of the callback function.
|
protected |
| DtCallbackList< T_CallbackArg >::DtCallbackList | ( | ) |
Default constructor.
|
explicit |
Copy constructor.
Exists mostly so that std::map will work on linux without C++11.
| bool DtCallbackList< T_CallbackArg >::addCallback | ( | DtCallbackFunctionType | fcn, |
| void * | usrData | ||
| ) |
Adds a new callback to the list.
A duplicate entry is checked for first, and if found, this new function is not added.
| bool DtCallbackList< T_CallbackArg >::removeCallback | ( | DtCallbackFunctionType | fcn, |
| void * | usrData | ||
| ) |
Removes the specified callback from the list.
| void DtCallbackList< T_CallbackArg >::invokeCallbacks | ( | T_CallbackArg | arg | ) |
Invokes all the callbacks currently on the callback list.
| void DtCallbackList< T_CallbackArg >::removeAll | ( | ) |
Removes all callbacks that have been registered.
|
private |
|
mutableprotected |
|
protected |
|
protected |