Ice 3.8
C++ API Reference
Loading...
Searching...
No Matches
Version.h
1// Copyright (c) ZeroC, Inc.
2
3// slice2cpp version 3.8.0-alpha.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 != 30850
18# error Ice version mismatch: an exact match is required for beta generated code
19# endif
20#endif
21
22// NOLINTBEGIN(modernize-concat-nested-namespaces)
23
24namespace Ice
25{
26 struct ProtocolVersion;
27
28 struct EncodingVersion;
29}
30
31namespace Ice
32{
33 /// Represents a version of the Ice protocol. The only version implemented and supported by Ice is version 1.0.
34 /// @headerfile Ice/Ice.h
36 {
37 /// The major version of the Ice protocol.
38 std::uint8_t major;
39
40 /// The minor version of the Ice protocol.
41 std::uint8_t minor;
42
43 /// Creates a tuple with all the fields of this struct.
44 /// @return A tuple with all the fields of this struct.
45 [[nodiscard]] std::tuple<const std::uint8_t&, const std::uint8_t&> ice_tuple() const
46 {
47 return std::tie(major, minor);
48 }
49
50 /// Outputs the name and value of each field of this instance to the stream.
51 /// @param os The output stream.
52 ICE_API void ice_printFields(std::ostream& os) const;
53 };
54
55 /// Outputs the description of a ProtocolVersion to a stream, including all its fields.
56 /// @param os The output stream.
57 /// @param value The instance to output.
58 /// @return The output stream.
59 ICE_API std::ostream& operator<<(std::ostream& os, const ProtocolVersion& value);
60
61 /// Represents a version of the Slice encoding. Ice supports version 1.0 and 1.1 of this encoding.
62 /// @remarks The Slice encoding is also known as the Ice encoding.
63 /// @headerfile Ice/Ice.h
65 {
66 /// The major version of the Slice encoding.
67 std::uint8_t major;
68
69 /// The minor version of the Slice encoding.
70 std::uint8_t minor;
71
72 /// Creates a tuple with all the fields of this struct.
73 /// @return A tuple with all the fields of this struct.
74 [[nodiscard]] std::tuple<const std::uint8_t&, const std::uint8_t&> ice_tuple() const
75 {
76 return std::tie(major, minor);
77 }
78
79 /// Outputs the name and value of each field of this instance to the stream.
80 /// @param os The output stream.
81 ICE_API void ice_printFields(std::ostream& os) const;
82 };
83
84 /// Outputs the description of an EncodingVersion to a stream, including all its fields.
85 /// @param os The output stream.
86 /// @param value The instance to output.
87 /// @return The output stream.
88 ICE_API std::ostream& operator<<(std::ostream& os, const EncodingVersion& value);
89
90 /// @cond INTERNAL
91 using Ice::Tuple::operator<;
92 using Ice::Tuple::operator<=;
93 using Ice::Tuple::operator>;
94 using Ice::Tuple::operator>=;
95 using Ice::Tuple::operator==;
96 using Ice::Tuple::operator!=;
97 /// @endcond
98}
99
100// NOLINTEND(modernize-concat-nested-namespaces)
101
103#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:59
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:70
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:74
std::uint8_t major
The major version of the Slice encoding.
Definition Version.h:67
Represents a version of the Slice encoding.
Definition Version.h:65
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:38
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:45
std::uint8_t minor
The minor version of the Ice protocol.
Definition Version.h:41
Represents a version of the Ice protocol.
Definition Version.h:36