VR-Link API Documentation for HLA 1516
 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 int operator==(const DtEntityIdentifier &other) const;
64  inline int 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 
118 
120  const char *string() const;
121 
122 public:
123 
125  static const DtEntityIdentifier& nullId();
126 
128  static const DtEntityIdentifier& defaultId();
129 
130 public:
131 
135 
139 
140 protected:
141 
147  mutable std::string myMutableStringRep;
148 
149 };
150 
151 DT_DLL_VLPROTIND std::ostream& operator<< (std::ostream& stream, const DtEntityIdentifier& object);
152 
153 
154 #define entityIdentifier_inl
155 #include "entityIdentifier.inl"
156 #undef entityIdentifier_inl

Document ID: Generated on Wed Jan 7 13:31:29 EST 2015 from SVN revision 149162
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)