![]() |
VR-Forces Developer's Guide
|
Contains the DtSimCommandDistributor class declaration.
DtSimCommandDistributor manages callbacks on sim commands. Sim commands are usually processed once by a registered DtSimCommandExecutor, but the DtSimCommandDistributor allows sim components to do their own processing based on sim commands as well.
Public Types | |
| typedef DtCallbackList< const DtSimCommand & > | DtSimCommandCallbackList |
| typedef DtSimCommandCallbackList::DtCallbackFunctionType | DtSimCommandCallbackFcn |
| typedef std::map < DtSimCommandMessageType, DtSimCommandCallbackList > | DtSimCallbackListMap |
Public Member Functions | |
| DtSimCommandDistributor () | |
| virtual | ~DtSimCommandDistributor () |
| void | addCallback (DtSimCommandMessageType cmdType, DtSimCommandCallbackFcn fcn, void *usrData) |
| void | removeCallback (DtSimCommandMessageType cmdType, DtSimCommandCallbackFcn fcn, void *usrData) |
| void | invokeCallbacks (const DtSimCommand &simCmd) |
Protected Member Functions | |
| DtSimCommandDistributor (const DtSimCommandDistributor &orig) | |
| DtSimCommandDistributor & | operator= (const DtSimCommandDistributor &orig) |
Protected Attributes | |
| tbb::spin_rw_mutex | mySimCommandCallbacksMutex |
| DtSimCallbackListMap | mySimCommandCallbacks |
| typedef DtSimCommandCallbackList::DtCallbackFunctionType DtSimCommandDistributor::DtSimCommandCallbackFcn |
| typedef std::map<DtSimCommandMessageType, DtSimCommandCallbackList> DtSimCommandDistributor::DtSimCallbackListMap |
| DtSimCommandDistributor::DtSimCommandDistributor | ( | ) |
default constructor
|
virtual |
destructor
|
protected |
copy constructor not implemented
| void DtSimCommandDistributor::addCallback | ( | DtSimCommandMessageType | cmdType, |
| DtSimCommandCallbackFcn | fcn, | ||
| void * | usrData | ||
| ) |
Adds a new callback for the specified command type.
| void DtSimCommandDistributor::removeCallback | ( | DtSimCommandMessageType | cmdType, |
| DtSimCommandCallbackFcn | fcn, | ||
| void * | usrData | ||
| ) |
Removes the specified callback for the given command type.
| void DtSimCommandDistributor::invokeCallbacks | ( | const DtSimCommand & | simCmd | ) |
Invokes all the callbacks registered for the command type of the given sim command.
|
protected |
assignment operator not implemented
|
protected |
|
protected |