VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
DtExtAggregateStateRepository Class Reference

DtExtAggregateStateRepository class extends the DtExtAggregateBaseStateRepository to be able to handle extended attributes.

Inheritance diagram for DtExtAggregateStateRepository:
Inheritance graph
[legend]

Classes

struct  PropertyDecoderInfo
 
struct  PropertyEncoderInfo
 

Public Types

typedef void(* PropertyDecoder )(const char *buffer, unsigned size, int version, void *usr)
 
typedef void(* PropertyEncoder )(std::vector< char > &buffer, void *usr)
 

Public Member Functions

 DtExtAggregateStateRepository ()
 
virtual ~DtExtAggregateStateRepository ()
 
 DtExtAggregateStateRepository (const DtExtAggregateStateRepository &orig)
 
virtual bool isInitialized () const
 
DtExtAggregateStateRepositoryoperator= (const DtExtAggregateStateRepository &orig)
 
virtual DtStateRepositoryclone (bool copy=false) const
 
virtual int compare (const DtExtAggregateStateRepository *rhs)
 
virtual const DtRwPropertiesstateProperties () const
 
virtual const DtRwPropertiesparameterProperties () const
 
virtual void setUuidString (const DtString &uuidStr)
 
virtual DtString uuidString () const
 
void mapPropertiesToRecordTypes (const DtRwProperties *properties, std::map< unsigned, DtString > &recTypesToAttrNames)
 
virtual void updateExtensions ()
 
virtual bool updatePropertiesFromAttributes (bool updatesOnly=true)
 
virtual void updateAttributesFromProperties ()
 
virtual void addPropertyDecoder (const DtString &propName, PropertyDecoder decoder, void *usr)
 
virtual void addPropertyEncoder (const DtString &propName, PropertyEncoder encoder, void *usr)
 
virtual void removePropertyEncodersAndDecoders ()
 
virtual bool createVrfObjectDataMessage ()
 
virtual void giveOwernshipOfProperties ()
 
virtual DtTime lastPropertyEncodeTime () const
 
virtual DtTime lastPropertyDecodeTime () const
 
Initialization functions. One of these must be called to support extended attributes.

Initializes the state rep with state properties and parameter properties that have have already been initialized. This can be more efficient if you are maintaining the properties lists elsewhere and want updates to be decoded directly into those lists. Does not take ownership of these properties. They must be deleted elsewhere.

virtual void initialize (DtRwProperties *stateProps, DtRwProperties *paramProps)
 
virtual void initialize (const DtRwProperties &stateProps, const DtRwProperties &paramProps)
 
virtual void initialize ()
 
virtual bool sensorsKilled () const
 
virtual void setSensorsKilled (bool killed)
 
virtual void addPropertyUpdatedCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData)
 
virtual void removePropertyUpdatedCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData)
 
- Public Member Functions inherited from DtExtAggregateBaseStateRepository
 DtExtAggregateBaseStateRepository ()
 
virtual ~DtExtAggregateBaseStateRepository ()
 
 DtExtAggregateBaseStateRepository (const DtExtAggregateBaseStateRepository &orig)
 
DtExtAggregateBaseStateRepositoryoperator= (const DtExtAggregateBaseStateRepository &orig)
 
virtual int compare (const DtExtAggregateBaseStateRepository *rhs)
 
virtual int compareToMostRecent ()
 
virtual bool locationsDifferent (bool updateIfDifferent)
 
virtual DtString extendedData (const DtString &key) const
 
const DtVrfExtendedRecordDataextendedRecordData () const
 
DtVrfExtendedRecordDataextendedRecordData ()
 
virtual void addEntity (const DtBaseEntityStateRepository *)
 
virtual void removeEntity (const DtBaseEntityStateRepository *)
 
virtual void addAggregate (const DtBaseEntityStateRepository *)
 
virtual void removeAggregate (const DtBaseEntityStateRepository *)
 
virtual void addSubordinate (const DtEntityIdentifier &)
 
virtual void removeSubordinate (const DtEntityIdentifier &)
 
virtual void setExtendedData (const std::map< DtString, DtString > &ed)
 
virtual void setExtendedData (const DtString &key, const DtString &value)
 
virtual int numVrfVariableDatumRecords () const
 
virtual bool getUserVariableDatum (int userRecordNumber, DtVariableDatumRecord &rec)
 
virtual bool setUserVariableDatum (int userRecordNumber, const DtVariableDatumRecord &record)
 
virtual void updateDataRecords ()
 
int appearance () const
 
void setAppearance (int)
 
