VR-Forces 4.6.1 Class Documentation
 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 | Static Protected Attributes
DtExtendedPropertiesControlObjectStateRepository Class Reference

DtExtendedPropertiesControlObjectStateRepository class will interface with extended published data and parameter database and properties list to transfer network extended data to DtRwProperties. More...

Inheritance diagram for DtExtendedPropertiesControlObjectStateRepository:
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

 DtExtendedPropertiesControlObjectStateRepository ()
 default constructor
virtual ~DtExtendedPropertiesControlObjectStateRepository ()
 destructor
 DtExtendedPropertiesControlObjectStateRepository (const DtExtendedPropertiesControlObjectStateRepository &orig)
 copy constructor
virtual bool isInitialized () const
 Returns true if one of the initialize() functions has been called.
DtExtendedPropertiesControlObjectStateRepositoryoperator= (const DtExtendedPropertiesControlObjectStateRepository &orig)
 assignment operator
virtual DtStateRepositoryclone (bool copy=false) const
 Return a copy/empty object of the same type as this.
virtual int compare (const DtControlObjectRepository *rhs)
 Compares us against the supplied state repository and returns what's changed.
const DtRwPropertiesstateProperties () const
const DtRwPropertiesparameterProperties () const
virtual DtString uuidString () const
 Returns a string version of the VRF UUID of this object, if it can be determined.
void mapPropertiesToRecordTypes (const DtRwProperties *properties, std::map< unsigned, DtString > &recTypesToAttrNames)
 Maps properties to DIS record types, if configured. Called from constructors.
virtual void updateExtensions ()
 Overridden to update property data.
virtual bool updatePropertiesFromAttributes (bool updatesOnly=true)
 Updates properties with new data from the extended attributes.
virtual void updateAttributesFromProperties ()
 Updates extended attributes from our properties.
virtual void addPropertyDecoder (const DtString &propName, PropertyDecoder decoder, void *usr)
 Adds an additional property and a function that to decode it.
virtual void addPropertyEncoder (const DtString &propName, PropertyEncoder encoder, void *usr)
 Adds an additional property and a function that to encode it.
virtual bool createVrfObjectDataMessage ()
 Allocates myVrfObjectDataMessage, a DtIfVrfObjectData used by VR-Forces as extended VRF object data message information.
virtual void giveOwernshipOfProperties ()
 Tells the state rep to take ownership of the state and parameter properties, giving it responsibility to delete them on destruction.
virtual DtTime lastPropertyEncodeTime () const
 Last time properties were encoded.
virtual DtTime lastPropertyDecodeTime () const
 Last time properties were decoded.
virtual void initialize (DtVrfParameterDb *)
 Initialization functions.
virtual void initialize (DtRwProperties *stateProps, DtRwProperties *paramProps)
 Initializes the state rep with state properties and parameter properties that have have already been initialized.
virtual void initialize ()
 Initializes the state rep without any state or parameter properties.
virtual DtUUID uuid () const
 Convenience functions for accessing the VRF UUID.
virtual void setUuid (const DtUUID &uuid)
- Public Member Functions inherited from DtControlObjectRepository
 DtControlObjectRepository ()
virtual ~DtControlObjectRepository ()
 DtControlObjectRepository (const DtControlObjectRepository &orig)
DtControlObjectRepositoryoperator= (const DtControlObjectRepository &orig)
virtual const DtControlObjectKindkind () const
virtual void setKind (const DtControlObjectKind &k)
virtual const
DtControlObjectCategory
category () const
virtual void setCategory (const DtControlObjectCategory &c)
const std::vector< DtVector > & vertexList () const
virtual int compareToMostRecent ()
virtual bool locationsDifferent (bool updateIfDifferent)
virtual void emptyVertexList ()
virtual void getBoundingVolume (DtVector &location, double &radius) const
const DtGeometricDataListgeometricRecords () const
bool geometricRecordsChanged () const
void clearGeometricRecordsChanged ()
virtual void updateDataRecords ()
virtual int numberOfSubordinates () const
virtual bool getSubordinate (int i, DtGlobalObjectDesignator &d)
virtual const
DtGlobalObjectDesignatorList & 
subordinates () const
virtual
DtGlobalObjectDesignatorList & 
subordinates ()
virtual void setExtendedData (const std::map< DtString, DtString > &ed)
 Sets extended data for transport via extended data records.
virtual void setExtendedData (const DtString &key, const DtString &value)
virtual double orientation () const
 Returns the orientation of the given environmental in radians.
