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 Member Functions | 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 Member Functions

 DtStateRepository ()
 default constructor
 DtStateRepository (const DtStateRepository &orig)
 copy constructor
virtual ~DtStateRepository ()
 destructor
DtStateRepositoryoperator= (const DtStateRepository &orig)
 assignment operator
virtual DtStateRepositoryclone (bool copy=false) const
 Return a copy/empty object of the same type as this.
virtual void printData () const
 Print State Data to the DtInfo Stream.
virtual void printDataToStream (std::ostream &stream) const
 Prints the State Data to the stream specified.
virtual void setGlobalId (const DtString &id)
 Get/Set global identifier, or name.
virtual const DtStringglobalId () const
virtual void setLocalId (const DtObjectId &id)
 Get/Set local identifier, or handle.
virtual const DtObjectIdlocalId () const
virtual bool publishesAttribute (const RTI::AttributeHandle &val) const
 Returns true if the attribute is published.
virtual void setAttributeByHandle (const RTI::AttributeHandle &attrHdl, const char *attrValue, unsigned size)
 Set the attribute with the given handle.
virtual const char * getAttributeByHandle (const RTI::AttributeHandle &attrHdl, unsigned &size) const
 Get a pointer to attribute value for the attribute with the given handle.
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.
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.
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.

Public Attributes

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

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.

Constructor & Destructor Documentation

DtStateRepository::DtStateRepository ( )

default constructor

DtStateRepository::DtStateRepository ( const DtStateRepository orig)

copy constructor

virtual DtStateRepository::~DtStateRepository ( )
virtual

destructor

Member Function Documentation

virtual DtStateRepository* DtStateRepository::clone ( bool  copy = false) const
virtual
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.

Member Data Documentation

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

Attributes by handle.

DtString DtStateRepository::myGlobalId
DtObjectId DtStateRepository::myLocalId

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

Document ID: Generated on Fri Dec 2 02:42:08 EST 2016 from SVN revision 171416
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)