VR-Link API Documentation for DIS
objectId.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 *********************************************************************/
5 
9 
10 #ifndef _objectId_h_
11 #define _objectId_h_
12 
13 
14 
15 #include <vlpi/NetStructs.h>
16 #include "rtiNamespace.h"
17 
18 
19 #if (DtDIS || DtTENA)
20 
21 #include "hostStructs.h"
24 
25 #elif DtHLA
26 
27 typedef DtNetU32 DtNetObjectId;
28 
29 
41 {
42 public:
43 
47  DtObjectId();
48 
49 #if DtHLA_1516
50  DtObjectId(RTI::ObjectInstanceHandle id);
51 #else
52  DtObjectId(RTI::ObjectHandle id);
53 
56  DtObjectId(const char* str);
57 
59  DtObjectId(const DtNetObjectId &netId);
60 
61 #endif
62  DtObjectId(const DtObjectId& orig);
63  DtObjectId& operator=(const DtObjectId& orig);
64 
66  int operator==(const DtObjectId& orig) const;
67  int operator!=(const DtObjectId& orig) const;
68  bool operator<(const DtObjectId& orig) const;
69 
70 #if DtHLA_1516
71  operator RTI::ObjectInstanceHandle() const;
72 #else
73  operator RTI::ObjectHandle() const;
74 #endif
75 
78  virtual void makePlaceholder();
79 
81  virtual bool valid() const;
82 
86  virtual int invalidId() const;
87 
88  const char *string() const;
89 
90  static const DtObjectId& nullId();
91  static const DtObjectId& defaultId();
92 
93 
94 protected:
95 
96 #if DtHLA_1516
97  RTI::ObjectInstanceHandle myId;
98 #else
99  RTI::ObjectHandle myId;
100 #endif
101  int myValidityFlag;
102 
103 
104 protected:
105  static int nextPlaceholderNumber;
106 
107 private:
108 
110  mutable DtString myMutableStringRep;
111 
112 };
113 #endif
114 
115 #endif
116 

Document ID: Generated on Wed Aug 14 15:35:11 EDT 2013 from SVN revision 130445
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)