virtual void setVertices (const DtList &pnt)
virtual void appendVertex (const DtVector &)
virtual void setVertex (int i, const DtVector &)
virtual void removeVertex (int i)
virtual void setObjectType (const DtObjectType &)
virtual DtForceType forceType () const
virtual void setForceType (DtForceType i)
virtual int color () const
virtual void setColor (int)
virtual const DtStringparent () const
virtual void setParent (const DtString &)
virtual const DtStringuserData () const
virtual void setUserData (const DtString &)
virtual void setVrfObjectName (const DtString &)
virtual const DtStringvrfObjectName ()
virtual DtAppearance appearance () const
virtual void setAppearance (const DtAppearance &app)
virtual void setNumberOfSubordinates (int)
virtual void setSubordinate (int i, const DtGlobalObjectDesignator &)
virtual const
DtGlobalObjectDesignator
hostGlobalId () const
virtual void setHostGlobalId (const DtGlobalObjectDesignator &)
virtual void clearHostGlobalId ()
 Sets host global id to empty string.
virtual bool getFontInformation (DtString &font, int &fontSize) const
 Deals with font and arrow head information via the extended data.
virtual void setFontInformation (const DtString &, int fontSize)
virtual bool getFontColor (unsigned int &color) const
 32 bit AGBR value
virtual void setFontColor (unsigned int color)
virtual bool getArrowInformation (int &arrowHeadPlacement, int &arrowStyle, int &arrowSize) const
virtual void setArrowInformation (int arrowHeadPlacement, int arrowStyle, int arrowSize)
virtual void setBoundingSphereRadius (double)
 Routines that are used to set/get information about the bounding sphere.
virtual double boundingSphereRadius () const
virtual void setBoundingSphereLocation (const DtVector &)
virtual const DtVectorboundingSphereLocation () const
bool hasBoundingSphereRecord () const
bool hasBoundingRectRecord () const
 Routines that are used to set/get information about the bounding rectangle.
virtual void setBoundingExtent (const DtVector &)
const DtVectorboundingExtent () const
virtual void setBoundingCornerLocation (const DtVector &)
virtual const DtVectorboundingCornerLocation () const
virtual void setBoundingOrientation (const DtTaitBryan &)
const DtTaitBryan & boundingOrientation () const
virtual void setProjected (bool)
 Gets/sets additional attribute values about the environmental.
virtual bool projected () const
virtual void setClosedFigure (bool)
virtual bool closedFigure () const
virtual void setBound2D (bool)
virtual bool bound2D () const
virtual void setFillStyle (int)
 For those objects that support it. Note that point objects do not make use of these items.
virtual int fillStyle () const
virtual void setLineStyle (int)
virtual int lineStyle () const
virtual void setLineWidth (int)
virtual int lineWidth () const
virtual void setPhysicalLineHeight (double)
 Height of the line, in meters. When added to the altitude, can be considered a ceiling.
virtual double physicalLineHeight () const
virtual void setPhysicalLineWidth (double)
 Width of the line, in meters. Different than "lineWidth" which is more of a stylistic representation.
virtual double physicalLineWidth () const
virtual void setRelativeLocation (const DtVector &)
 If attached to an entity, the relative position (in body coordinatates) of this object from the origin of the attached object.
virtual const DtVectorrelativeLocation () const
virtual void setVelocity (const DtVector &)
 Unused at this point – left for future possible expansion for movable/rotatable environmentals {
virtual const DtVectorvelocity () const
virtual void setAcceleration (const DtVector &)
virtual const DtVectoracceleration () const
virtual void setDRAlogrithm (DtDeadReckonTypes)
virtual const DtDeadReckonTypes & drAlgorithm () const
virtual void setOffsetPoints (const std::vector< DtVector > &)
virtual const std::vector
< DtVector > & 
offsetPoints () const
virtual void setCachePoints (bool)
 Set cachePoints to false to not cache the points that are set into the structure or read from the network into the myVertexList variable.
bool cachePoints () const
virtual DtString extendedData (const DtString &key) const
 Extended record data is a key/value pair.
const DtVrfExtendedRecordDataextendedRecordData () const
DtVrfExtendedRecordDataextendedRecordData ()
int numberOfDatumRecords () const
void setNumberOfDatumRecords (int)
virtual void setSendVrfObjectDataRecord (bool shouldSend)
 Whether a separate VrfObjectData record should be sent to convey additional VRF object information.
virtual bool shouldSendVrfObjectDataRecord () const
- 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 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 &)
 Adds, removes and returns items in the range item list.
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 &)
 Sets/gets bounding volume and bounding volume offset of an entity.
