VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
entityIdentifier.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2013 MAK Technologies, Inc
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vlutil/vlMachineTypes.h>
13 #include "netStructs.h"
14 #include "disEnums.h"
15 #include "simulationAddress.h"
16 #include <string>
17 
20 const DtU16 DtDeferedEntityId = ((1<<16)-1);
21 
22 const DtU16 DtDeferredEntityId = ((1<<16)-1);
23 
32 {
33 public:
34 
36  DtEntityIdentifier( const char* str );
37 
39  DtEntityIdentifier( int site, int host, DtU16 entityNum );
40 
42  DtEntityIdentifier( const DtSimulationAddress& simulationAddress, DtU16 entityNum );
43 
46 
48  const DtEntityIdentifier& operator=(const DtEntityIdentifier& orig);
49 
52 
55 
57  void init(int site, int host, DtU16 entityNum);
58 
59 
63  inline bool operator==(const DtEntityIdentifier &other) const;
64  inline bool operator!=(const DtEntityIdentifier &other) const;
65  inline operator DtNetEntityIdentifier () const;
66 
80  bool operator<( const DtEntityIdentifier &rightOperand ) const;
81 
83  inline void setFromNet(const DtNetEntityIdentifier &netId);
84 
86  inline void setSite(int site);
87 
89  inline int site() const ;
90 
92  inline void setHost(int host);
93 
95  inline int host() const;
96 
98  inline void setEntityNum(DtU16 entityNum);
99 
101  inline DtU16 entityNum() const;
102 
104  inline void setSimulationAddress( const DtSimulationAddress& simulationAddress);
105 
107  inline const DtSimulationAddress& simulationAddress() const;
108 
110  bool sameHost(const DtEntityIdentifier &other) const;
111 
113  bool sameEntity(const DtEntityIdentifier &other) const;
114 
116  bool matchPattern(const DtEntityIdentifier &pat) const;
117 
119  bool isNullId() const;
120 
122  const char *string() const;
123 
124 public:
125 
127  static const DtEntityIdentifier& nullId();
128 
130  static const DtEntityIdentifier& defaultId();
131 
132 public:
133 
137 
141 
142 protected:
143 
149  mutable std::string myMutableStringRep;
150 
151 };
152 
153 DT_DLL_VLPROTIND std::ostream& operator<< (std::ostream& stream, const DtEntityIdentifier& object);
154 
155 
156 #define entityIdentifier_inl
157 #include "entityIdentifier.inl"
158 #undef entityIdentifier_inl
const bool operator==(const DtU128 &lhs, const DtU128 &rhs)
A DtSimulationAddress is used in DIS to identify a particular simulator.
Definition: simulationAddress.h:29
const DtU16 DtDeferredEntityId
Definition: entityIdentifier.h:22
std::ostream & operator<<(std::ostream &os, const Dt3dChord &chord)
const DtU16 DtDeferedEntityId
Definition: entityIdentifier.h:20
declares DtSimulationAddress.
class DT_DLL_VLPROTIND DtEntityIdentifier
Definition: netStructs.h:19
DtSimulationAddress DtSimulator
DtSimulator is public for historical reasons.
Definition: entityIdentifier.h:136
Definition: netStructs.h:116
DtU16 DtEntity
DtEntity is public for historical reasons.
Definition: entityIdentifier.h:140
Instances of DtEntityIdentifier are used as a unique ID for entities in DIS.
Definition: entityIdentifier.h:31
#define DT_DLL_VLPROTIND
Definition: vlMachineTypes.h:110
unsigned short DtU16
A 16 bit unsigned integer value.
Definition: vlMachineTypes.h:140
Contains the standard DIS enumerations.
const bool operator!=(const DtU128 &lhs, const DtU128 &rhs)
std::string myMutableStringRep
This member is: 1) mutable because it is changed in const methods and used as a char buffer 2) protec...
Definition: entityIdentifier.h:149
const bool operator<(const DtU128 &lhs, const DtU128 &rhs)
This file contains typedefs for machine dependant types.

Document ID: Generated on Thu Sep 19 02:12:35 EDT 2024 from SVN revision 269601
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)