VR-Link API Documentation for HLA 1.3
eventId.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 *********************************************************************/
5 
6 
7 #ifndef _eventId_H_
8 #define _eventId_H_
9 
10 
11 #include <vlutil/vlString.h>
12 #include <vlpi/simulationAddress.h>
13 
16 
18 
20 typedef DtEventId DtEventID;
21 
22 
23 #if DtHLA
24 #include "globalObjDes.h"
25 
27 {
28 public:
29  DtNetEventId():eventNum(0){}
30 
32 
33 protected:
34 
39  DtNetEventId(const DtNetEventId& orig);
40  DtNetEventId& operator=(const DtNetEventId& orig);
41 };
42 
43 
50 {
51 public:
55  DtEventId(const char* str);
56 
58  DtEventId(const DtGlobalObjectDesignator& des, int eventNum);
59 
61  DtEventId(const DtNetEventId& netId);
62 
64  DtEventId(const DtEventId& netId);
65 
67  DtEventId& operator=(const DtEventId& orig);
68 
70  DtEventId();
71 
73  ~DtEventId();
74 
76  void setFromNet(const DtNetEventId& netId);
77 
79  DtNetEventId* netRep() const;
81  int netSize() const;
82 
84  int operator==(const DtEventId &otherGuy) const;
85  int operator!=(const DtEventId &otherGuy) const;
86 
88  void setEventNum(int eventNum);
90  int eventNum() const;
91 
93  const DtGlobalObjectDesignator& objectId() const;
95  void setObjectId(const DtGlobalObjectDesignator& name);
96 
98  const DtGlobalObjectDesignator& globalId() const;
100  void setGlobalId(const DtGlobalObjectDesignator& name);
101 
103  const char* string() const;
104 
105 public:
106 
108  static const DtEventId& nullId();
109 
110 protected:
111 
113  void init(const DtGlobalObjectDesignator& des, int eventNum);
114 
115 protected:
116 
121 };
122 
123 #elif (DtDIS || DtTENA)
124 
125 
127 {
128 public:
129  DtNetSimulationAddress DtSimulator;
130  DtNetU16 DtEvent;
131 
132  DtEventId operator=(const DtEventId &);
133  DtNetEventId &operator=(const DtNetEventId &);
134 };
135 
143 class DT_DLL_VL DtEventId
144 {
145  public:
148  DtEventId(const char* str);
149 
151  DtEventId(int site, int host, int eventNum);
152 
154  DtEventId(DtNetEventId netId);
155 
157  DtEventId();
158 
160  ~DtEventId();
161 
163  void init(int site, int host, int eventNum);
164 
166  void setFromNet(DtNetEventId netId);
167  operator DtNetEventId () const;
168 
170  int site() const;
172  void setSite(int site);
173 
175  int host() const;
177  void setHost(int host);
178 
180  int eventNum() const;
182  void setEventNum(int eventNum);
183 
185  const char* string() const;
186 
187  int operator==(const DtEventId &otherGuy) const;
188  int operator!=(const DtEventId &otherGuy) const;
189 
191  static const DtEventId& nullId();
192 
193 public:
194 
196  DtSimulationAddress DtSimulator;
197 
199  DtU16 DtEvent;
200 
202  DtString myStringRep;
203 };
204 
205 #else
206 #error "Please Choose Protocol!"
207 #endif
208 
209 DT_DLL_VL std::ostream& operator<< (std::ostream& stream, const DtEventId& event);
210 
211 #endif
212 

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)