VR-Link API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Public Attributes | Static Public Attributes
DtStateRepository Class Reference

DtStateRepository is an abstract base class for maintaining state for an object. More...

+ Inheritance diagram for DtStateRepository:
+ Collaboration diagram for DtStateRepository:

Public Types

typedef std::map< DtString,
DtStateRepositoryExtension * > 
DtStateRepositoryExtensionMap
 

Public Member Functions

 DtStateRepository ()
 default constructor More...
 
 DtStateRepository (const DtStateRepository &orig)
 copy constructor More...
 
virtual ~DtStateRepository ()
 destructor More...
 
DtStateRepositoryoperator= (const DtStateRepository &orig)
 assignment operator More...
 
virtual DtStateRepositoryclone (bool copy=false) const
 Return a copy/empty object of the same type as this. More...
 
virtual void printData () const
 Print State Data to the DtInfo Stream. More...
 
virtual void printDataToStream (std::ostream &stream) const
 Prints the State Data to the stream specified. More...
 
virtual void setGlobalId (const DtString &id)
 Get/Set global identifier, or name. More...
 
virtual const DtStringglobalId () const
 
virtual void setLocalId (const DtObjectId &id)
 Get/Set local identifier, or handle. More...
 
virtual const DtObjectIdlocalId () const
 
virtual bool publishesAttribute (const RTI::AttributeHandle &val) const
 Returns true if the attribute is published. More...
 
virtual void setAttributeByHandle (const RTI::AttributeHandle &attrHdl, const char *attrValue, unsigned size)
 Set the attribute with the given handle. More...
 
virtual const char * getAttributeByHandle (const RTI::AttributeHandle &attrHdl, unsigned &size) const
 Get a pointer to attribute value for the attribute with the given handle. More...
 
virtual void setAttributeByName (const DtString &attrName, const char *attrValue, unsigned size, DtHlaObject *hlaObj)
 Set the attribute with the given name. Note that in order to do this you must provide a DtHlaObject. More...
 
virtual const char * getAttributeByName (const DtString &attrName, unsigned &size, DtHlaObject *hlaObj) const
 Get a pointer to attribute value for the attribute with the given name. More...
 
virtual const char * getAttributeByHandleIfUpdated (const RTI::AttributeHandle &attrHdl, unsigned &size) const
 Get a pointer to attribute value for the attribute with the given handle, but only if it's been updated since the last time we read it. More...
 

Public Attributes

DtString myGlobalId
 
DtObjectId myLocalId
 
std::map< RTI::AttributeHandle,
DtGenericAttributeInfo * > 
myAttributesByHandle
 Attributes by handle. More...
 
DtStateRepositoryExtensionMap myStateRepositoryExtensionMap
 

Static Public Attributes

static std::map< DtString,
DtSrExtCreatorFnc
theStateRepositoryExtensionCreatorMap
 
virtual
DtStateRepositoryExtension
stateRepositoryExtension (DtString srExtName) const
 Returns pointer to a DtStateRepositoryExtension object with the given name Returns 0 if no extension with given name is found. More...
 
virtual std::vector< DtStringstateRepositoryExtensionNames () const
 Returns a set of the registered state repository extension names. More...
 
virtual void setStateRepositoryExtensions (std::map< DtString, DtStateRepositoryExtension * > extensions)
 Returns pointer to a DtStateRepositoryExtension object with the given name Returns 0 if no extension with given name is found. More...
 
virtual const std::map
< DtString,
DtStateRepositoryExtension * > 
stateRepositoryExtensions () const
 Returns pointer to a DtStateRepositoryExtension object with the given name Returns 0 if no extension with given name is found. More...
 
static bool addStateRepositoryExtension (DtString srExtName, DtSrExtCreatorFnc fnc)
 The following functions are for extending state repositories through State Repository Extension classes. More...
 

Detailed Description

DtStateRepository is an abstract base class for maintaining state for an object.

Instances of DtStateRepository subclasses are used to store state for specific object types, such as vehicles or lifeforms.

Member Typedef Documentation

Constructor & Destructor Documentation

DtStateRepository::DtStateRepository ( )

default constructor

DtStateRepository::DtStateRepository ( const DtStateRepository orig)

copy constructor

virtual DtStateRepository::~DtStateRepository ( )
virtual

destructor

Member Function Documentation

static bool DtStateRepository::addStateRepositoryExtension ( DtString  srExtName,
DtSrExtCreatorFnc  fnc 
)
static

The following functions are for extending state repositories through State Repository Extension classes.

Adds the State Repository Creator function to the creator function list return value indicates whether the add was successful or not

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

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

