VR-Forces 4.0.4 Class Documentation
Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions
DtSetDataManager Class Reference

This class manages the distribution of DtSetDataRequests within a single DtVrfObject. More...

List of all members.

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
DtSimBaseRadioradio ()
 radio accessor
const DtSimBaseRadioradio () 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
DtSimBaseRadiomyRadio

Private Member Functions

 DtSetDataManager ()
 Not Implemented.
 DtSetDataManager (const DtSetDataManager &orig)
 Not Implemented.
DtSetDataManageroperator= (const DtSetDataManager &orig)
 Not Implemented.

Detailed Description

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.


Member Typedef Documentation

typedef std::pair<DtMessageCallbackFcn, void*> DtSetDataManager::DtSetDataCallbackInfo [protected]
typedef std::multimap<int, DtSetDataCallbackInfo > DtSetDataManager::DtSetDataCallbackMap [protected]

Constructor & Destructor Documentation

Not Implemented.

Not Implemented.

Constructor.

virtual DtSetDataManager::~DtSetDataManager ( ) [virtual]

Destructor.


Member Function Documentation

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.

Note:
All set data types registered with this method will be reported as "capable" set data types by the capableSetDataTypes() method.
Multiple callbacks are allowed for a single set data type.
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.

Note:
Set data types registered with this method will not be reported as "capable" set data types by the capableSetDataTypes() method, unless there is also a callback registered for the same type with addSetDataProcessorCallback().
Multiple callbacks are allowed for a single set data type.
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]
Returns:
A vector containing all the set data types that this object is capable of performing. This is based on any callbacks that have been registered using addSetDataProcessorCallback().

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.


Member Data Documentation

Referenced by radio().


The documentation for this class was generated from the following file:

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)