![]() |
VR-Forces 4.0.4 Class Documentation
|
This class manages the distribution of DtSetDataRequests within a single DtVrfObject. More...
Public Member Functions | |
| DtSetDataManager (DtSimBaseRadio *radio) | |
| Constructor. | |
| virtual | ~DtSetDataManager () |
| Destructor. | |
| virtual bool | init () |
| Must be called after constructor. | |
| virtual bool | init (DtSimBaseRadio *pRadio) |
| Override. | |
| virtual void | addSetDataProcessorCallback (int setDataType, DtMessageCallbackFcn fcn, void *usr) |
| Add a callback to be called when a new set data request is being executed. | |
| virtual void | addSetDataNotifyCallback (int setDataType, DtMessageCallbackFcn fcn, void *usr) |
| Add a callback to be called when a new set data request is being executed. | |
| virtual void | removeSetDataCallback (int setDataType, DtMessageCallbackFcn fcn, void *usr) |
| Removes any callback that was added using either addSetDataProcessorCallback() or addSetDataNotifyCallback(). | |
| virtual void | executeSetDataRequest (const DtSetDataRequestMessage &setMsg) |
| Invokes all registered callbacks with the specified set data message. | |
| virtual std::vector< int > | capableSetDataTypes () const |
| DtSimBaseRadio * | radio () |
| radio accessor | |
| const DtSimBaseRadio * | radio () const |
| radio accessor | |
Protected Types | |
| typedef std::pair < DtMessageCallbackFcn, void * > | DtSetDataCallbackInfo |
| typedef std::multimap< int, DtSetDataCallbackInfo > | DtSetDataCallbackMap |
Protected Member Functions | |
| virtual void | registerRadioMessageCallbacks () |
| Registers setDataMessageCallback for all set data requests from the radio. | |
| virtual void | unRegisterRadioMessageCallbacks () |
| Unregisters setDataMessageCallback for all set data requests from the radio. | |
Static Protected Member Functions | |
| static void | setDataMessageCallback (DtSimMessage *msg, void *usr) |
| Calls to the local instance's executeSetDataRequest. | |
Protected Attributes | |
| DtSetDataCallbackMap | mySetDataProcessorCallbackMap |
| DtSetDataCallbackMap | mySetDataNotifyCallbackMap |
| DtSimBaseRadio * | myRadio |
Private Member Functions | |
| DtSetDataManager () | |
| Not Implemented. | |
| DtSetDataManager (const DtSetDataManager &orig) | |
| Not Implemented. | |
| DtSetDataManager & | operator= (const DtSetDataManager &orig) |
| Not Implemented. | |
This class manages the distribution of DtSetDataRequests within a single DtVrfObject.
Components of the object, or other parts of the code, register interested in particular types of set data messages and when such a message is processed by the DtSetDataManager, each of the registered parties is notified.
The DtSetDataManager registers itself with the local entity's radio and listens for any incoming radio messages that contain set data requests and distributes these. Set data requests can also be manually inserted into the manger using the executeSetDataRequest() method. This is the standard way of getting an object to process a set data request.
The DtSetDataManager will also respond to queries about what set data types are currently possible by the object. It returns a list of all set data type IDs that have been registered for.
typedef std::pair<DtMessageCallbackFcn, void*> DtSetDataManager::DtSetDataCallbackInfo [protected] |
typedef std::multimap<int, DtSetDataCallbackInfo > DtSetDataManager::DtSetDataCallbackMap [protected] |
| DtSetDataManager::DtSetDataManager | ( | ) | [private] |
Not Implemented.
| DtSetDataManager::DtSetDataManager | ( | const DtSetDataManager & | orig | ) | [private] |
Not Implemented.
| DtSetDataManager::DtSetDataManager | ( | DtSimBaseRadio * | radio | ) |
Constructor.
| virtual DtSetDataManager::~DtSetDataManager | ( | ) | [virtual] |
Destructor.
| DtSetDataManager& DtSetDataManager::operator= | ( | const DtSetDataManager & | orig | ) | [private] |
Not Implemented.
| virtual bool DtSetDataManager::init | ( | ) | [virtual] |
Must be called after constructor.
| virtual bool DtSetDataManager::init | ( | DtSimBaseRadio * | pRadio | ) | [virtual] |
Override.
If constructor is called with NULL radio, setDataManager must be reinitialized. Disconnects from previous radio before connecting.
| virtual void DtSetDataManager::addSetDataProcessorCallback | ( | int | setDataType, |
| DtMessageCallbackFcn | fcn, | ||
| void * | usr | ||
| ) | [virtual] |
Add a callback to be called when a new set data request is being executed.
The registering function should actually carry out the set in whatever way is appropriate for the particular set message.
| virtual void DtSetDataManager::addSetDataNotifyCallback | ( | int | setDataType, |
| DtMessageCallbackFcn | fcn, | ||
| void * | usr | ||
| ) | [virtual] |
Add a callback to be called when a new set data request is being executed.
The registering function should not actually carry out the set, but just be using it as notification for some internal purposes.
| virtual void DtSetDataManager::removeSetDataCallback | ( | int | setDataType, |
| DtMessageCallbackFcn | fcn, | ||
| void * | usr | ||
| ) | [virtual] |
Removes any callback that was added using either addSetDataProcessorCallback() or addSetDataNotifyCallback().
| virtual void DtSetDataManager::executeSetDataRequest | ( | const DtSetDataRequestMessage & | setMsg | ) | [virtual] |
Invokes all registered callbacks with the specified set data message.
| virtual std::vector<int> DtSetDataManager::capableSetDataTypes | ( | ) | const [virtual] |
| DtSimBaseRadio * DtSetDataManager::radio | ( | ) | [inline] |
radio accessor
References myRadio.
| const DtSimBaseRadio * DtSetDataManager::radio | ( | ) | const [inline] |
radio accessor
References myRadio.
| virtual void DtSetDataManager::registerRadioMessageCallbacks | ( | ) | [protected, virtual] |
Registers setDataMessageCallback for all set data requests from the radio.
| virtual void DtSetDataManager::unRegisterRadioMessageCallbacks | ( | ) | [protected, virtual] |
Unregisters setDataMessageCallback for all set data requests from the radio.
| static void DtSetDataManager::setDataMessageCallback | ( | DtSimMessage * | msg, |
| void * | usr | ||
| ) | [static, protected] |
Calls to the local instance's executeSetDataRequest.
DtSimBaseRadio* DtSetDataManager::myRadio [protected] |
Referenced by radio().