Reimplemented in DtLinearObjectRepository, DtUnderwaterAcousticsStateRepository, DtFederateStateRepository, DtEmitterBeamRepository, DtEntityStateRepository, DtIffStateRepository, DtVRLinkStateStateRepository, DtActiveSonarStateRepository, DtBaseEntityStateRepository, DtPointObjectRepository, DtEmitterSystemRepository, DtAggregateStateRepository, DtArealObjectRepository, DtWeatherStateRepository, DtDIGuyObjectStateRepository, DtIFFDataStateRepository, DtRadioTransmitterRepository, DtSubsurfaceLayerStateRepository, DtWaterSurfaceStateRepository, DtEnvironmentProcessRepository, DtLandSurfaceStateRepository, DtTroposphereLayerStateRepository, DtEnvironmentConditionStateRepository, DtMode5StateRepository, DtServiceStateRepository, DtWindCorridorStateRepository, DtAerodromeStateRepository, DtMode1StateRepository, DtMode2StateRepository, DtMode3AStateRepository, DtMode4StateRepository, DtModeSStateRepository, DtRRBStateRepository, DtSovietStateRepository, DtTCASDataStateRepository, DtMetocRootStateRepository, DtTurbulenceLayerStateRepository, DtEnvironmentObjectRepository, DtMode3CStateRepository, DtActiveSonarBeamRepository, DtTimeAndDateStateRepository, DtPropulsionNoiseStateRepository, DtAdditionalPassiveActivitiesRepository, DtEmbeddedSystemRepository, DtGriddedDataRepository, DtDesignatorRepository, DtUnderwaterAcousticsEmissionRepository, DtRadioReceiverRepository, DtRunwayStateRepository, MyEntityStateRep, and TestStateRepository.

virtual const char* DtStateRepository::getAttributeByHandle ( const RTI::AttributeHandle &  attrHdl,
unsigned &  size 
) const
virtual

Get a pointer to attribute value for the attribute with the given handle.

This will return an empty pointer if there is a non-existent attribute. If the attribute exists and the size is zero, the pointer will be set to a static value instead of null.

virtual const char* DtStateRepository::getAttributeByHandleIfUpdated ( const RTI::AttributeHandle &  attrHdl,
unsigned &  size 
) const
virtual

Get a pointer to attribute value for the attribute with the given handle, but only if it's been updated since the last time we read it.

If it hasn't been update it returns null If the attribute exists and the size is zero, the pointer will be set to a static value instead of null.

virtual const char* DtStateRepository::getAttributeByName ( const DtString attrName,
unsigned &  size,
DtHlaObject hlaObj 
) const
virtual

Get a pointer to attribute value for the attribute with the given name.

Note that in order to do this you must provide a DtHlaObject.

virtual const DtString& DtStateRepository::globalId ( ) const
virtual
virtual const DtObjectId& DtStateRepository::localId ( ) const
virtual
DtStateRepository& DtStateRepository::operator= ( const DtStateRepository orig)

assignment operator

virtual void DtStateRepository::printData ( ) const
virtual
virtual void DtStateRepository::printDataToStream ( std::ostream &  stream) const
virtual
virtual bool DtStateRepository::publishesAttribute ( const RTI::AttributeHandle &  val) const
virtual

Returns true if the attribute is published.

virtual void DtStateRepository::setAttributeByHandle ( const RTI::AttributeHandle &  attrHdl,
const char *  attrValue,
unsigned  size 
)
virtual

Set the attribute with the given handle.

virtual void DtStateRepository::setAttributeByName ( const DtString attrName,
const char *  attrValue,
unsigned  size,
DtHlaObject hlaObj 
)
virtual

Set the attribute with the given name. Note that in order to do this you must provide a DtHlaObject.

virtual void DtStateRepository::setGlobalId ( const DtString id)
virtual

Get/Set global identifier, or name.

Set by VR-Link for reflected objects. Not necessary to set for local objects.

virtual void DtStateRepository::setLocalId ( const DtObjectId id)
virtual

Get/Set local identifier, or handle.

Set by VR-Link for reflected objects. Not necessary to set for local objects.

virtual void DtStateRepository::setStateRepositoryExtensions ( std::map< DtString, DtStateRepositoryExtension * >  extensions)
virtual

Returns pointer to a DtStateRepositoryExtension object with the given name Returns 0 if no extension with given name is found.

virtual DtStateRepositoryExtension* DtStateRepository::stateRepositoryExtension ( DtString  srExtName) const
virtual

Returns pointer to a DtStateRepositoryExtension object with the given name Returns 0 if no extension with given name is found.

virtual std::vector<DtString> DtStateRepository::stateRepositoryExtensionNames ( ) const
virtual

Returns a set of the registered state repository extension names.

virtual const std::map<DtString, DtStateRepositoryExtension*> DtStateRepository::stateRepositoryExtensions ( ) const
virtual

Returns pointer to a DtStateRepositoryExtension object with the given name Returns 0 if no extension with given name is found.

Member Data Documentation

std::map<RTI::AttributeHandle, DtGenericAttributeInfo*> DtStateRepository::myAttributesByHandle

Attributes by handle.

DtString DtStateRepository::myGlobalId
DtObjectId DtStateRepository::myLocalId
DtStateRepositoryExtensionMap DtStateRepository::myStateRepositoryExtensionMap
std::map<DtString, DtSrExtCreatorFnc> DtStateRepository::theStateRepositoryExtensionCreatorMap
static

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

Document ID: Generated on Thu Oct 16 00:12:25 EDT 2025 from SVN revision 280738
Copyright © 1992-2025 MAK Technologies. All Rights Reserved (www.mak.com)