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

Public Types | |
| typedef void(* | DtCallbackFunctionType )(T_CallbackArg, void *) |
| The function signature of the callback function. | |
Public Member Functions | |
| DtCallbackList () | |
| DtCallbackList (const DtCallbackList &orig) | |
| ~DtCallbackList () | |
| DtCallbackList & | operator= (const DtCallbackList &orig) |
| void | addCallback (DtCallbackFunctionType fcn, void *usrData) |
| Adds a new callback to the list. | |
| void | 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. | |
| int | size () |
| Returns the size of myCallbackList. | |
Protected Types | |
| typedef std::pair < DtCallbackFunctionType, void * > | DtCallbackInfoType |
| typedef std::list < DtCallbackInfoType > | DtCallbackListType |
Protected Member Functions | |
| bool | contains (const DtCallbackListType &callbackList, DtCallbackFunctionType fcn, void *usrData) const |
Protected Attributes | |
| DtCallbackListType | myCallbackList |
| bool | myInvokingCallbacks |
| Flag used to indicate that the invokeCallbacks method is currently running. | |
| DtCallbackListType | myCallbacksToRemove |
| List used to queue callbacks for removal if removeCallback() is called during callback invokation. | |
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 |
|
protected |
| DtCallbackList< T_CallbackArg >::DtCallbackList | ( | ) |
| DtCallbackList< T_CallbackArg >::DtCallbackList | ( | const DtCallbackList< T_CallbackArg > & | orig | ) |
| DtCallbackList< T_CallbackArg >::~DtCallbackList | ( | ) |
| DtCallbackList& DtCallbackList< T_CallbackArg >::operator= | ( | const DtCallbackList< T_CallbackArg > & | orig | ) |
| void 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.
| void 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.
| int DtCallbackList< T_CallbackArg >::size | ( | ) |
Returns the size of myCallbackList.
|
protected |
|
protected |
|
protected |
Flag used to indicate that the invokeCallbacks method is currently running.
Value not copied with the copy constructor/assignment operator.
|
protected |
List used to queue callbacks for removal if removeCallback() is called during callback invokation.
Value not copied with the copy constructor/assignment operator.