![]() |
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" | |
| 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 DtEntityIdentifier & | operator= (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 DtSimulationAddress & | simulationAddress () 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 DtEntityIdentifier & | nullId () |
| Returns a reference to an instance of 0:0:0. | |
| static const DtEntityIdentifier & | defaultId () |
| 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. | |
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.
creates an instance of 0:0:0
| static const DtEntityIdentifier& DtEntityIdentifier::defaultId | ( | ) | [static] |
Returns a reference to an instance of -1:-1:-1.
| DtU16 DtEntityIdentifier::entityNum | ( | ) | const [inline] |
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.
| bool DtEntityIdentifier::matchPattern | ( | const DtEntityIdentifier & | pat | ) | const |
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.
| [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
| 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.
| const DtSimulationAddress& DtEntityIdentifier::simulationAddress | ( | ) | const [inline] |
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.
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.