VR-Forces 4.1.1 Class Documentation
c7NetTypes.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2007 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: c7NetTypes.h,v $ $Revision: 1.4 $ $State: Exp $
7 *********************************************************************/
9 
10 #ifndef c7NetTypes_H_
11 #define c7NetTypes_H_
12 
13 #include <vlutil/vlMachineTypes.h>
14 #include "ctdb/ctdbDefines.h"
15 #include <vlutil/vlNetTypes.h>
16 
17 #include <string.h>
18 
19 #ifndef _WIN32
20 #include <netinet/in.h>
21 #else
22 #include <Winsock2.h>
23 #endif
24 
29 {
30 public:
31 
32  DtNetU8 msbyte;
33  DtNetU8 lsbyte;
34 
35  inline DtC7NetU16();
36  inline DtC7NetU16(DtU16);
37  inline DtC7NetU16(const DtC7NetU16&);
38  inline DtC7NetU16& operator=(const DtC7NetU16& u);
39  inline DtC7NetU16& operator=(const DtU16& u);
40  inline operator DtU16() const;
41  inline void swap();
42 };
43 
48 {
49 public:
50 
51  DtNetInt8 msbyte;
52  DtNetInt8 lsbyte;
53 
54  inline DtC7NetInt16();
55  inline DtC7NetInt16(const DtInt16&);
56  inline DtC7NetInt16(const DtC7NetInt16&);
57  inline DtC7NetInt16& operator=(const DtC7NetInt16&);
58  inline DtC7NetInt16& operator=(const DtInt16&);
59  inline operator DtInt16() const;
60 };
61 
62 
67 {
68 public:
69 
72 
73  inline DtC7NetU32();
74  inline DtC7NetU32(const DtU32&);
75  inline DtC7NetU32(const DtC7NetU32&);
76  inline DtC7NetU32& operator=(const DtC7NetU32&);
77  inline DtC7NetU32& operator=(const DtU32&);
78  inline operator DtU32() const;
79  inline void swap();
80 };
81 
82 
87 {
88 public:
89 
92 
93  inline DtC7NetInt32();
94  inline DtC7NetInt32(const DtInt32& );
95  inline DtC7NetInt32(const DtC7NetInt32&);
96  inline DtC7NetInt32& operator=(const DtC7NetInt32&);
97  inline DtC7NetInt32& operator=(const DtInt32&);
98  inline operator DtInt32() const;
99  inline void swap();
100 };
101 
102 
107 {
108 public:
109 
111 
112  inline DtC7NetFloat32();
113  inline DtC7NetFloat32(const DtFloat32 &);
114  inline DtC7NetFloat32(const DtC7NetFloat32&);
115  inline DtC7NetFloat32& operator=(const DtC7NetFloat32 &);
116  inline DtC7NetFloat32& operator=(const DtFloat32 &);
117  inline void swap();
118  inline operator DtFloat32() const;
119 
120 protected:
121 
123  {
125  DtU32 bits;
126  };
127 
128 };
129 
134 {
135 public:
136 
139 
140  inline DtC7NetFloat64();
141  inline DtC7NetFloat64(const DtFloat64&);
142  inline DtC7NetFloat64(const DtC7NetFloat64&);
143  inline DtC7NetFloat64& operator=(const DtC7NetFloat64&);
144  inline DtC7NetFloat64& operator=(const DtFloat64&);
145  inline operator DtFloat64() const;
146  inline void swap();
147  inline void swap(DtC7NetU32 &val);
148 
149 protected:
150 
153  {
155  struct{
156  DtU32 mslong;
157  DtU32 lslong;
158  } bits;
159  };
160 };
161 
163 {
164 public:
165 
168 
169  inline DtC7NetU64();
170  inline DtC7NetU64(const DtU64& f);
171  inline DtC7NetU64(const DtC7NetU64& f);
172  inline DtC7NetU64& operator=(const DtC7NetU64& other);
173  inline DtC7NetU64& operator=(const DtU64& other);
174  inline operator DtU64() const;
175 
176 protected:
177 
180  {
181  DtU64 flt;
182  struct{
183  DtU32 mslong;
184  DtU32 lslong;
185  } bits;
186  };
187 };
188 
190 DT_DLL_ctdb DtNetworkByteOrderType DtC7NetworkByteOrdering();
191 DT_DLL_ctdb DtNetworkByteOrderType DtC7FileEndian();
192 
195 DT_DLL_ctdb void DtSetC7NetworkByteOrdering(DtNetworkByteOrderType bigOrLittle);
196 DT_DLL_ctdb void DtSetC7FileEndian(DtNetworkByteOrderType bigOrLittle);
197 
198 #define c7NetTypes_inl
199 #include "ctdb/c7NetTypes.inl"
200 #undef c7NetTypes_inl
201 
202 
203 #endif

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)