virtual const DtVector32 & boundingVolume () const
virtual void setBoundingVolumeOffset (const DtVector32 &)
virtual const DtVector32 & boundingVolumeOffset () const

Static Public Member Functions

static
DtExtendedPropertiesControlObjectStateRepository
create ()
 Create a new state repository.
- Static Public Member Functions inherited from DtControlObjectRepository
static void initializePuffFactory ()
static void addToPuffFactory (int iRecordType, DtIttSourceDataCreator fcn)
static DtIttSourceDatacreatePuffRecord (DtNetEnvironmentalRecord *geometric, DtNetEnvironmentalRecord *source)
static DtIttSourceDatacreatePuffRecord (DtNetEnvironmentalRecord *rec)

Protected Member Functions

virtual void initializeVrfObjectDataProperties ()
 Initializes the state rep to handle VRF object data properties.
virtual void encodePropertyIfNeeded (const DtSymbolString &propName, DtReaderWriter *propRw)
 Encode a particular property if an update is needed.
- Protected Member Functions inherited from DtControlObjectRepository
virtual bool createExtendedEnvironmentalStateRecord ()
virtual
DtSimEnvironmentalObjectStateRecord
extendedEnvironmentalStateRecord ()
virtual bool createVrfObjectStateRecord ()
virtual
DtVrfObjectDataEnvironmentalRecord
vrfObjectStateRecord ()
virtual bool createBoundingSphereRecord ()
virtual
DtEnvironmentalBoundingSphereRecord * 
boundingSphereRecord ()
virtual bool createBoundingRectRecord ()
virtual
DtEnvironmentalRectangularVolumeRecord * 
boundingRectRecord ()
virtual void setupKindFromType (const DtEntityType &type)
virtual void getBoundingVolume (EnvGeomSpheriod *rec)
virtual void clearGeometricRecords ()
virtual void extensionModified ()

Protected Attributes

DtRwPropertiesmyStateProperties
DtRwPropertiesmyParameterProperties
DtVrfParameterDbmyParameterDatabase
DtEntityType myLastCheckedEnvType
bool myOwnsProperties
bool myIsInitialized
std::list< PropertyDecoderInfomyAdditionalDecoders
std::list< PropertyEncoderInfomyAdditionalEncoders
std::vector< charmyPropertyBuffer
DtClock myClock
DtTime myLastEncodeTime
DtTime myLastDecodeTime
DtUUID myUUID
std::map< DtString, DtStringmyExtendedDataCache
 May be updated on access from extended data.
DtRangeItems myRangeItemsCache

Static Protected Attributes

static DtRwProperties theEmptyProperties

Additional Inherited Members

- Public Attributes inherited from DtControlObjectRepository
DtControlObjectKind myKind
DtControlObjectCategory myCategory
DtCOVertexList myVertexList
DtSimEnvironmentalObjectStateRecordmyExtEnvStateRecord
DtEnvironmentalBoundingSphereRecord * myBoundingSphereRecord
DtVrfObjectDataEnvironmentalRecordmyVrfObjectStateRecord
DtControlObjectRepositorymyLastCopy
DtEnvironmentalRectangularVolumeRecord * myBoundingRectRecord
DtGeometricDataList myGeometricRecords
bool myGeometricRecordsChanged
bool myNeedVrfObjectDataUpdate
bool myCachePoints
int myPointsSet
DtEnvironmentalProcessExtendedRecordData myExtendedRecordData
bool mySendVrfObjectDataRec
- Static Public Attributes inherited from DtControlObjectRepository
static DtIttSourceDataMap thePuffFactory

Detailed Description

DtExtendedPropertiesControlObjectStateRepository class will interface with extended published data and parameter database and properties list to transfer network extended data to DtRwProperties.

Member Typedef Documentation

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

Constructor & Destructor Documentation

DtExtendedPropertiesControlObjectStateRepository::DtExtendedPropertiesControlObjectStateRepository ( )

default constructor

virtual DtExtendedPropertiesControlObjectStateRepository::~DtExtendedPropertiesControlObjectStateRepository ( )
virtual

destructor

DtExtendedPropertiesControlObjectStateRepository::DtExtendedPropertiesControlObjectStateRepository ( const DtExtendedPropertiesControlObjectStateRepository orig)

copy constructor

Member Function Documentation

virtual void DtExtendedPropertiesControlObjectStateRepository::initialize ( DtVrfParameterDb )
virtual

Initialization functions.

