![]() |
VR-Link API Documentation for DIS
|
Instances of DtEntityIdentifier are used as a unique ID for entities in DIS. More...
Inheritance diagram for DtEntityIdentifier:
Collaboration diagram for DtEntityIdentifier:Public Member Functions | |
| DtEntityIdentifier (const char *str) | |
| constructs an instance from a string in the form "2:3:4" More... | |
| DtEntityIdentifier (int site, int host, DtU16 entityNum) | |
| constructs an instance with the specified site:host:entityNum More... | |
| DtEntityIdentifier (const DtSimulationAddress &simulationAddress, DtU16 entityNum) | |
| constructs an instance with a simulation address (site:host) and the entNum More... | |
| DtEntityIdentifier (const DtEntityIdentifier &orig) | |
| copy constructor More... | |
| const DtEntityIdentifier & | operator= (const DtEntityIdentifier &orig) |
| assignment operator More... | |
| DtEntityIdentifier (const DtNetEntityIdentifier &netId) | |
| constructs from a network structure. More... | |
| DtEntityIdentifier () | |
| creates an instance of 0:0:0 More... | |
| void | init (int site, int host, DtU16 entityNum) |
| Initialization function. More... | |
| bool | operator== (const DtEntityIdentifier &other) const |
| The equality operators were shown to be a real bottleneck in VRF testing. More... | |
| bool | operator!= (const DtEntityIdentifier &other) const |
| operator DtNetEntityIdentifier () const | |
| bool | operator< (const DtEntityIdentifier &rightOperand) const |
| Sorting criterion. More... | |
| void | setFromNet (const DtNetEntityIdentifier &netId) |
| sets the Site/Host/EntityNum from a network structure. More... | |
| void | setSite (int site) |
| Sets the site Id for this instance. More... | |
| int | site () const |
| Gets the site Id for this instance. More... | |
| void | setHost (int host) |
| Sets the hostId (or applicationID) for this instance. More... | |
| int | host () const |
| Gets the hostId (or applicationID) for this instance. More... | |
| void | setEntityNum (DtU16 entityNum) |
| Sets the EntityNumber for this ID. More... | |
| DtU16 | entityNum () const |
| Gets the EntityNumber for this ID. More... | |
| void | setSimulationAddress (const DtSimulationAddress &simulationAddress) |
| Sets the SimulationAddress Component of the entityIdentifier. More... | |
| const DtSimulationAddress & | simulationAddress () const |
| Gets the SimulationAddress Component of the entityIdentifier. More... | |
| bool | sameHost (const DtEntityIdentifier &other) const |
| Returns true if other has the same hostId as this instance. More... | |
| bool | sameEntity (const DtEntityIdentifier &other) const |
| Returns true if other has the same EntityNum as this EntityNum. More... | |
| bool | matchPattern (const DtEntityIdentifier &pat) const |
| Matches any part of the entityID passed in pat, using the DtDeferredEntityId. More... | |
| bool | isNullId () const |
| Returns true if the entityID is a nullId. More... | |
| const char * | string () const |
| Returns a string representation of this instance. More... | |
Static Public Member Functions | |
| static const DtEntityIdentifier & | nullId () |
| Returns a reference to an instance of 0:0:0. More... | |
| static const DtEntityIdentifier & | defaultId () |
| Returns a reference to an instance of -1:-1:-1. More... | |
Public Attributes | |
| DtSimulationAddress | DtSimulator |
| DtSimulator is public for historical reasons. More... | |
| DtU16 | DtEntity |
| DtEntity is public for historical reasons. More... | |
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. More... | |
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.
| DtEntityIdentifier::DtEntityIdentifier | ( | const char * | str | ) |
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
| DtEntityIdentifier::DtEntityIdentifier | ( | const DtEntityIdentifier & | orig | ) |
copy constructor
| DtEntityIdentifier::DtEntityIdentifier | ( | const DtNetEntityIdentifier & | netId | ) |
constructs from a network structure.
| DtEntityIdentifier::DtEntityIdentifier | ( | ) |
creates an instance of 0:0:0
|
static |
Returns a reference to an instance of -1:-1:-1.
|
inline |
Gets the EntityNumber for this ID.
|
inline |
Gets the hostId (or applicationID) for this instance.
| void DtEntityIdentifier::init | ( | int | site, |
| int | host, | ||
| DtU16 | entityNum | ||
| ) |
Initialization function.
| bool DtEntityIdentifier::isNullId | ( | ) | const |
Returns true if the entityID is a nullId.
| bool DtEntityIdentifier::matchPattern | ( | const DtEntityIdentifier & | pat | ) | const |
Matches any part of the entityID passed in pat, using the DtDeferredEntityId.
|
static |
Returns a reference to an instance of 0:0:0.
|
inline |
|
inline |
| bool DtEntityIdentifier::operator< | ( | const DtEntityIdentifier & | rightOperand | ) | const |
Sorting criterion.
Mainly supplied for the use as a sorting criterion within C++ STL associative containers.
| [in] | left-operand | Left operand. |
| [in] | rightOperand | Right operand. |
true if the left-operand is lexicographically less than rightOperand.false otherwise| const DtEntityIdentifier& DtEntityIdentifier::operator= | ( | const DtEntityIdentifier & | orig | ) |
assignment operator
|
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.
|
inline |
Sets the EntityNumber for this ID.
|
inline |
sets the Site/Host/EntityNum from a network structure.
|
inline |
Sets the hostId (or applicationID) for this instance.
|
inline |
Sets the SimulationAddress Component of the entityIdentifier.
|
inline |
Sets the site Id for this instance.
|
inline |
Gets the SimulationAddress Component of the entityIdentifier.
|
inline |
Gets the site Id for this instance.
| const char* DtEntityIdentifier::string | ( | ) | const |
Returns a string representation of this instance.
| DtU16 DtEntityIdentifier::DtEntity |
DtEntity is public for historical reasons.
It will be removed in the future.
| DtSimulationAddress DtEntityIdentifier::DtSimulator |
DtSimulator is public for historical reasons.
It will be removed in the future.
|
mutableprotected |
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.