![]() |
VR-Forces 5.0.3 Developer's Guide
|
This class manages the distribution of DtSetDataRequests within a single DtLocalObject. 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.
Public Member Functions | |
| DtSetDataManager (DtLocalObject *, DtSimRadio *radio) | |
| virtual | ~DtSetDataManager () |
| virtual bool | init () |
| virtual bool | init (DtSimRadio *pRadio) |
| virtual void | addSetDataProcessorCallback (const DtSetMessageType &setDataType, DtMessageCallbackFcn fcn, void *usr) |
| virtual void | addSetDataNotifyCallback (const DtSetMessageType &setDataType, DtMessageCallbackFcn fcn, void *usr) |
| virtual void | removeSetDataCallback (const DtSetMessageType &setDataType, DtMessageCallbackFcn fcn, void *usr) |
| virtual void | processSetEvent (const makVrfEvents::DtEvent &) |
| virtual bool | executeSetDataRequest (const DtSetDataRequestMessage &setMsg) |
| virtual std::vector < DtSetMessageType > | capableSetDataTypes () const |
| virtual bool | canExecuteSetData (const DtSetMessageType &setDataType) const |
| virtual void | tick () |
| DtSimRadio * | radio () |
| const DtSimRadio * | radio () const |
Protected Types | |
| typedef std::pair < DtMessageCallbackFcn, void * > | DtSetDataCallbackInfo |
| typedef std::multimap < DtSetMessageType, DtSetDataCallbackInfo > | DtSetDataCallbackMap |
Protected Member Functions | |
| virtual void | registerRadioMessageCallbacks () |
| virtual void | unRegisterRadioMessageCallbacks () |
| virtual DtSetMessageType | remapScriptId (const DtSetMessageType &) const |
Static Protected Member Functions | |
| static void | setDataMessageCallback (DtSimMessage *msg, void *usr) |
Protected Attributes | |
| DtSetDataCallbackMap | mySetDataProcessorCallbackMap |
| DtSetDataCallbackMap | mySetDataNotifyCallbackMap |
| DtSimRadio * | myRadio |
| DtLocalObject * | myVrfObject |
| boost::signals2::scoped_connection | mySetEventConnection |
| std::vector < DtSetDataRequestMessage * > | myDelayedSetExecution |
Private Member Functions | |
| DtSetDataManager () | |
| DtSetDataManager (const DtSetDataManager &orig) | |
| DtSetDataManager & | operator= (const DtSetDataManager &orig) |
|
protected |
|
protected |
|
private |
Not Implemented.
|
private |
Not Implemented.
| DtSetDataManager::DtSetDataManager | ( | DtLocalObject * | , |
| DtSimRadio * | 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 |
Processes the set event by wrapping it in a DtSetDataRequestMessage if this set is meant for this object and calling executeSetDataRequest.
|
virtual |
Invokes all registered callbacks with the specified set data message. Return true if handled.
|
virtual |
|
virtual |
|
virtual |
Process any delayed set executions.
|
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.
|
protectedvirtual |
In case this is aliased, return the actual script id.
|
protected |
|
protected |
|
protected |
Referenced by radio().
|
protected |
|
protected |
|
protected |