Ice 3.7 C++98 API Reference
Loading...
Searching...
No Matches
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.11
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>
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 < 11
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
55namespace Ice
56{
57
62struct ProtocolVersion
63{
66
71 std::tuple<const ::Ice::Byte&, const ::Ice::Byte&> ice_tuple() const
72 {
73 return std::tie(major, minor);
74 }
75};
76
81struct EncodingVersion
82{
85
90 std::tuple<const ::Ice::Byte&, const ::Ice::Byte&> ice_tuple() const
91 {
92 return std::tie(major, minor);
93 }
94};
95
96using Ice::operator<;
97using Ice::operator<=;
98using Ice::operator>;
99using Ice::operator>=;
100using Ice::operator==;
101using Ice::operator!=;
102
103}
104
106namespace Ice
107{
108
109template<>
110struct StreamableTraits<::Ice::ProtocolVersion>
111{
112 static const StreamHelperCategory helper = StreamHelperCategoryStruct;
113 static const int minWireSize = 2;
114 static const bool fixedLength = true;
115};
116
117template<typename S>
118struct 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
126template<>
127struct StreamableTraits<::Ice::EncodingVersion>
128{
129 static const StreamHelperCategory helper = StreamHelperCategoryStruct;
130 static const int minWireSize = 2;
131 static const bool fixedLength = true;
132};
133
134template<typename S>
135struct 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
148namespace Ice
149{
150
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
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
292namespace Ice
293{
294
295template<>
296struct StreamableTraits< ::Ice::ProtocolVersion>
297{
298 static const StreamHelperCategory helper = StreamHelperCategoryStruct;
299 static const int minWireSize = 2;
300 static const bool fixedLength = true;
301};
302
303template<typename S>
304struct 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
313template<typename S>
314struct 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
323template<>
324struct StreamableTraits< ::Ice::EncodingVersion>
325{
326 static const StreamHelperCategory helper = StreamHelperCategoryStruct;
327 static const int minWireSize = 2;
328 static const bool fixedLength = true;
329};
330
331template<typename S>
332struct 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
341template<typename S>
342struct 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
Definition BuiltinSequences.h:113
unsigned char Byte
The mapping for the Slice byte type.
Definition Config.h:50
A version structure for the encoding version.
Definition Version.h:225
bool operator>=(const EncodingVersion &rhs_) const
Definition Version.h:283
bool operator!=(const EncodingVersion &rhs_) const
Definition Version.h:271
bool operator>(const EncodingVersion &rhs_) const
Definition Version.h:279
::Ice::Byte minor
Definition Version.h:227
::Ice::Byte major
Definition Version.h:226
bool operator==(const EncodingVersion &rhs_) const
Definition Version.h:229
bool operator<=(const EncodingVersion &rhs_) const
Definition Version.h:275
bool operator<(const EncodingVersion &rhs_) const
Definition Version.h:246
A version structure for the protocol version.
Definition Version.h:156
::Ice::Byte major
Definition Version.h:157
bool operator!=(const ProtocolVersion &rhs_) const
Definition Version.h:202
bool operator<=(const ProtocolVersion &rhs_) const
Definition Version.h:206
::Ice::Byte minor
Definition Version.h:158
bool operator>=(const ProtocolVersion &rhs_) const
Definition Version.h:214
bool operator==(const ProtocolVersion &rhs_) const
Definition Version.h:160
bool operator<(const ProtocolVersion &rhs_) const
Definition Version.h:177
bool operator>(const ProtocolVersion &rhs_) const
Definition Version.h:210