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 | Static Public Member Functions | Protected Attributes
DtEnvironmentProcessRepository Class Reference

Instances of DtEnvironmentProcessRepository are used to store state information for environmental process objects in both DIS and HLA environments. More...

+ Inheritance diagram for DtEnvironmentProcessRepository:
+ Collaboration diagram for DtEnvironmentProcessRepository:

Public Member Functions

 DtEnvironmentProcessRepository ()
 Default CTOR. More...
 
 DtEnvironmentProcessRepository (const DtEnvironmentProcessRepository &orig)
 Copy CTOR. More...
 
virtual ~DtEnvironmentProcessRepository ()
 Virtual DTOR. More...
 
DtEnvironmentProcessRepositoryoperator= (const DtEnvironmentProcessRepository &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 data contained within the repository. More...
 
virtual void printDataToStream (std::ostream &stream) const
 Print data contained within the repository. More...
 
virtual void setEnvironmentalProcessID (const DtEntityIdentifier &entity)
 Set the originating process id. More...
 
virtual const DtEntityIdentifierenvironmentalProcessID () const
 Get the originating process id. More...
 
virtual void setEnvironmentType (const DtEnvironmentTypeRecord &type)
 Set The type of environmental condition. More...
 
virtual const
DtEnvironmentTypeRecord
environmentType () const
 Get The type of environmental condition. More...
 
virtual void setModelType (DtEnvironmentalModelType value)
 Set The Environmental Model which is used by this process. More...
 
virtual DtEnvironmentalModelType modelType () const
 Get The Environmental Model which is used by this process. More...
 
virtual void setEnvironmentalStatus (DtU8 value)
 Set status flags for the environment process. More...
 
virtual DtU8 environmentalStatus () const
 Get status flags for the environment process. More...
 
virtual void setEnvironmentalProcessActive (bool value)
 Set whether the environment process is active. More...
 
virtual bool environmentalProcessActive () const
 Get whether the environment process is active. More...
 
virtual void setEnvironmentalProcessIsLast (bool value)
 Set whether the environment process is last. More...
 
virtual bool environmentalProcessIsLast () const
 Get whether the environment process is last. More...
 
virtual void setSequenceNumber (DtU16 value)
 Set/Get the sequence number. More...
 
virtual DtU16 sequenceNumber () const
 
virtual bool setNumberOfEnvironmentalRecords (DtU16 newNumberOfRecords)
 Set/Get number of environment records. More...
 
virtual DtU16 numberOfEnvironmentalRecords () const
 
virtual DtNetEnvironmentalRecordrecordPointer (int recordIndex)
 Get a pointer to an environmental record. More...
 
virtual const
DtNetEnvironmentalRecord
recordPointer (int recordIndex) const
 
virtual bool setRecordBitSize (int recordIndex, int newRecordBitSize)
 Set size of an environment record. More...
 
virtual const DtVectorlocation () const
 The standard says the first environmental record will either be a bounding sphere or the only geometry record. More...
 
double radius () const
 if the first environmental record is a bounding sphere record, this will return the radius. More...
 
virtual int numberOfGeometryRecords () const
 The enumeration document establishes the convention that geometry types use the high order 2 bytes of the type field, while state types use the lower two. More...
 
virtual DtEnvironmentalRecordType geometryRecordType (int index) const
 This returns the type of the geometry record with the index specified. More...
 
virtual DtEnvironmentalRecordType stateRecordType (int index) const
 This returns the type of the state record associated with the geometry record with the index specified. More...
 
virtual bool getGeometryRecord (int index, DtEnvironmentalGeometryRecord &geometryRecord) const
 This returns a reference to the nth geometry record. More...
 
virtual bool getStateRecord (int index, DtEnvironmentalRecord &stateRecord) const
 This returns a reference to the state record associated with the nth geometry record. More...
 
virtual void setEnvironmentalRecord (int index, const DtEnvironmentalRecord &envRecord)
 This sets the index'th record to the values in the envRecord supplied. More...
 
virtual int protocolVersion () const
 Get the published protocol version. More...
 
virtual void setProtocolVersion (int protocol)
 
- Public Member Functions inherited from DtStateRepository
 DtStateRepository ()
 default constructor More...
 
 DtStateRepository (const DtStateRepository &orig)
 copy constructor More...
 
virtual ~DtStateRepository ()
 destructor More...
 
DtStateRepositoryoperator= (const DtStateRepository &orig)
 assignment operator 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...
 
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 Public Member Functions

static
DtEnvironmentProcessRepository
create ()
 Creator method. More...
 
- Static Public Member Functions inherited from DtStateRepository
static bool addStateRepositoryExtension (DtString srExtName, DtSrExtCreatorFnc fnc)
 The following functions are for extending state repositories through State Repository Extension classes. More...
 

Protected Attributes

DtEnvironmentalProcessPdu myPdu
 
DtVector myLocation
 

Additional Inherited Members

- Public Types inherited from DtStateRepository
typedef std::map< DtString,
DtStateRepositoryExtension * > 
DtStateRepositoryExtensionMap
 
- Public Attributes inherited from DtStateRepository
DtString myGlobalId
 
DtObjectId myLocalId
 
std::map< RTI::AttributeHandle,
DtGenericAttributeInfo * > 
myAttributesByHandle
 Attributes by handle. More...
 
DtStateRepositoryExtensionMap myStateRepositoryExtensionMap
 
- Static Public Attributes inherited from DtStateRepository
static std::map< DtString,
DtSrExtCreatorFnc
theStateRepositoryExtensionCreatorMap
 

Detailed Description

Instances of DtEnvironmentProcessRepository are used to store state information for environmental process objects in both DIS and HLA environments.

An Environmental Process is an object which represents something in the environment, including things like clouds, chaff, smoke, contrails or other chemical processes.

Examples: Environmental Process Example

Constructor & Destructor Documentation

DtEnvironmentProcessRepository::DtEnvironmentProcessRepository ( )

Default CTOR.

DtEnvironmentProcessRepository::DtEnvironmentProcessRepository ( const DtEnvironmentProcessRepository orig)

Copy CTOR.

virtual DtEnvironmentProcessRepository::~DtEnvironmentProcessRepository ( )
virtual

Virtual DTOR.

Member Function Documentation

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

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

Reimplemented from DtStateRepository.

static DtEnvironmentProcessRepository* DtEnvironmentProcessRepository::create ( )
static

Creator method.

virtual bool DtEnvironmentProcessRepository::environmentalProcessActive ( ) const
virtual

Get whether the environment process is active.

virtual const DtEntityIdentifier& DtEnvironmentProcessRepository::environmentalProcessID ( ) const
virtual

Get the originating process id.

virtual bool DtEnvironmentProcessRepository::environmentalProcessIsLast ( ) const
virtual

Get whether the environment process is last.

virtual DtU8 DtEnvironmentProcessRepository::environmentalStatus ( ) const
virtual

Get status flags for the environment process.

virtual const DtEnvironmentTypeRecord& DtEnvironmentProcessRepository::environmentType ( ) const
virtual

Get The type of environmental condition.

virtual DtEnvironmentalRecordType DtEnvironmentProcessRepository::geometryRecordType ( int  index) const
virtual

This returns the type of the geometry record with the index specified.

virtual bool DtEnvironmentProcessRepository::getGeometryRecord ( int  index,
DtEnvironmentalGeometryRecord geometryRecord 
) const
virtual

This returns a reference to the nth geometry record.

The user must supply a DtEnvironmentalRecord of the correct type (use geometryRecordType() first(!)) because it is that class that knows how to convert the network representation in the PDU into the DtEnvironmentalRecord (host) representation,

virtual bool DtEnvironmentProcessRepository::getStateRecord ( int  index,
DtEnvironmentalRecord stateRecord 
) const
virtual

This returns a reference to the state record associated with the nth geometry record.

The user must supply a DtEnvironmentalRecord of the correct type (use stateRecordType() first(!)) because it is that class that knows how to convert the network representation in the PDU into the DtEnvironmentalRecord (host) representation,

virtual const DtVector& DtEnvironmentProcessRepository::location ( ) const
virtual

The standard says the first environmental record will either be a bounding sphere or the only geometry record.

In fact, the standard should have required a bounding sphere even when there is a single geometry record that is anything other than Point Record 1 or Sphere Record 1, since the other geometry records imply multiple geometry. This accessor looks at the first env record and returns the location if the record is a point1, sphere1, or bounding sphere record. To have this work the way it was intended, always use one of these record types as the first geometry record. If the first geometry record is not one of these three types, this accessor will return <0., 0., 0.>.

virtual DtEnvironmentalModelType DtEnvironmentProcessRepository::modelType ( ) const
virtual

Get The Environmental Model which is used by this process.

virtual DtU16 DtEnvironmentProcessRepository::numberOfEnvironmentalRecords ( ) const
virtual
virtual int DtEnvironmentProcessRepository::numberOfGeometryRecords ( ) const
virtual

The enumeration document establishes the convention that geometry types use the high order 2 bytes of the type field, while state types use the lower two.

Assuming that convention is followed, this returns the number of geometry records in the PDU. Since the standard ties each state record to a corresponding geometry record, this is a useful way to access the environmental records.

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

assignment operator

virtual void DtEnvironmentProcessRepository::printData ( ) const
virtual

Print data contained within the repository.

Reimplemented from DtStateRepository.

virtual void DtEnvironmentProcessRepository::printDataToStream ( std::ostream &  stream) const
virtual

Print data contained within the repository.

Reimplemented from DtStateRepository.

virtual int DtEnvironmentProcessRepository::protocolVersion ( ) const
virtual

Get the published protocol version.

double DtEnvironmentProcessRepository::radius ( ) const

if the first environmental record is a bounding sphere record, this will return the radius.

Otherwise, 0. is returned.

virtual DtNetEnvironmentalRecord* DtEnvironmentProcessRepository::recordPointer ( int  recordIndex)
virtual

Get a pointer to an environmental record.

Parameters
recordIndexstarts at zero.
virtual const DtNetEnvironmentalRecord* DtEnvironmentProcessRepository::recordPointer ( int  recordIndex) const
virtual
virtual DtU16 DtEnvironmentProcessRepository::sequenceNumber ( ) const
virtual
virtual void DtEnvironmentProcessRepository::setEnvironmentalProcessActive ( bool  value)
virtual

Set whether the environment process is active.

virtual void DtEnvironmentProcessRepository::setEnvironmentalProcessID ( const DtEntityIdentifier entity)
virtual

Set the originating process id.

virtual void DtEnvironmentProcessRepository::setEnvironmentalProcessIsLast ( bool  value)
virtual

Set whether the environment process is last.

virtual void DtEnvironmentProcessRepository::setEnvironmentalRecord ( int  index,
const DtEnvironmentalRecord envRecord 
)
virtual

This sets the index'th record to the values in the envRecord supplied.

virtual void DtEnvironmentProcessRepository::setEnvironmentalStatus ( DtU8  value)
virtual

Set status flags for the environment process.

virtual void DtEnvironmentProcessRepository::setEnvironmentType ( const DtEnvironmentTypeRecord type)
virtual

Set The type of environmental condition.

virtual void DtEnvironmentProcessRepository::setModelType ( DtEnvironmentalModelType  value)
virtual

Set The Environmental Model which is used by this process.

virtual bool DtEnvironmentProcessRepository::setNumberOfEnvironmentalRecords ( DtU16  newNumberOfRecords)
virtual

Set/Get number of environment records.

virtual void DtEnvironmentProcessRepository::setProtocolVersion ( int  protocol)
virtual
virtual bool DtEnvironmentProcessRepository::setRecordBitSize ( int  recordIndex,
int  newRecordBitSize 
)
virtual

Set size of an environment record.

To get the size of a record in a reflected state repository, you need to read the record and then look in the DtNetEnvironmentalRecord type for myLength, which is noted in bits. Return false if size is invalid.

virtual void DtEnvironmentProcessRepository::setSequenceNumber ( DtU16  value)
virtual

Set/Get the sequence number.

virtual DtEnvironmentalRecordType DtEnvironmentProcessRepository::stateRecordType ( int  index) const
virtual

This returns the type of the state record associated with the geometry record with the index specified.

0 is returned if there is no state record associated with the index'th geometry record.

Member Data Documentation

DtVector DtEnvironmentProcessRepository::myLocation
protected
DtEnvironmentalProcessPdu DtEnvironmentProcessRepository::myPdu
protected

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

Document ID: Generated on Wed Mar 27 02:04:30 EDT 2024 from SVN revision 264570
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)