Ice 3.7 C++11 API Reference
Version.h
Go to the documentation of this file.
1 //
2 // Copyright (c) ZeroC, Inc. All rights reserved.
3 //
4 //
5 // Ice version 3.7.10
6 //
7 // <auto-generated>
8 //
9 // Generated from file `Version.ice'
10 //
11 // Warning: do not edit this file.
12 //
13 // </auto-generated>
14 //
15 
16 #ifndef __Ice_Version_h__
17 #define __Ice_Version_h__
18 
20 #include <Ice/ProxyF.h>
21 #include <Ice/ObjectF.h>
22 #include <Ice/ValueF.h>
23 #include <Ice/Exception.h>
24 #include <Ice/LocalObject.h>
25 #include <Ice/StreamHelpers.h>
26 #include <Ice/Comparable.h>
27 #include <IceUtil/ScopedArray.h>
28 #include <Ice/Optional.h>
29 #include <IceUtil/UndefSysMacros.h>
30 
31 #ifndef ICE_IGNORE_VERSION
32 # if ICE_INT_VERSION / 100 != 307
33 # error Ice version mismatch!
34 # endif
35 # if ICE_INT_VERSION % 100 >= 50
36 # error Beta header file detected
37 # endif
38 # if ICE_INT_VERSION % 100 < 10
39 # error Ice patch level mismatch!
40 # endif
41 #endif
42 
43 #ifndef ICE_API
44 # if defined(ICE_STATIC_LIBS)
45 # define ICE_API
46 # elif defined(ICE_API_EXPORTS)
47 # define ICE_API ICE_DECLSPEC_EXPORT
48 # else
49 # define ICE_API ICE_DECLSPEC_IMPORT
50 # endif
51 #endif
52 
53 #ifdef ICE_CPP11_MAPPING // C++11 mapping
54 
55 namespace Ice
56 {
57 
63 {
66 
71  std::tuple<const ::Ice::Byte&, const ::Ice::Byte&> ice_tuple() const
72  {
73  return std::tie(major, minor);
74  }
75 };
76 
82 {
85 
90  std::tuple<const ::Ice::Byte&, const ::Ice::Byte&> ice_tuple() const
91  {
92  return std::tie(major, minor);
93  }
94 };
95 
96 using Ice::operator<;
97 using Ice::operator<=;
98 using Ice::operator>;
99 using Ice::operator>=;
100 using Ice::operator==;
101 using Ice::operator!=;
102 
103 }
104 
106 namespace Ice
107 {
108 
109 template<>
110 struct StreamableTraits<::Ice::ProtocolVersion>
111 {
112  static const StreamHelperCategory helper = StreamHelperCategoryStruct;
113  static const int minWireSize = 2;
114  static const bool fixedLength = true;
115 };
116 
117 template<typename S>
118 struct StreamReader<::Ice::ProtocolVersion, S>
119 {
120  static void read(S* istr, ::Ice::ProtocolVersion& v)
121  {
122  istr->readAll(v.major, v.minor);
123  }
124 };
125 
126 template<>
127 struct StreamableTraits<::Ice::EncodingVersion>
128 {
129  static const StreamHelperCategory helper = StreamHelperCategoryStruct;
130  static const int minWireSize = 2;
131  static const bool fixedLength = true;
132 };
133 
134 template<typename S>
135 struct StreamReader<::Ice::EncodingVersion, S>
136 {
137  static void read(S* istr, ::Ice::EncodingVersion& v)
138  {
139  istr->readAll(v.major, v.minor);
140  }
141 };
142 
143 }
145 
146 #else // C++98 mapping
147 
148 namespace Ice
149 {
150 
155 struct ProtocolVersion
156 {
159 
160  bool operator==(const ProtocolVersion& rhs_) const
161  {
162  if(this == &rhs_)
163  {
164  return true;
165  }
166  if(major != rhs_.major)
167  {
168  return false;
169  }
170  if(minor != rhs_.minor)
171  {
172  return false;
173  }
174  return true;
175  }
176 
177  bool operator<(const ProtocolVersion& rhs_) const
178  {
179  if(this == &rhs_)
180  {
181  return false;
182  }
183  if(major < rhs_.major)
184  {
185  return true;
186  }
187  else if(rhs_.major < major)
188  {
189  return false;
190  }
191  if(minor < rhs_.minor)
192  {
193  return true;
194  }
195  else if(rhs_.minor < minor)
196  {
197  return false;
198  }
199  return false;
200  }
201 
202  bool operator!=(const ProtocolVersion& rhs_) const
203  {
204  return !operator==(rhs_);
205  }
206  bool operator<=(const ProtocolVersion& rhs_) const
207  {
208  return operator<(rhs_) || operator==(rhs_);
209  }
210  bool operator>(const ProtocolVersion& rhs_) const
211  {
212  return !operator<(rhs_) && !operator==(rhs_);
213  }
214  bool operator>=(const ProtocolVersion& rhs_) const
215  {
216  return !operator<(rhs_);
217  }
218 };
219 
224 struct EncodingVersion
225 {
228 
229  bool operator==(const EncodingVersion& rhs_) const
230  {
231  if(this == &rhs_)
232  {
233  return true;
234  }
235  if(major != rhs_.major)
236  {
237  return false;
238  }
239  if(minor != rhs_.minor)
240  {
241  return false;
242  }
243  return true;
244  }
245 
246  bool operator<(const EncodingVersion& rhs_) const
247  {
248  if(this == &rhs_)
249  {
250  return false;
251  }
252  if(major < rhs_.major)
253  {
254  return true;
255  }
256  else if(rhs_.major < major)
257  {
258  return false;
259  }
260  if(minor < rhs_.minor)
261  {
262  return true;
263  }
264  else if(rhs_.minor < minor)
265  {
266  return false;
267  }
268  return false;
269  }
270 
271  bool operator!=(const EncodingVersion& rhs_) const
272  {
273  return !operator==(rhs_);
274  }
275  bool operator<=(const EncodingVersion& rhs_) const
276  {
277  return operator<(rhs_) || operator==(rhs_);
278  }
279  bool operator>(const EncodingVersion& rhs_) const
280  {
281  return !operator<(rhs_) && !operator==(rhs_);
282  }
283  bool operator>=(const EncodingVersion& rhs_) const
284  {
285  return !operator<(rhs_);
286  }
287 };
288 
289 }
290 
292 namespace Ice
293 {
294 
295 template<>
296 struct StreamableTraits< ::Ice::ProtocolVersion>
297 {
298  static const StreamHelperCategory helper = StreamHelperCategoryStruct;
299  static const int minWireSize = 2;
300  static const bool fixedLength = true;
301 };
302 
303 template<typename S>
304 struct StreamWriter< ::Ice::ProtocolVersion, S>
305 {
306  static void write(S* ostr, const ::Ice::ProtocolVersion& v)
307  {
308  ostr->write(v.major);
309  ostr->write(v.minor);
310  }
311 };
312 
313 template<typename S>
314 struct StreamReader< ::Ice::ProtocolVersion, S>
315 {
316  static void read(S* istr, ::Ice::ProtocolVersion& v)
317  {
318  istr->read(v.major);
319  istr->read(v.minor);
320  }
321 };
322 
323 template<>
324 struct StreamableTraits< ::Ice::EncodingVersion>
325 {
326  static const StreamHelperCategory helper = StreamHelperCategoryStruct;
327  static const int minWireSize = 2;
328  static const bool fixedLength = true;
329 };
330 
331 template<typename S>
332 struct StreamWriter< ::Ice::EncodingVersion, S>
333 {
334  static void write(S* ostr, const ::Ice::EncodingVersion& v)
335  {
336  ostr->write(v.major);
337  ostr->write(v.minor);
338  }
339 };
340 
341 template<typename S>
342 struct StreamReader< ::Ice::EncodingVersion, S>
343 {
344  static void read(S* istr, ::Ice::EncodingVersion& v)
345  {
346  istr->read(v.major);
347  istr->read(v.minor);
348  }
349 };
350 
351 }
353 
354 #endif
355 
357 #endif
Ice::operator!=
bool operator!=(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition: Comparable.h:196
Optional.h
Ice::EncodingVersion::major
::Ice::Byte major
Definition: Version.h:83
StreamHelpers.h
Ice::ProtocolVersion::major
::Ice::Byte major
Definition: Version.h:64
Ice::operator==
bool operator==(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition: Comparable.h:184
Ice::EncodingVersion::minor
::Ice::Byte minor
Definition: Version.h:84
Ice::EncodingVersion::ice_tuple
std::tuple< const ::Ice::Byte &, const ::Ice::Byte & > ice_tuple() const
Obtains a tuple containing all of the struct's data members.
Definition: Version.h:90
Ice::EncodingVersion
A version structure for the encoding version.
Definition: Version.h:82
Ice::operator<=
bool operator<=(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition: Comparable.h:148
Ice::Byte
unsigned char Byte
The mapping for the Slice byte type.
Definition: Config.h:50
Ice::ProtocolVersion::ice_tuple
std::tuple< const ::Ice::Byte &, const ::Ice::Byte & > ice_tuple() const
Obtains a tuple containing all of the struct's data members.
Definition: Version.h:71
Ice::operator>=
bool operator>=(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition: Comparable.h:172
LocalObject.h
Ice::ProtocolVersion::minor
::Ice::Byte minor
Definition: Version.h:65
PushDisableWarnings.h
ProxyF.h
Ice::operator<
bool operator<(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition: Comparable.h:136
UndefSysMacros.h
ObjectF.h
Ice::operator>
bool operator>(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition: Comparable.h:160
Ice
Definition: BuiltinSequences.h:56
Comparable.h
ScopedArray.h
Exception.h
ValueF.h
Ice::ProtocolVersion
A version structure for the protocol version.
Definition: Version.h:63
PopDisableWarnings.h