One of these functions must be called before state properties can be used.Initializes the state rep based on a parameter database. State properties and parameter properties will be initialized based on this database and the environment type of the entity.

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

Initializes the state rep with state properties and parameter properties that have have already been initialized.

Does not take ownership of these properties. They must be deleted elsewhere.

virtual void DtExtendedPropertiesControlObjectStateRepository::initialize ( )
virtual

Initializes the state rep without any state or parameter properties.

No properties will be processed unless you add a property encoder or decoder using addPropertyEncoder or addPropertyDecoder.

virtual bool DtExtendedPropertiesControlObjectStateRepository::isInitialized ( ) const
virtual

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

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

assignment operator

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

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

Reimplemented from makVrfVrlinkExtToolkit::DtStateRepositoryWithExtendedAttributes< DtControlObjectRepository >.

virtual int DtExtendedPropertiesControlObjectStateRepository::compare ( const DtControlObjectRepository rhs)
virtual

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

Reimplemented from DtControlObjectRepository.

const DtRwProperties& DtExtendedPropertiesControlObjectStateRepository::stateProperties ( ) const
inline
const DtRwProperties& DtExtendedPropertiesControlObjectStateRepository::parameterProperties ( ) const
inline
virtual DtUUID DtExtendedPropertiesControlObjectStateRepository::uuid ( ) const
virtual

Convenience functions for accessing the VRF UUID.

virtual void DtExtendedPropertiesControlObjectStateRepository::setUuid ( const DtUUID uuid)
virtual
virtual DtString DtExtendedPropertiesControlObjectStateRepository::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 DtControlObjectRepository.

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

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

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

Overridden to update property data.

Reimplemented from DtControlObjectRepository.

virtual bool DtExtendedPropertiesControlObjectStateRepository::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 DtExtendedPropertiesControlObjectStateRepository::updateAttributesFromProperties ( )
virtual

Updates extended attributes from our properties.

Used to update attributes before publishing an object update.

virtual void DtExtendedPropertiesControlObjectStateRepository::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 DtExtendedPropertiesControlObjectStateRepository::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 bool DtExtendedPropertiesControlObjectStateRepository::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 DtExtendedPropertiesControlObjectStateRepository::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 DtExtendedPropertiesControlObjectStateRepository::lastPropertyEncodeTime ( ) const
inlinevirtual

Last time properties were encoded.

virtual DtTime DtExtendedPropertiesControlObjectStateRepository::lastPropertyDecodeTime ( ) const
inlinevirtual

Last time properties were decoded.

virtual void DtExtendedPropertiesControlObjectStateRepository::initializeVrfObjectDataProperties ( )
protectedvirtual

Initializes the state rep to handle VRF object data properties.

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

Encode a particular property if an update is needed.

Member Data Documentation

DtRwProperties* DtExtendedPropertiesControlObjectStateRepository::myStateProperties
protected
DtRwProperties* DtExtendedPropertiesControlObjectStateRepository::myParameterProperties
protected
DtVrfParameterDb* DtExtendedPropertiesControlObjectStateRepository::myParameterDatabase
protected
DtEntityType DtExtendedPropertiesControlObjectStateRepository::myLastCheckedEnvType
protected
bool DtExtendedPropertiesControlObjectStateRepository::myOwnsProperties
protected
bool DtExtendedPropertiesControlObjectStateRepository::myIsInitialized
protected
std::list<PropertyDecoderInfo> DtExtendedPropertiesControlObjectStateRepository::myAdditionalDecoders
protected
std::list<PropertyEncoderInfo> DtExtendedPropertiesControlObjectStateRepository::myAdditionalEncoders
protected
std::vector<char> DtExtendedPropertiesControlObjectStateRepository::myPropertyBuffer
protected
DtClock DtExtendedPropertiesControlObjectStateRepository::myClock
protected
DtTime DtExtendedPropertiesControlObjectStateRepository::myLastEncodeTime
protected
DtTime DtExtendedPropertiesControlObjectStateRepository::myLastDecodeTime
protected
DtUUID DtExtendedPropertiesControlObjectStateRepository::myUUID
mutableprotected
std::map<DtString, DtString> DtExtendedPropertiesControlObjectStateRepository::myExtendedDataCache
mutableprotected

May be updated on access from extended data.

DtRangeItems DtExtendedPropertiesControlObjectStateRepository::myRangeItemsCache
mutableprotected
DtRwProperties DtExtendedPropertiesControlObjectStateRepository::theEmptyProperties
staticprotected

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

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)