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 MAK Technologies, Inc
3 ** All rights reserved.
4 *********************************************************************/
5 
6 //lint -e740 -e732
7 
10 
11 #pragma once
12 #include "vlMachineTypes.h"
13 #include "vlUtilTypes.h"
14 #include "vlUuid.h"
15 
16 #include <string.h>
17 
18 #ifndef _WIN32
19 #include <netinet/in.h>
20 #else
21 #include <Winsock2.h>
22 #endif
23 
24 #ifdef DtUSE_UTILITIES_NAMESPACE
25 namespace DtUSE_UTILITIES_NAMESPACE
26 {
27 #endif
28 
31 typedef DtU8 DtNetU8;
32 
35 typedef DtInt8 DtNetInt8;
36 
40 
44 
45 typedef DtNetU8 DtNet16Bits[2];
46 typedef DtNetU8 DtNet32Bits[4];
47 typedef DtNetU8 DtNet64Bits[8];
48 
53 {
54 public:
55 
59 
63 
64  inline DtNetU16();
65  inline DtNetU16(DtU16);
66  inline DtNetU16(const DtNetU16&);
67  inline DtNetU16& operator=(const DtNetU16& u);
68  inline DtNetU16& operator=(const DtU16& u);
69  inline operator DtU16() const;
70 };
71 
76 {
77 public:
78 
82 
86 
87  inline DtNetInt16();
88  inline DtNetInt16(const DtInt16&);
89  inline DtNetInt16(const DtNetInt16&);
90  inline DtNetInt16& operator=(const DtNetInt16&);
91  inline DtNetInt16& operator=(const DtInt16&);
92  inline operator DtInt16() const;
93 };
94 
95 
100 {
101 public:
102 
106 
110 
111  inline DtNetU32();
112  inline DtNetU32(const DtU32&);
113  inline DtNetU32(const DtNetU32&);
114  inline DtNetU32& operator=(const DtNetU32&);
115  inline DtNetU32& operator=(const DtU32&);
116  inline operator DtU32() const;
117  inline unsigned int netSize() const;
118 };
119 
120 
125 {
126 public:
127 
131 
135 
136  inline DtNetInt32();
137  inline DtNetInt32(const DtInt32& );
138  inline DtNetInt32(const DtNetInt32&);
139  inline DtNetInt32& operator=(const DtNetInt32&);
140  inline DtNetInt32& operator=(const DtInt32&);
141  inline operator DtInt32() const;
142 };
143 
144 
149 {
150 public:
151 
153 
154  inline DtNetFloat32();
155  inline DtNetFloat32(const DtFloat32 &);
156  inline DtNetFloat32(const DtNetFloat32&);
157  inline DtNetFloat32& operator=(const DtNetFloat32 &);
158  inline DtNetFloat32& operator=(const DtFloat32 &);
159  inline operator DtFloat32() const;
160 
161 protected:
162 
164  {
167  };
168 
169 };
170 
175 {
176 public:
177 
184 
185  inline DtNetFloat64();
186  inline DtNetFloat64(const DtFloat64&);
187  inline DtNetFloat64(const DtNetFloat64&);
188  inline DtNetFloat64& operator=(const DtNetFloat64&);
189  inline DtNetFloat64& operator=(const DtFloat64&);
190  inline operator DtFloat64() const;
191 
192 protected:
193 
196  {
198  struct{
201  } bits;
202  };
203 };
204 
210 {
211 public:
212 
216 
220 
221  inline DtNetU64();
222  inline DtNetU64(const DtU64& f);
223  inline DtNetU64(const DtNetU64& f);
224  inline DtNetU64& operator=(const DtNetU64& other);
225  inline DtNetU64& operator=(const DtU64& other);
226  inline operator DtU64() const;
227 
228 protected:
229 
232  {
234  struct{
237  } bits;
238  };
239 };
240 
246 {
247 public:
248 
252 
256 
257  inline DtNetInt64();
258  inline DtNetInt64(const DtInt64& f);
259  inline DtNetInt64(const DtNetInt64& f);
260  inline DtNetInt64& operator=(const DtNetInt64& other);
261  inline DtNetInt64& operator=(const DtInt64& other);
262  inline operator DtInt64() const;
263 
264 protected:
265 
268  {
270  struct{
273  } bits;
274  };
275 };
276 
282 {
283 public:
284 
288 
292 
293  inline DtNetU128();
294  inline DtNetU128(const DtU128& f);
295  inline DtNetU128(const DtNetU128& f);
296  inline DtNetU128& operator=(const DtNetU128& other);
297  inline DtNetU128& operator=(const DtU128& other);
298  inline operator DtU128() const;
299 
300 };
301 
307 };
308 
309 
313 
318 
319 #ifdef DtUSE_UTILITIES_NAMESPACE
320 }
321 #endif
322 
324 #define vlNetTypes_inl
325 #include "vlNetTypes.inl"
326 #undef vlNetTypes_inl
327 
A Network byte aligned 64 integer data structure.
Definition: vlNetTypes.h:245
DtNetInt8 lsbyte
Used for internal storage, do not set directly.
Definition: vlNetTypes.h:85
DtNetU64 ls64bits
Least Significant 64 bits Used for internal storage, do not set directly.
Definition: vlNetTypes.h:291
Used to Swap Longs.
Definition: vlNetTypes.h:195
DtNetU8 DtNet32Bits[4]
Definition: vlNetTypes.h:46
A Host byte aligned 128 unsigned integer data structure.
Definition: vlUtilTypes.h:23
DtNetU32 bits
Definition: vlNetTypes.h:152
DtU32 mslong
Definition: vlNetTypes.h:235
A Network byte aligned 64 unsigned integer data structure.
Definition: vlNetTypes.h:209
Definition: vlNetTypes.h:306
DtNetworkByteOrderType
A simple enumeration to store network byte ordering.
Definition: vlNetTypes.h:304
Definition: vlNetTypes.h:305
DtU32 lslong
Definition: vlNetTypes.h:236
Network-order unsigned 16-bit quantity.
Definition: vlNetTypes.h:52
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:99
Used to Swap Longs.
Definition: vlNetTypes.h:267
DtU32 mslong
Definition: vlNetTypes.h:199
DtNetU8 msbyte
Used for internal storage, do not set directly.
Definition: vlNetTypes.h:58
DtNetU64 ms64bits
Used for internal storage, do not set directly.
Definition: vlNetTypes.h:287
DtNetU8 DtNetBoolean
Unsigned network-order 8-bit value for storage of boolean data.
Definition: vlNetTypes.h:39
DtNetInt32 lslong
Least Significant Long Used for internal storage, do not set directly.
Definition: vlNetTypes.h:255
Definition: vlNetTypes.h:163
DtFloat32 flt
Definition: vlNetTypes.h:165
Network-order 64-bit IEEE-754 floating-point quantity.
Definition: vlNetTypes.h:174
A Network byte aligned 128 unsigned integer data structure.
Definition: vlNetTypes.h:281
DtNetU32 lslong
Least Significant Long Used for internal storage, do not set directly.
Definition: vlNetTypes.h:219
DtInt32 mslong
Definition: vlNetTypes.h:271
DtNetU16 msword
Used for internal storage, do not set directly.
Definition: vlNetTypes.h:105
Network-order signed 16-bit quantity.
Definition: vlNetTypes.h:75
DtInt32 lslong
Definition: vlNetTypes.h:272
DtInt8 DtNetInt8
Signed 8-bit value.
Definition: vlNetTypes.h:35
DtU8 DtNetU8
Unsigned 8-bit value.
Definition: vlNetTypes.h:31
unsigned char DtU8
An eight bit unsigned integer value.
Definition: vlMachineTypes.h:137
DtNetU8 DtNet64Bits[8]
Definition: vlNetTypes.h:47
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:43
DtNetworkByteOrderType DtNetworkByteOrdering()
Returns the network byte ordering type used by the DtNetType classes.
Used to Swap Longs.
Definition: vlNetTypes.h:231
DtNetU32 mslong
Used for internal storage, do not set directly.
Definition: vlNetTypes.h:180
DtNetU32 mslong
Used for internal storage, do not set directly.
Definition: vlNetTypes.h:215
DtNetInt32 mslong
Used for internal storage, do not set directly.
Definition: vlNetTypes.h:251
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:233
DtNetInt16 lsword
Used for internal storage, do not set directly.
Definition: vlNetTypes.h:134
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:183
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:148
DtU32 bits
Definition: vlNetTypes.h:166
DtNetInt8 msbyte
Used for internal storage, do not set directly.
Definition: vlNetTypes.h:81
DtNetInt16 msword
Used for internal storage, do not set directly.
Definition: vlNetTypes.h:130
float DtFloat32
A 32 bit floating point value.
Definition: vlMachineTypes.h:209
DtU32 lslong
Definition: vlNetTypes.h:200
Contains the DtVrlUuid class declaration/definition.
double DtFloat64
A 64 bit floating point value.
Definition: vlMachineTypes.h:212
DtFloat64 flt
Definition: vlNetTypes.h:197
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:109
Network-order signed 32-bit quantity.
Definition: vlNetTypes.h:124
#define DT_DLL_VLUTIL
Definition: vlMachineTypes.h:109
DtNetU8 lsbyte
Used for internal storage, do not set directly.
Definition: vlNetTypes.h:62
DtInt64 flt
Definition: vlNetTypes.h:269
DtNetU8 DtNet16Bits[2]
Definition: vlNetTypes.h:45

Document ID: Generated on Thu Sep 19 02:12:35 EDT 2024 from SVN revision 269601
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)