const std::vector
< DtEntityIdentifier > & 
orderedSubordinates () const
 
virtual void setOrderedSubordinates (const std::vector< DtEntityIdentifier > &)
 
virtual void setSendVrfObjectDataRecord (bool shouldSend)
 
virtual bool shouldSendVrfObjectDataRecord () const
 
virtual DtString formationName () const
 
virtual void setFormationName (const DtString &formationName)
 
- Public Member Functions inherited from DtVrfExtensions
 DtVrfExtensions ()
 
virtual ~DtVrfExtensions ()
 
 DtVrfExtensions (const DtVrfExtensions &orig)
 
DtVrfExtensionsoperator= (const DtVrfExtensions &orig)
 
virtual const DtStringname () const
 
virtual void setName (const DtString &n)
 
virtual const DtStringvrfObjectLabel () const
 
virtual void setVrfObjectLabel (const DtString &l)
 
virtual const DtStringechelonId () const
 
virtual void setEchelonId (const DtString &l)
 
virtual const DtStringoverlayParent () const
 
virtual void setOverlayParent (const DtString &l)
 
virtual bool isVrfSimulated () const
 
virtual void setIsVrfSimulated (bool vrf)
 
virtual DtU32 vrfSessionId () const
 
virtual void setVrfSessionId (DtU32 id)
 
virtual void setVrfMessageVersionSupported (DtU32 id)
 
virtual DtU32 vrfMessageVersionSupported () const
 
virtual void setObjectType (const DtObjectType &)
 
virtual const DtObjectTypeobjectType () const
 
virtual void setIsSubordinateOfForce (bool b)
 
virtual bool isSubordinateOfForce () const
 
virtual int superType () const
 
virtual void setHasPlan (bool yesNo)
 
virtual bool hasPlan () const
 
virtual void setIsCurrentlyTasked (bool yesNo)
 
virtual bool isCurrentlyTasked () const
 
virtual void setRulesOfEngagement (const DtString &)
 
virtual const DtStringrulesOfEngagement () const
 
virtual bool setupFromVrfObjectData (const DtIfVrfObjectData &data)
 
virtual void addRangeItem (const DtRangeItem &)
 
virtual void removeRangeItem (int index)
 
virtual void setRangeItems (const DtRangeItems &)
 
const DtRangeItemsrangeItems () const
 
virtual DtIfVrfObjectDatavrfObjectDataMessage () const
 
virtual void setIndependentlyTasked (bool yesNo)
 
virtual bool independentlyTasked () const
 
virtual void setUnderFire (bool yesNo)
 
virtual bool underFire () const
 
virtual void setExecutingPlan (bool yesNo)
 
virtual bool executingPlan () const
 
virtual const std::map
< DtString, DtString > & 
extendedData () const
 
virtual void setBoundingVolume (const DtVector32 &)
 
virtual const DtVector32 & boundingVolume () const
 
virtual void setBoundingVolumeOffset (const DtVector32 &)
 
virtual const DtVector32 & boundingVolumeOffset () const
 

Static Public Member Functions

static
DtExtAggregateStateRepository
create ()
 
- Static Public Member Functions inherited from DtExtAggregateBaseStateRepository
static
DtExtAggregateBaseStateRepository
create ()
 
- Static Public Member Functions inherited from DtVrfExtensions
static void setExpectedVrfMessageVersion (DtU32 version)
 
static DtU32 expectedVrfMessageVersion ()
 

Protected Member Functions

virtual void initializeVrfObjectDataProperties ()
 
virtual void encodePropertyIfNeeded (const DtSymbolString &propName, DtReaderWriter *propRw)
 
virtual charencodingBuffer (int size)
 
- Protected Member Functions inherited from DtExtAggregateBaseStateRepository
virtual void extensionModified ()
 

Protected Attributes

DtRwPropertiesmyStateProperties
 
DtRwPropertiesmyParameterProperties
 
bool myOwnsProperties
 
bool myIsInitialized
 
std::list< PropertyDecoderInfomyAdditionalDecoders
 
std::list< PropertyEncoderInfomyAdditionalEncoders
 
std::vector< charmyPropertyBuffer
 
DtClock myClock
 
DtTime myLastEncodeTime
 
DtTime myLastDecodeTime
 
bool mySensorsKilled
 
bool myReceivedVrfObjectDataVersion
 
bool myReceivedVrfPropertyVersion
 
int myPropertyVersion
 
DtString myUUIDString
 
DtRangeItems myRangeItemsCache
 
DtNoArgumentCallbackList myPropertyUpdatedCallbacks
 
