VR-Link API Documentation for DIS
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
14
#include <string.h>
15
16
#ifndef _WIN32
17
#include <netinet/in.h>
18
#else
19
#if DtTENA
20
// The TENA Middleware requires an expanded FD_SETSIZE; let ACE #define it
21
// before <WinSock2.h> is #included as a side effect of one of the MFC headers
22
#include <ACE/config.h>
23
#endif
24
#include <Winsock2.h>
25
#endif
26
27
#ifdef DtUSE_UTILITIES_NAMESPACE
28
namespace
DtUSE_UTILITIES_NAMESPACE
29
{
30
#endif
31
34
typedef
DtU8
DtNetU8
;
35
38
typedef
DtInt8
DtNetInt8
;
39
42
typedef
DtNetU8
DtNetBoolean
;
43
46
typedef
DtNetU8
DtNet8Bits
;
47
48
typedef
DtNetU8
DtNet16Bits
[2];
49
typedef
DtNetU8
DtNet32Bits
[4];
50
typedef
DtNetU8
DtNet64Bits
[8];
51
55
class
DT_DLL_VLUTIL
DtNetU16
56
{
57
public
:
58
61
DtNetU8
msbyte
;
62
65
DtNetU8
lsbyte
;
66
67
inline
DtNetU16
();
68
inline
DtNetU16
(
DtU16
);
69
inline
DtNetU16
(
const
DtNetU16
&);
70
inline
DtNetU16
& operator=(
const
DtNetU16
& u);
71
inline
DtNetU16
& operator=(
const
DtU16
& u);
72
inline
operator
DtU16
()
const
;
73
};
74
78
class
DT_DLL_VLUTIL
DtNetInt16
79
{
80
public
:
81
84
DtNetInt8
msbyte
;
85
88
DtNetInt8
lsbyte
;
89
90
inline
DtNetInt16
();
91
inline
DtNetInt16
(
const
DtInt16
&);
92
inline
DtNetInt16
(
const
DtNetInt16
&);
93
inline
DtNetInt16
& operator=(
const
DtNetInt16
&);
94
inline
DtNetInt16
& operator=(
const
DtInt16
&);
95
inline
operator
DtInt16
()
const
;
96
};
97
98
102
class
DT_DLL_VLUTIL
DtNetU32
103
{
104
public
:
105
108
DtNetU16
msword
;
109
112
DtNetU16
lsword
;
113
114
inline
DtNetU32
();
115
inline
DtNetU32
(
const
DtU32
&);
116
inline
DtNetU32
(
const
DtNetU32
&);
117
inline
DtNetU32
& operator=(
const
DtNetU32
&);
118
inline
DtNetU32
& operator=(
const
DtU32
&);
119
inline
operator
DtU32
()
const
;
120
};
121
122
126
class
DT_DLL_VLUTIL
DtNetInt32
127
{
128
public
:
129
132
DtNetInt16
msword
;
133
136
DtNetInt16
lsword
;
137
138
inline
DtNetInt32
();
139
inline
DtNetInt32
(
const
DtInt32
& );
140
inline
DtNetInt32
(
const
DtNetInt32
&);
141
inline
DtNetInt32
& operator=(
const
DtNetInt32
&);
142
inline
DtNetInt32
& operator=(
const
DtInt32
&);
143
inline
operator
DtInt32
()
const
;
144
};
145
146
150
class
DT_DLL_VLUTIL
DtNetFloat32
151
{
152
public
:
153
154
DtNetU32
bits
;
155
156
inline
DtNetFloat32
();
157
inline
DtNetFloat32
(
const
DtFloat32
&);
158
inline
DtNetFloat32
(
const
DtNetFloat32
&);
159
inline
DtNetFloat32
& operator=(
const
DtNetFloat32
&);
160
inline
DtNetFloat32
& operator=(
const
DtFloat32
&);
161
inline
operator
DtFloat32
()
const
;
162
163
protected
:
164
165
union
TempLayout
166
{
167
DtFloat32
flt
;
168
DtU32
bits
;
169
};
170
171
};
172
176
class
DT_DLL_VLUTIL
DtNetFloat64
177
{
178
public
:
179
182
DtNetU32
mslong
;
185
DtNetU32
lslong
;
186
187
inline
DtNetFloat64
();
188
inline
DtNetFloat64
(
const
DtFloat64
&);
189
inline
DtNetFloat64
(
const
DtNetFloat64
&);
190
inline
DtNetFloat64
& operator=(
const
DtNetFloat64
&);
191
inline
DtNetFloat64
& operator=(
const
DtFloat64
&);
192
inline
operator
DtFloat64
()
const
;
193
194
protected
:
195
197
union
TempLayout
198
{
199
DtFloat64
flt
;
200
struct
{
201
DtU32
mslong
;
202
DtU32
lslong
;
203
} bits;
204
};
205
};
206
211
class
DT_DLL_VLUTIL
DtNetU64
212
{
213
public
:
214
217
DtNetU32
mslong
;
218
221
DtNetU32
lslong
;
222
223
inline
DtNetU64
();
224
inline
DtNetU64
(
const
DtU64
& f);
225
inline
DtNetU64
(
const
DtNetU64
& f);
226
inline
DtNetU64
& operator=(
const
DtNetU64
& other);
227
inline
DtNetU64
& operator=(
const
DtU64
& other);
228
inline
operator
DtU64
()
const
;
229
230
protected
:
231
233
union
TempLayout
234
{
235
DtU64
flt
;
236
struct
{
237
DtU32
mslong
;
238
DtU32
lslong
;
239
} bits;
240
};
241
};
242
247
class
DT_DLL_VLUTIL
DtNetInt64
248
{
249
public
:
250
253
DtNetInt32
mslong
;
254
257
DtNetInt32
lslong
;
258
259
inline
DtNetInt64
();
260
inline
DtNetInt64
(
const
DtInt64
& f);
261
inline
DtNetInt64
(
const
DtNetInt64
& f);
262
inline
DtNetInt64
& operator=(
const
DtNetInt64
& other);
263
inline
DtNetInt64
& operator=(
const
DtInt64
& other);
264
inline
operator
DtInt64
()
const
;
265
266
protected
:
267
269
union
TempLayout
270
{
271
DtInt64
flt
;
272
struct
{
273
DtInt32
mslong
;
274
DtInt32
lslong
;
275
} bits;
276
};
277
};
278
281
enum
DtNetworkByteOrderType
{
282
DtLittleEndian
= 0,
283
DtBigEndian
= 1
284
};
285
286
289
DT_DLL_VLUTIL
DtNetworkByteOrderType
DtNetworkByteOrdering
();
290
294
DT_DLL_VLUTIL
void
DtSetNetworkByteOrdering
(
DtNetworkByteOrderType
bigOrLittle);
295
296
#ifdef DtUSE_UTILITIES_NAMESPACE
297
}
298
#endif
299
301
#define vlNetTypes_inl
302
#include "vlNetTypes.inl"
303
#undef vlNetTypes_inl
304
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
)