Ice 3.8
C++ API Reference
Loading...
Searching...
No Matches
Version.h
1// Copyright (c) ZeroC, Inc.
2
3// slice2cpp version 3.8.0
4// <auto-generated>Generated from Slice file 'Version.ice'.</auto-generated>
5// clang-format off
6
7#ifndef Ice_Version_h_
8#define Ice_Version_h_
9
11#include <Ice/Config.h>
12#include <Ice/TupleCompare.h>
13#include <cstdint>
14#include <ostream>
15
16#ifndef ICE_DISABLE_VERSION
17# if ICE_INT_VERSION / 100 != 308
18# error Ice version mismatch!
19# endif
20# if ICE_INT_VERSION % 100 >= 50
21# error Beta header file detected
22# endif
23# if ICE_INT_VERSION % 100 < 0
24# error Ice patch level mismatch!
25# endif
26#endif
27
28// NOLINTBEGIN(modernize-concat-nested-namespaces)
29
30namespace Ice
31{
32 struct ProtocolVersion;
33
34 struct EncodingVersion;
35}
36
37namespace Ice
38{
39 /// Represents a version of the Ice protocol. The only version implemented and supported by Ice is version 1.0.
40 /// @remarks The Slice compiler generated this struct from Slice struct `::Ice::ProtocolVersion`.
41 /// @headerfile Ice/Ice.h
43 {
44 /// The major version of the Ice protocol.
45 std::uint8_t major;
46
47 /// The minor version of the Ice protocol.
48 std::uint8_t minor;
49
50 /// Creates a tuple with all the fields of this struct.
51 /// @return A tuple with all the fields of this struct.
52 [[nodiscard]] std::tuple<const std::uint8_t&, const std::uint8_t&> ice_tuple() const
53 {
54 return std::tie(major, minor);
55 }
56
57 /// Outputs the name and value of each field of this instance to the stream.
58 /// @param os The output stream.
59 ICE_API void ice_printFields(std::ostream& os) const;
60 };
61
62 /// Outputs the description of a ProtocolVersion to a stream, including all its fields.
63 /// @param os The output stream.
64 /// @param value The instance to output.
65 /// @return The output stream.
66 ICE_API std::ostream& operator<<(std::ostream& os, const ProtocolVersion& value);
67
68 /// Represents a version of the Slice encoding. Ice supports version 1.0 and 1.1 of this encoding.
69 /// @remarks The Slice encoding is also known as the Ice encoding.
70 ///
71 /// The Slice compiler generated this struct from Slice struct `::Ice::EncodingVersion`.
72 /// @headerfile Ice/Ice.h
74 {
75 /// The major version of the Slice encoding.
76 std::uint8_t major;
77
78 /// The minor version of the Slice encoding.
79 std::uint8_t minor;
80
81 /// Creates a tuple with all the fields of this struct.
82 /// @return A tuple with all the fields of this struct.
83 [[nodiscard]] std::tuple<const std::uint8_t&, const std::uint8_t&> ice_tuple() const
84 {
85 return std::tie(major, minor);
86 }
87
88 /// Outputs the name and value of each field of this instance to the stream.
89 /// @param os The output stream.
90 ICE_API void ice_printFields(std::ostream& os) const;
91 };
92
93 /// Outputs the description of an EncodingVersion to a stream, including all its fields.
94 /// @param os The output stream.
95 /// @param value The instance to output.
96 /// @return The output stream.
97 ICE_API std::ostream& operator<<(std::ostream& os, const EncodingVersion& value);
98
99 /// @cond INTERNAL
100 using Ice::Tuple::operator<;
101 using Ice::Tuple::operator<=;
102 using Ice::Tuple::operator>;
103 using Ice::Tuple::operator>=;
104 using Ice::Tuple::operator==;
105 using Ice::Tuple::operator!=;
106 /// @endcond
107}
108
109// NOLINTEND(modernize-concat-nested-namespaces)
110
112#endif
std::ostream & operator<<(std::ostream &os, const Identity &value)
Outputs the description of an Identity to a stream, including all its fields.
The Ice RPC framework.
Definition SampleEvent.h:66
void ice_printFields(std::ostream &os) const
Outputs the name and value of each field of this instance to the stream.
std::uint8_t minor
The minor version of the Slice encoding.
Definition Version.h:79
std::tuple< const std::uint8_t &, const std::uint8_t & > ice_tuple() const
Creates a tuple with all the fields of this struct.
Definition Version.h:83
std::uint8_t major
The major version of the Slice encoding.
Definition Version.h:76
Represents a version of the Slice encoding.
Definition Version.h:74
void ice_printFields(std::ostream &os) const
Outputs the name and value of each field of this instance to the stream.
std::uint8_t major
The major version of the Ice protocol.
Definition Version.h:45
std::tuple< const std::uint8_t &, const std::uint8_t & > ice_tuple() const
Creates a tuple with all the fields of this struct.
Definition Version.h:52
std::uint8_t minor
The minor version of the Ice protocol.
Definition Version.h:48
Represents a version of the Ice protocol.
Definition Version.h:43