- Protected Attributes inherited from DtExtAggregateBaseStateRepository
DtExtAggregateBaseStateRepositorymyLastCopy
 
DtAggregateExtendedRecordData myExtendedRecordData
 
int myAppearance
 
std::vector< DtEntityIdentifier > myOrderedSubordinates
 
charmySubordinateBuffer
 
int myBitLength
 
bool myRecordModified
 
DtString myFormationName
 
bool mySendVrfObjectDataRec
 
- Protected Attributes inherited from DtVrfExtensions
DtString myName
 
DtIfVrfObjectDatamyVrfObjectDataMessage
 

Additional Inherited Members

- Static Protected Attributes inherited from DtVrfExtensions
static DtU32 theExpectedVrfMessageVersion
 

Member Typedef Documentation

typedef void(* DtExtAggregateStateRepository::PropertyDecoder)(const char *buffer, unsigned size, int version, void *usr)
typedef void(* DtExtAggregateStateRepository::PropertyEncoder)(std::vector< char > &buffer, void *usr)

Constructor & Destructor Documentation

DtExtAggregateStateRepository::DtExtAggregateStateRepository ( )

default constructor

virtual DtExtAggregateStateRepository::~DtExtAggregateStateRepository ( )
virtual

destructor

DtExtAggregateStateRepository::DtExtAggregateStateRepository ( const DtExtAggregateStateRepository orig)

copy constructor

Member Function Documentation

virtual void DtExtAggregateStateRepository::initialize ( DtRwProperties stateProps,
DtRwProperties paramProps 
)
virtual

Initializes the state rep by making a copy of the given state properties and parameter properties that have have already been initialized. Maintains ownership of the new properties and will delete them on destruction.

virtual void DtExtAggregateStateRepository::initialize ( const DtRwProperties stateProps,
const DtRwProperties paramProps 
)
virtual

Initializes the state rep by making a copy of the given state properties and parameter properties that have have already been initialized. Maintains ownership of the new properties and will delete them on destruction.

virtual void DtExtAggregateStateRepository::initialize ( )
virtual

Initializes the state rep without any state or parameter properties. No properties will be processed unless you add a specific property encoder or decoder using addPropertyEncoder or addPropertyDecoder.

virtual bool DtExtAggregateStateRepository::isInitialized ( ) const
virtual

Returns true if one of the initialize() functions has been called.

DtExtAggregateStateRepository& DtExtAggregateStateRepository::operator= ( const DtExtAggregateStateRepository orig)

assignment operator

virtual DtStateRepository* DtExtAggregateStateRepository::clone ( bool  copy = false) const
virtual

Return a copy/empty object of the same type as this.

Reimplemented from makVrfVrlinkExtToolkit::DtStateRepositoryWithExtendedAttributes< DtExtAggregateBaseStateRepository >.

virtual int DtExtAggregateStateRepository::compare ( const DtExtAggregateStateRepository rhs)
virtual

Compares us against the supplied state repository and returns what's changed.

virtual const DtRwProperties& DtExtAggregateStateRepository::stateProperties ( ) const
inlinevirtual
virtual const DtRwProperties& DtExtAggregateStateRepository::parameterProperties ( ) const
inlinevirtual
virtual void DtExtAggregateStateRepository::setUuidString ( const DtString uuidStr)
virtual
virtual DtString DtExtAggregateStateRepository::uuidString ( ) const
virtual

Returns a string version of the VRF UUID of this object, if it can be determined. VRF has multiple ways of sending the UUID. This method only works when the UUID is sent via the object's extendedData. If sent by other means, such as using state properties (which is the default in 4.6 and later), the returned string will be empty.

Reimplemented from DtExtAggregateBaseStateRepository.

virtual bool DtExtAggregateStateRepository::sensorsKilled ( ) const
virtual

Functions for accessing the sensors killed state.

virtual void DtExtAggregateStateRepository::setSensorsKilled ( bool  killed)
virtual

Functions for accessing the sensors killed state.

void DtExtAggregateStateRepository::mapPropertiesToRecordTypes ( const DtRwProperties properties,
std::map< unsigned, DtString > &  recTypesToAttrNames 
)

Maps properties to DIS record types, if configured. Called from constructors.

static DtExtAggregateStateRepository* DtExtAggregateStateRepository::create ( )
static
virtual void DtExtAggregateStateRepository::updateExtensions ( )
virtual

Overridden to update property data.

Reimplemented from DtExtAggregateBaseStateRepository.

