VR-Link API Documentation for DIS
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes

Instances of DtEntityIdentifier are used as a unique ID for entities in DIS. More...

+ Inheritance diagram for DtEntityIdentifier:
+ Collaboration diagram for DtEntityIdentifier:

List of all members.

Public Member Functions

 DtEntityIdentifier (const char *str)
 constructs an instance from a string in the form "2:3:4"
 DtEntityIdentifier (int site, int host, DtU16 entityNum)
 constructs an instance with the specified site:host:entityNum
 DtEntityIdentifier (const DtSimulationAddress &simulationAddress, DtU16 entityNum)
 constructs an instance with a simulation address (site:host) and the entNum
 DtEntityIdentifier (const DtEntityIdentifier &orig)
 copy constructor
const DtEntityIdentifieroperator= (const DtEntityIdentifier &orig)
 assignment operator
 DtEntityIdentifier (const DtNetEntityIdentifier &netId)
 constructs from a network structure.
 DtEntityIdentifier ()
 creates an instance of 0:0:0
void init (int site, int host, DtU16 entityNum)
 Initialization function.
int operator== (const DtEntityIdentifier &other) const
 The equality operators were shown to be a real bottleneck in VRF testing.
int operator!= (const DtEntityIdentifier &other) const
 operator DtNetEntityIdentifier () const
bool operator< (const DtEntityIdentifier &rightOperand) const
 Sorting criterion.
void setFromNet (const DtNetEntityIdentifier &netId)
 sets the Site/Host/EntityNum from a network structure.
void setSite (int site)
 Sets the site Id for this instance.
int site () const
 Gets the site Id for this instance.
void setHost (int host)
 Sets the hostId (or applicationID) for this instance.
int host () const
 Gets the hostId (or applicationID) for this instance.
void setEntityNum (DtU16 entityNum)
 Sets the EntityNumber for this ID.
DtU16 entityNum () const
 Gets the EntityNumber for this ID.
void setSimulationAddress (const DtSimulationAddress &simulationAddress)
 Sets the SimulationAddress Component of the entityIdentifier.
const DtSimulationAddresssimulationAddress () const
 Gets the SimulationAddress Component of the entityIdentifier.
bool sameHost (const DtEntityIdentifier &other) const
 Returns true if other has the same hostId as this instance.
bool sameEntity (const DtEntityIdentifier &other) const
 Returns true if other has the same EntityNum as this EntityNum.
bool matchPattern (const DtEntityIdentifier &pat) const
 Matches any part of the entityID passed in pat, using the DtDeferredEntityId.
const char * string () const
 Returns a string representation of this instance.

Static Public Member Functions

static const DtEntityIdentifiernullId ()
 Returns a reference to an instance of 0:0:0.
static const DtEntityIdentifierdefaultId ()
 Returns a reference to an instance of -1:-1:-1.

Public Attributes

DtSimulationAddress DtSimulator
 DtSimulator is public for historical reasons.
DtU16 DtEntity
 DtEntity is public for historical reasons.

Protected Attributes

std::string myMutableStringRep
 This member is: 1) mutable because it is changed in const methods and used as a char buffer 2) protected because legacy subclasses use it 3) it SHOULD be private because it is not considered part of the API and should not be used by any subclass.

Detailed Description

Instances of DtEntityIdentifier are used as a unique ID for entities in DIS.

In HLA they are replaced by RTI Object ID. In DIS you should use DtGlobalObjectIdentifier which is part of the protocol independent API and has an HLA counterpart. In the RPR FOM (HLA ONLY) base entities have an EntityIdentifier. This is used in conjunction with the RTI Object IT, and is designed for gateway use.


Constructor & Destructor Documentation

constructs an instance from a string in the form "2:3:4"

DtEntityIdentifier::DtEntityIdentifier ( int  site,
int  host,
DtU16  entityNum 
)

constructs an instance with the specified site:host:entityNum

DtEntityIdentifier::DtEntityIdentifier ( const DtSimulationAddress simulationAddress,
DtU16  entityNum 
)

constructs an instance with a simulation address (site:host) and the entNum

copy constructor

constructs from a network structure.

creates an instance of 0:0:0


Member Function Documentation

Returns a reference to an instance of -1:-1:-1.

Gets the EntityNumber for this ID.

int DtEntityIdentifier::host ( ) const [inline]

Gets the hostId (or applicationID) for this instance.

void DtEntityIdentifier::init ( int  site,
int  host,
DtU16  entityNum 
)

Initialization function.

Matches any part of the entityID passed in pat, using the DtDeferredEntityId.

static const DtEntityIdentifier& DtEntityIdentifier::nullId ( ) [static]

Returns a reference to an instance of 0:0:0.

DtEntityIdentifier::operator DtNetEntityIdentifier ( ) const [inline]
int DtEntityIdentifier::operator!= ( const DtEntityIdentifier other) const [inline]
bool DtEntityIdentifier::operator< ( const DtEntityIdentifier rightOperand) const

Sorting criterion.

Mainly supplied for the use as a sorting criterion within C++ STL associative containers.

Parameters:
[in]left-operandLeft operand.
[in]rightOperandRight operand.
Returns:
true if the left-operand is lexicographically less than rightOperand.
false otherwise
Note:
For a more detailed discussion on sorting criterion refer to: The C++ Standard Library, Nicolai M. Josuttis, 10th printing, Dec 2002, p135.
const DtEntityIdentifier& DtEntityIdentifier::operator= ( const DtEntityIdentifier orig)

assignment operator

int DtEntityIdentifier::operator== ( const DtEntityIdentifier other) const [inline]

The equality operators were shown to be a real bottleneck in VRF testing.

Please be careful if changing as performance may be compromised.

bool DtEntityIdentifier::sameEntity ( const DtEntityIdentifier other) const

Returns true if other has the same EntityNum as this EntityNum.

bool DtEntityIdentifier::sameHost ( const DtEntityIdentifier other) const

Returns true if other has the same hostId as this instance.

void DtEntityIdentifier::setEntityNum ( DtU16  entityNum) [inline]

Sets the EntityNumber for this ID.

void DtEntityIdentifier::setFromNet ( const DtNetEntityIdentifier netId) [inline]

sets the Site/Host/EntityNum from a network structure.

void DtEntityIdentifier::setHost ( int  host) [inline]

Sets the hostId (or applicationID) for this instance.

void DtEntityIdentifier::setSimulationAddress ( const DtSimulationAddress simulationAddress) [inline]

Sets the SimulationAddress Component of the entityIdentifier.

void DtEntityIdentifier::setSite ( int  site) [inline]

Sets the site Id for this instance.

Gets the SimulationAddress Component of the entityIdentifier.

int DtEntityIdentifier::site ( ) const [inline]

Gets the site Id for this instance.

const char* DtEntityIdentifier::string ( ) const

Returns a string representation of this instance.

Reimplemented in DtTrackJamDesignator.


Member Data Documentation

DtEntity is public for historical reasons.

It will be removed in the future.

DtSimulator is public for historical reasons.

It will be removed in the future.

std::string DtEntityIdentifier::myMutableStringRep [mutable, protected]

This member is: 1) mutable because it is changed in const methods and used as a char buffer 2) protected because legacy subclasses use it 3) it SHOULD be private because it is not considered part of the API and should not be used by any subclass.


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

Document ID: Generated on Mon May 14 08:06:18 EDT 2012 from SVN revision 114750
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)