VR-Link API Documentation for DIS
Home
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
include
vl
eventId.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/vlString.h
>
13
#include <
vlpi/simulationAddress.h
>
14
15
class
DtEventId
;
16
18
typedef
DtEventId
DtEventID
;
19
20
#if DtHLA
21
#include <
vl/globalObjectDesignator.h
>
22
23
class
DT_DLL_VL
DtNetEventId
24
{
25
public
:
26
27
DtNetEventId
():eventNum(0){}
28
29
bool
operator==
(
const
DtNetEventId
& rhs)
const
30
{
31
return
(eventNum == rhs.eventNum);
32
}
33
34
DtNetU16
eventNum;
35
36
protected
:
37
42
DtNetEventId
(
const
DtNetEventId
& orig);
43
DtNetEventId
& operator=(
const
DtNetEventId
& orig);
44
45
};
46
47
52
class
DT_DLL_VL
DtEventId
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
121
DtString
myObjName;
122
int
myEventNum;
123
DtNetEventId
* myNetRep;
124
DtString
myStringRep;
125
126
};
127
128
#elif DtDIS
129
130
131
class
DT_DLL_VL
DtNetEventId
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
const
char
* string()
const
;
198
199
int
operator==
(
const
DtEventId
&otherGuy)
const
;
200
int
operator!=
(
const
DtEventId
&otherGuy)
const
;
201
203
static
const
DtEventId
& nullId();
204
205
public
:
206
208
DtSimulationAddress
DtSimulator
;
209
211
DtU16
DtEvent
;
212
214
DtString
myStringRep
;
215
216
};
217
218
#endif
219
220
DT_DLL_VL
std::ostream&
operator<<
(std::ostream& stream,
const
DtEventId
& event);
Document ID: Generated on Wed Oct 23 22:25:48 EDT 2013 from SVN revision 132765
Copyright © 2005-2013 VT MÄK. All Rights Reserved (
www.mak.com
)