VR-Link API Documentation for HLA 1.3
 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 VT MAK
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();
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

Document ID: Generated on Mon Jun 22 21:18:40 EDT 2020 from SVN revision 213785
Copyright © 2005-2018 MAK Technologies. All Rights Reserved (www.mak.com)