VR-Link API Documentation for HLA 1.3
Home
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
include
vlutil
vlNetTypes.h
Go to the documentation of this file.
1
/*********************************************************************
2
** Copyright (c) 1992-2010 VT MAK
3
** All rights reserved.
4
*********************************************************************/
5
6
//lint -e740 -e732
7
10
11
#pragma once
12
#include "
vlMachineTypes.h
"
13
#include "
vlUtilTypes.h
"
14
15
#include <string.h>
16
17
#ifndef _WIN32
18
#include <netinet/in.h>
19
#else
20
#include <Winsock2.h>
21
#endif
22
23
#ifdef DtUSE_UTILITIES_NAMESPACE
24
namespace
DtUSE_UTILITIES_NAMESPACE
25
{
26
#endif
27
30
typedef
DtU8
DtNetU8
;
31
34
typedef
DtInt8
DtNetInt8
;
35
38
typedef
DtNetU8
DtNetBoolean
;
39
42
typedef
DtNetU8
DtNet8Bits
;
43
44
typedef
DtNetU8
DtNet16Bits
[2];
45
typedef
DtNetU8
DtNet32Bits
[4];
46
typedef
DtNetU8
DtNet64Bits
[8];
47
51
class
DT_DLL_VLUTIL
DtNetU16
52
{
53
public
:
54
57
DtNetU8
msbyte
;
58
61
DtNetU8
lsbyte
;
62
63
inline
DtNetU16
();
64
inline
DtNetU16
(
DtU16
);
65
inline
DtNetU16
(
const
DtNetU16
&);
66
inline
DtNetU16
& operator=(
const
DtNetU16
& u);
67
inline
DtNetU16
& operator=(
const
DtU16
& u);
68
inline
operator
DtU16
()
const
;
69
};
70
74
class
DT_DLL_VLUTIL
DtNetInt16
75
{
76
public
:
77
80
DtNetInt8
msbyte
;
81
84
DtNetInt8
lsbyte
;
85
86
inline
DtNetInt16
();
87
inline
DtNetInt16
(
const
DtInt16
&);
88
inline
DtNetInt16
(
const
DtNetInt16
&);
89
inline
DtNetInt16
& operator=(
const
DtNetInt16
&);
90
inline
DtNetInt16
& operator=(
const
DtInt16
&);
91
inline
operator
DtInt16
()
const
;
92
};
93
94
98
class
DT_DLL_VLUTIL
DtNetU32
99
{
100
public
:
101
104
DtNetU16
msword
;
105
108
DtNetU16
lsword
;
109
110
inline
DtNetU32
();
111
inline
DtNetU32
(
const
DtU32
&);
112
inline
DtNetU32
(
const
DtNetU32
&);
113
inline
DtNetU32
& operator=(
const
DtNetU32
&);
114
inline
DtNetU32
& operator=(
const
DtU32
&);
115
inline
operator
DtU32
()
const
;
116
inline
unsigned
int
netSize()
const
;
117
};
118
119
123
class
DT_DLL_VLUTIL
DtNetInt32
124
{
125
public
:
126
129
DtNetInt16
msword
;
130
133
DtNetInt16
lsword
;
134
135
inline
DtNetInt32
();
136
inline
DtNetInt32
(
const
DtInt32
& );
137
inline
DtNetInt32
(
const
DtNetInt32
&);
138
inline
DtNetInt32
& operator=(
const
DtNetInt32
&);
139
inline
DtNetInt32
& operator=(
const
DtInt32
&);
140
inline
operator
DtInt32
()
const
;
141
};
142
143
147
class
DT_DLL_VLUTIL
DtNetFloat32
148
{
149
public
:
150
151
DtNetU32
bits
;
152
153
inline
DtNetFloat32
();
154
inline
DtNetFloat32
(
const
DtFloat32
&);
155
inline
DtNetFloat32
(
const
DtNetFloat32
&);
156
inline
DtNetFloat32
& operator=(
const
DtNetFloat32
&);
157
inline
DtNetFloat32
& operator=(
const
DtFloat32
&);
158
inline
operator
DtFloat32
()
const
;
159
160
protected
:
161
162
union
TempLayout
163
{
164
DtFloat32
flt
;
165
DtU32
bits
;
166
};
167
168
};
169
173
class
DT_DLL_VLUTIL
DtNetFloat64
174
{
175
public
:
176
179
DtNetU32
mslong
;
182
DtNetU32
lslong
;
183
184
inline
DtNetFloat64
();
185
inline
DtNetFloat64
(
const
DtFloat64
&);
186
inline
DtNetFloat64
(
const
DtNetFloat64
&);
187
inline
DtNetFloat64
& operator=(
const
DtNetFloat64
&);
188
inline
DtNetFloat64
& operator=(
const
DtFloat64
&);
189
inline
operator
DtFloat64
()
const
;
190
191
protected
:
192
194
union
TempLayout
195
{
196
DtFloat64
flt
;
197
struct
{
198
DtU32
mslong
;
199
DtU32
lslong
;
200
} bits;
201
};
202
};
203
208
class
DT_DLL_VLUTIL
DtNetU64
209
{
210
public
:
211
214
DtNetU32
mslong
;
215
218
DtNetU32
lslong
;
219
220
inline
DtNetU64
();
221
inline
DtNetU64
(
const
DtU64
& f);
222
inline
DtNetU64
(
const
DtNetU64
& f);
223
inline
DtNetU64
& operator=(
const
DtNetU64
& other);
224
inline
DtNetU64
& operator=(
const
DtU64
& other);
225
inline
operator
DtU64
()
const
;
226
227
protected
:
228
230
union
TempLayout
231
{
232
DtU64
flt
;
233
struct
{
234
DtU32
mslong
;
235
DtU32
lslong
;
236
} bits;
237
};
238
};
239
244
class
DT_DLL_VLUTIL
DtNetInt64
245
{
246
public
:
247
250
DtNetInt32
mslong
;
251
254
DtNetInt32
lslong
;
255
256
inline
DtNetInt64
();
257
inline
DtNetInt64
(
const
DtInt64
& f);
258
inline
DtNetInt64
(
const
DtNetInt64
& f);
259
inline
DtNetInt64
& operator=(
const
DtNetInt64
& other);
260
inline
DtNetInt64
& operator=(
const
DtInt64
& other);
261
inline
operator
DtInt64
()
const
;
262
263
protected
:
264
266
union
TempLayout
267
{
268
DtInt64
flt
;
269
struct
{
270
DtInt32
mslong
;
271
DtInt32
lslong
;
272
} bits;
273
};
274
};
275
280
class
DT_DLL_VLUTIL
DtNetU128
281
{
282
public
:
283
286
DtNetU64
ms64bits
;
287
290
DtNetU64
ls64bits
;
291
292
inline
DtNetU128
();
293
inline
DtNetU128
(
const
DtU128
& f);
294
inline
DtNetU128
(
const
DtNetU128
& f);
295
inline
DtNetU128
& operator=(
const
DtNetU128
& other);
296
inline
DtNetU128
& operator=(
const
DtU128
& other);
297
inline
operator
DtU128
()
const
;
298
299
};
300
303
enum
DtNetworkByteOrderType
{
304
DtLittleEndian
= 0,
305
DtBigEndian
= 1
306
};
307
308
311
DT_DLL_VLUTIL
DtNetworkByteOrderType
DtNetworkByteOrdering
();
312
316
DT_DLL_VLUTIL
void
DtSetNetworkByteOrdering
(
DtNetworkByteOrderType
bigOrLittle);
317
318
#ifdef DtUSE_UTILITIES_NAMESPACE
319
}
320
#endif
321
323
#define vlNetTypes_inl
324
#include "vlNetTypes.inl"
325
#undef vlNetTypes_inl
326
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
)