virtual bool DtExtAggregateStateRepository::updatePropertiesFromAttributes ( bool  updatesOnly = true)
virtual

Updates properties with new data from the extended attributes. Used to update properties after receiving an object update. If updatesOnly is true (default), only attributes updated since last property update will be processed. Returns true if any properties were updated.

virtual void DtExtAggregateStateRepository::updateAttributesFromProperties ( )
virtual

Updates extended attributes from our properties. Used to update attributes before publishing an object update.

virtual void DtExtAggregateStateRepository::addPropertyDecoder ( const DtString propName,
PropertyDecoder  decoder,
void *  usr 
)
virtual

Adds an additional property and a function that to decode it. Can be used to extend this class to look for additional properties that are not defined in the parameter database for the entity. Is also used by default for VRF object data. Properties will be decoded in the order in which the decoders are added to the list.

virtual void DtExtAggregateStateRepository::addPropertyEncoder ( const DtString propName,
PropertyEncoder  encoder,
void *  usr 
)
virtual

Adds an additional property and a function that to encode it. Can be used to extend this class to look for additional properties that are not defined in the parameter database for the entity. Is also used by default for VRF object data. Properties will be encoded in the order in which the encoders are added to the list.

virtual void DtExtAggregateStateRepository::removePropertyEncodersAndDecoders ( )
virtual

Removes all additional property encoders and decoders.

virtual bool DtExtAggregateStateRepository::createVrfObjectDataMessage ( )
virtual

Allocates myVrfObjectDataMessage, a DtIfVrfObjectData used by VR-Forces as extended VRF object data message information. Overrides the default version to create a DtIfVrfObjectDataStateProperties, which can be more efficiently updated from state properties.

Reimplemented from DtVrfExtensions.

virtual void DtExtAggregateStateRepository::giveOwernshipOfProperties ( )
virtual

Tells the state rep to take ownership of the state and parameter properties, giving it responsibility to delete them on destruction.

virtual DtTime DtExtAggregateStateRepository::lastPropertyEncodeTime ( ) const
inlinevirtual

Last time properties were encoded.

virtual DtTime DtExtAggregateStateRepository::lastPropertyDecodeTime ( ) const
inlinevirtual

Last time properties were decoded.

virtual void DtExtAggregateStateRepository::addPropertyUpdatedCallback ( DtNoArgumentCallbackList::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just after state and parameter properties have been updated when the parameter or state properties have been updated.

virtual void DtExtAggregateStateRepository::removePropertyUpdatedCallback ( DtNoArgumentCallbackList::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just after state and parameter properties have been updated when the parameter or state properties have been updated.

virtual void DtExtAggregateStateRepository::initializeVrfObjectDataProperties ( )
protectedvirtual

Initializes the state rep to handle VRF object data properties.

virtual void DtExtAggregateStateRepository::encodePropertyIfNeeded ( const DtSymbolString propName,
DtReaderWriter propRw 
)
protectedvirtual

Encode a particular property if an update is needed.

virtual char* DtExtAggregateStateRepository::encodingBuffer ( int  size)
protectedvirtual

Get a buffer for encoding properties.

Member Data Documentation

DtRwProperties* DtExtAggregateStateRepository::myStateProperties
protected
DtRwProperties* DtExtAggregateStateRepository::myParameterProperties
protected
bool DtExtAggregateStateRepository::myOwnsProperties
protected
bool DtExtAggregateStateRepository::myIsInitialized
protected
std::list<PropertyDecoderInfo> DtExtAggregateStateRepository::myAdditionalDecoders
protected
std::list<PropertyEncoderInfo> DtExtAggregateStateRepository::myAdditionalEncoders
protected
std::vector<char> DtExtAggregateStateRepository::myPropertyBuffer
protected
DtClock DtExtAggregateStateRepository::myClock
protected
DtTime DtExtAggregateStateRepository::myLastEncodeTime
protected
DtTime DtExtAggregateStateRepository::myLastDecodeTime
protected
bool DtExtAggregateStateRepository::mySensorsKilled
protected
bool DtExtAggregateStateRepository::myReceivedVrfObjectDataVersion
protected
bool DtExtAggregateStateRepository::myReceivedVrfPropertyVersion
protected
int DtExtAggregateStateRepository::myPropertyVersion
mutableprotected
DtString DtExtAggregateStateRepository::myUUIDString
mutableprotected
DtRangeItems DtExtAggregateStateRepository::myRangeItemsCache
mutableprotected
DtNoArgumentCallbackList DtExtAggregateStateRepository::myPropertyUpdatedCallbacks
protected

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

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)