![]() |
VR-Forces 4.1 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 (const DtSetMessageType &setDataType, DtMessageCallbackFcn fcn, void *usr) |
| Add a callback to be called when a new set data request is being executed. | |
| virtual void | addSetDataNotifyCallback (const DtSetMessageType &setDataType, DtMessageCallbackFcn fcn, void *usr) |
| Add a callback to be called when a new set data request is being executed. | |
| virtual void | removeSetDataCallback (const DtSetMessageType &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 < DtSetMessageType > | capableSetDataTypes () const |
| DtSimBaseRadio * | radio () |
| radio accessor | |
| const DtSimBaseRadio * | radio () const |
| radio accessor | |
Protected Types | |
| typedef std::pair < DtMessageCallbackFcn, void * > | DtSetDataCallbackInfo |
| typedef std::multimap < DtSetMessageType, 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.
|
protected |
|
protected |
|
private |
Not Implemented.
|
private |
Not Implemented.
| DtSetDataManager::DtSetDataManager | ( | DtSimBaseRadio * | radio | ) |
Constructor.
|
virtual |
Destructor.
|
private |
Not Implemented.
|
virtual |
Must be called after constructor.
|
virtual |
Override.
If constructor is called with NULL radio, setDataManager must be reinitialized. Disconnects from previous radio before connecting.
|
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 |
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 |
Removes any callback that was added using either addSetDataProcessorCallback() or addSetDataNotifyCallback().
|
virtual |
Invokes all registered callbacks with the specified set data message.
|
virtual |
|
inline |
radio accessor
References myRadio.
|
inline |
radio accessor
References myRadio.
|
protectedvirtual |
Registers setDataMessageCallback for all set data requests from the radio.
|
protectedvirtual |
Unregisters setDataMessageCallback for all set data requests from the radio.
|
staticprotected |
Calls to the local instance's executeSetDataRequest.
|
protected |
|
protected |
|
protected |
Referenced by radio().