VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
39 
43 
44 typedef DtNetU8 DtNet16Bits[2];
45 typedef DtNetU8 DtNet32Bits[4];
46 typedef DtNetU8 DtNet64Bits[8];
47 
52 {
53 public:
54 
58 
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 
75 {
76 public:
77 
81 
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 
99 {
100 public:
101 
105 
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 
124 {
125 public:
126 
130 
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 
148 {
149 public:
150 
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 
163  {
166  };
167 
168 };
169 
174 {
175 public:
176 
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 
195  {
197  struct{
200  } bits;
201  };
202 };
203 
209 {
210 public:
211 
215 
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 
231  {
233  struct{
236  } bits;
237  };
238 };
239 
245 {
246 public:
247 
251 
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 
267  {
269  struct{
272  } bits;
273  };
274 };
275 
281 {
282 public:
283 
287 
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 
306 };
307 
308 
312 
317 
318 #ifdef DtUSE_UTILITIES_NAMESPACE
319 }
320 #endif
321 
323 #define vlNetTypes_inl
324 #include "vlNetTypes.inl"
325 #undef vlNetTypes_inl
326 
A Network byte aligned 64 integer data structure.
Definition: vlNetTypes.h:244
DtNetInt8 lsbyte
Used for internal storage, do not set directly.
Definition: vlNetTypes.h:84
DtNetU64 ls64bits
Least Significant 64 bits Used for internal storage, do not set directly.
Definition: vlNetTypes.h:290
Used to Swap Longs.
Definition: vlNetTypes.h:194
DtNetU8 DtNet32Bits[4]
Definition: vlNetTypes.h:45
A Host byte aligned 128 unsigned integer data structure.
Definition: vlUtilTypes.h:23
DtNetU32 bits
Definition: vlNetTypes.h:151
DtU32 mslong
Definition: vlNetTypes.h:234
A Network byte aligned 64 unsigned integer data structure.
Definition: vlNetTypes.h:208
Definition: vlNetTypes.h:305
DtNetworkByteOrderType
A simple enumeration to store network byte ordering.
Definition: vlNetTypes.h:303
Definition: vlNetTypes.h:304
DtU32 lslong
Definition: vlNetTypes.h:235
Network-order unsigned 16-bit quantity.
Definition: vlNetTypes.h:51
unsigned long long DtU64
-------—— Network Layout for a long long (64 bytes unsigned)
Definition: vlMachineTypes.h:185
Network-order unsigned 32-bit quantity.
Definition: vlNetTypes.h:98
Used to Swap Longs.
Definition: vlNetTypes.h:266
DtU32 mslong
Definition: vlNetTypes.h:198
DtNetU8 msbyte
Used for internal storage, do not set directly.
Definition: vlNetTypes.h:57
DtNetU64 ms64bits
Used for internal storage, do not set directly.
Definition: vlNetTypes.h:286
DtNetU8 DtNetBoolean
Unsigned network-order 8-bit value for storage of boolean data.
Definition: vlNetTypes.h:38
DtNetInt32 lslong
Least Significant Long Used for internal storage, do not set directly.
Definition: vlNetTypes.h:254
Definition: vlNetTypes.h:162
DtFloat32 flt
Definition: vlNetTypes.h:164
Network-order 64-bit IEEE-754 floating-point quantity.
Definition: vlNetTypes.h:173
A Network byte aligned 128 unsigned integer data structure.
Definition: vlNetTypes.h:280
DtNetU32 lslong
Least Significant Long Used for internal storage, do not set directly.
Definition: vlNetTypes.h:218
DtInt32 mslong
Definition: vlNetTypes.h:270
DtNetU16 msword
Used for internal storage, do not set directly.
Definition: vlNetTypes.h:104
Network-order signed 16-bit quantity.
Definition: vlNetTypes.h:74
DtInt32 lslong
Definition: vlNetTypes.h:271
DtInt8 DtNetInt8
Signed 8-bit value.
Definition: vlNetTypes.h:34
DtU8 DtNetU8
Unsigned 8-bit value.
Definition: vlNetTypes.h:30
unsigned char DtU8
An eight bit unsigned integer value.
Definition: vlMachineTypes.h:137
DtNetU8 DtNet64Bits[8]
Definition: vlNetTypes.h:46
void DtSetNetworkByteOrdering(DtNetworkByteOrderType bigOrLittle)
Users can set the network byte ordering type used by the DtNetyptes classes.
char DtInt8
An eight bit integer value.
Definition: vlMachineTypes.h:203
DtNetU8 DtNet8Bits
Unsigned network-order 8-bit value.
Definition: vlNetTypes.h:42
DtNetworkByteOrderType DtNetworkByteOrdering()
Returns the network byte ordering type used by the DtNetType classes.
Used to Swap Longs.
Definition: vlNetTypes.h:230
DtNetU32 mslong
Used for internal storage, do not set directly.
Definition: vlNetTypes.h:179
DtNetU32 mslong
Used for internal storage, do not set directly.
Definition: vlNetTypes.h:214
DtNetInt32 mslong
Used for internal storage, do not set directly.
Definition: vlNetTypes.h:250
unsigned short DtU16
A 16 bit unsigned integer value.
Definition: vlMachineTypes.h:140
short int DtInt16
A sixteen bit integer value.
Definition: vlMachineTypes.h:206
DtU64 flt
Definition: vlNetTypes.h:232
DtNetInt16 lsword
Used for internal storage, do not set directly.
Definition: vlNetTypes.h:133
long int DtInt32
A 32 bit integer value.
Definition: vlMachineTypes.h:156
DtNetU32 lslong
Used for internal storage, do not set directly.
Definition: vlNetTypes.h:182
unsigned long DtU32
A 32 bit unsigned integer value.
Definition: vlMachineTypes.h:153
Network-order 32-bit IEEE-754 floating-point quantity.
Definition: vlNetTypes.h:147
DtU32 bits
Definition: vlNetTypes.h:165
DtNetInt8 msbyte
Used for internal storage, do not set directly.
Definition: vlNetTypes.h:80
DtNetInt16 msword
Used for internal storage, do not set directly.
Definition: vlNetTypes.h:129
float DtFloat32
A 32 bit floating point value.
Definition: vlMachineTypes.h:209
DtU32 lslong
Definition: vlNetTypes.h:199
double DtFloat64
A 64 bit floating point value.
Definition: vlMachineTypes.h:212
DtFloat64 flt
Definition: vlNetTypes.h:196
long long DtInt64
A 64 bit integer value.
Definition: vlMachineTypes.h:188
This file contains typedefs for machine dependant types.
DtNetU16 lsword
Used for internal storage, do not set directly.
Definition: vlNetTypes.h:108
Network-order signed 32-bit quantity.
Definition: vlNetTypes.h:123
#define DT_DLL_VLUTIL
Definition: vlMachineTypes.h:109
DtNetU8 lsbyte
Used for internal storage, do not set directly.
Definition: vlNetTypes.h:61
DtInt64 flt
Definition: vlNetTypes.h:268
DtNetU8 DtNet16Bits[2]
Definition: vlNetTypes.h:44

Document ID: Generated on Tue Feb 2 21:02:17 EST 2021 from SVN revision 223668
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)