VR-Link API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
eventId.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 1992-2025 MAK Technologies, Inc
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vlutil/vlString.h>
13 #include <vlpi/simulationAddress.h>
14 
15 class DtEventId;
16 
18 typedef DtEventId DtEventID;
19 
20 #if DtHLA
22 
24 {
25 public:
26 
27  DtNetEventId():eventNum(0){}
28 
29  bool operator==(const DtNetEventId& rhs) const
30  {
31  return (eventNum == rhs.eventNum);
32  }
33 
35 
36 protected:
37 
42  DtNetEventId(const DtNetEventId& orig);
43  DtNetEventId& operator=(const DtNetEventId& orig);
44 
45 };
46 
47 
53 {
54 public:
55 
59  DtEventId(const char* str);
60 
62  DtEventId(const DtGlobalObjectDesignator& des, int eventNum);
63 
65  DtEventId(const DtNetEventId& netId);
66 
68  DtEventId(const DtEventId& netId);
69 
71  DtEventId& operator=(const DtEventId& orig);
72 
74  DtEventId();
75 
77  ~DtEventId();
78 
80  void setFromNet(const DtNetEventId& netId);
81 
83  DtNetEventId* netRep() const;
85  int netSize() const;
86 
88  int operator==(const DtEventId &otherGuy) const;
89  int operator!=(const DtEventId &otherGuy) const;
90 
92  void setEventNum(int eventNum);
94  int eventNum() const;
95 
97  const DtGlobalObjectDesignator& objectId() const;
99  void setObjectId(const DtGlobalObjectDesignator& name);
100 
102  const DtGlobalObjectDesignator& globalId() const;
104  void setGlobalId(const DtGlobalObjectDesignator& name);
105 
107  const char* string() const;
108 
109 public:
110 
112  static const DtEventId& nullId();
113 
114 protected:
115 
117  void init(const DtGlobalObjectDesignator& des, int eventNum);
118 
119 protected:
120 
125 
126 };
127 
128 #elif DtDIS
129 
130 
132 {
133 public:
134 
135  DtEventId operator=(const DtEventId &);
136  DtNetEventId &operator=(const DtNetEventId &);
137 
138  bool operator==(const DtNetEventId& rhs) const
139  {
140  return (DtSimulator == rhs.DtSimulator)
141  && (DtEvent == rhs.DtEvent);
142  }
143  DtNetSimulationAddress DtSimulator;
144  DtNetU16 DtEvent;
145 
146 };
147 
154 class DT_DLL_VL DtEventId
155 {
156 public:
157 
160  DtEventId(const char* str);
161 
163  DtEventId(int site, int host, int eventNum);
164 
166  DtEventId(DtNetEventId netId);
167 
169  DtEventId();
170 
172  ~DtEventId();
173 
175  void init(int site, int host, int eventNum);
176 
178  void setFromNet(DtNetEventId netId);
179  operator DtNetEventId () const;
180 
182  int site() const;
184  void setSite(int site);
185 
187  int host() const;
189  void setHost(int host);
190 
192  int eventNum() const;
194  void setEventNum(int eventNum);
195 
197  //DtEventId eventId() const;
198 
200  void setEventId(int site, int host, int eventNum);
201 
203  const char* string() const;
204 
205  int operator==(const DtEventId &otherGuy) const;
206  int operator!=(const DtEventId &otherGuy) const;
207 
209  static const DtEventId& nullId();
210 
211 public:
212 
214  DtSimulationAddress DtSimulator;
215 
217  DtU16 DtEvent;
218 
220  DtString myStringRep;
221 
222 //protected:
223  //DtString myEventId;
224 
225 };
226 
227 #endif
228 
229 DT_DLL_VL std::ostream& operator<< (std::ostream& stream, const DtEventId& event);
const bool operator==(const DtU128 &lhs, const DtU128 &rhs)
A DtSimulationAddress is used in DIS to identify a particular simulator.
Definition: simulationAddress.h:29
#define DT_DLL_VL
Definition: vlMachineTypes.h:108
Contains the DtString class declaration.
bool operator==(const DtNetEventId &rhs) const
Definition: eventId.h:29
std::ostream & operator<<(std::ostream &os, const Dt3dChord &chord)
Network-order unsigned 16-bit quantity.
Definition: vlNetTypes.h:52
This file contains typedefs used to represent objects in a protocol neutral way.
DtNetEventId * myNetRep
Definition: eventId.h:123
DtString myStringRep
Definition: eventId.h:124
declares DtSimulationAddress.
Represents Events in the RPR FOM.
Definition: eventId.h:52
Definition: netStructs.h:97
Definition: eventId.h:23
class DT_DLL_VLPROTIND DtEventId
Definition: netStructs.h:21
DtNetU16 eventNum
Definition: eventId.h:34
unsigned short DtU16
A 16 bit unsigned integer value.
Definition: vlMachineTypes.h:140
DtEventId DtEventID
Provided for backwards compatibility.
Definition: eventId.h:15
const bool operator!=(const DtU128 &lhs, const DtU128 &rhs)
Instances of DtString are used to represent strings.
Definition: vlString.h:36
DtString myObjName
Definition: eventId.h:121
DtNetEventId()
Definition: eventId.h:27
int myEventNum
Definition: eventId.h:122

Document ID: Generated on Thu Oct 16 00:12:25 EDT 2025 from SVN revision 280738
Copyright © 1992-2025 MAK Technologies. All Rights Reserved (www.mak.com)