![]() |
VR-Forces 5.0.1 Developer's Guide
|
This class works just as DtCalllbackTable, but manages callbacks that have no arguments, and therefore don't fit in the template defined by DtCallbackList.
Classes | |
| struct | DtCallbackInfoType |
Public Types | |
| typedef void(* | DtCallbackFunctionType )(void *) |
Public Member Functions | |
| DtNoArgumentCallbackList () | |
| DtNoArgumentCallbackList (const DtNoArgumentCallbackList &orig) | |
| bool | addCallback (DtCallbackFunctionType fcn, void *usrData) |
| bool | removeCallback (DtCallbackFunctionType fcn, void *usrData) |
| void | invokeCallbacks () |
| void | removeAll () |
Protected Types | |
| typedef std::set < DtCallbackInfoType > | DtCallbackListType |
Protected Attributes | |
| tbb::spin_mutex | myMutex |
| DtCallbackListType | myCallbackList |
| unsigned | myCallbackCount |
Private Member Functions | |
| DtNoArgumentCallbackList & | operator= (const DtNoArgumentCallbackList &orig) |
| typedef void(* DtNoArgumentCallbackList::DtCallbackFunctionType)(void *) |
The function signature of the callback function.
|
protected |
| DtNoArgumentCallbackList::DtNoArgumentCallbackList | ( | ) |
Default constructor.
|
explicit |
Copy constructor. Exists mostly so that std::map will work on linux without C++11.
| bool DtNoArgumentCallbackList::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 DtNoArgumentCallbackList::removeCallback | ( | DtCallbackFunctionType | fcn, |
| void * | usrData | ||
| ) |
Removes the specified callback from the list.
| void DtNoArgumentCallbackList::invokeCallbacks | ( | ) |
Invokes all the callbacks currently on the callback list.
| void DtNoArgumentCallbackList::removeAll | ( | ) |
Removes all callbacks that have been registered.
|
private |
|
mutableprotected |
|
protected |
|
protected |