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 /// @remarks The Slice compiler generated this struct from Slice struct `::Ice::ProtocolVersion`.
35 /// @headerfile Ice/Ice.h
37 {
38 /// The major version of the Ice protocol.
39 std::uint8_t major;
40
41 /// The minor version of the Ice protocol.
42 std::uint8_t minor;
43
44 /// Creates a tuple with all the fields of this struct.
45 /// @return A tuple with all the fields of this struct.
46 [[nodiscard]] std::tuple<const std::uint8_t&, const std::uint8_t&> ice_tuple() const
47 {
48 return std::tie(major, minor);
49 }
50
51 /// Outputs the name and value of each field of this instance to the stream.
52 /// @param os The output stream.
53 ICE_API void ice_printFields(std::ostream& os) const;
54 };
55
56 /// Outputs the description of a ProtocolVersion to a stream, including all its fields.
57 /// @param os The output stream.
58 /// @param value The instance to output.
59 /// @return The output stream.
60 ICE_API std::ostream& operator<<(std::ostream& os, const ProtocolVersion& value);
61
62 /// Represents a version of the Slice encoding. Ice supports version 1.0 and 1.1 of this encoding.
63 /// @remarks The Slice encoding is also known as the Ice encoding.
64 ///
65 /// The Slice compiler generated this struct from Slice struct `::Ice::EncodingVersion`.
66 /// @headerfile Ice/Ice.h
68 {
69 /// The major version of the Slice encoding.
70 std::uint8_t major;
71
72 /// The minor version of the Slice encoding.
73 std::uint8_t minor;
74
75 /// Creates a tuple with all the fields of this struct.
76 /// @return A tuple with all the fields of this struct.
77 [[nodiscard]] std::tuple<const std::uint8_t&, const std::uint8_t&> ice_tuple() const
78 {
79 return std::tie(major, minor);
80 }
81
82 /// Outputs the name and value of each field of this instance to the stream.
83 /// @param os The output stream.
84 ICE_API void ice_printFields(std::ostream& os) const;
85 };
86
87 /// Outputs the description of an EncodingVersion to a stream, including all its fields.
88 /// @param os The output stream.
89 /// @param value The instance to output.
90 /// @return The output stream.
91 ICE_API std::ostream& operator<<(std::ostream& os, const EncodingVersion& value);
92
93 /// @cond INTERNAL
94 using Ice::Tuple::operator<;
95 using Ice::Tuple::operator<=;
96 using Ice::Tuple::operator>;
97 using Ice::Tuple::operator>=;
98 using Ice::Tuple::operator==;
99 using Ice::Tuple::operator!=;
100 /// @endcond
101}
102
103// NOLINTEND(modernize-concat-nested-namespaces)
104
106#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:60
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:73
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:77
std::uint8_t major
The major version of the Slice encoding.
Definition Version.h:70
Represents a version of the Slice encoding.
Definition Version.h:68
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:39
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:46
std::uint8_t minor
The minor version of the Ice protocol.
Definition Version.h:42
Represents a version of the Ice protocol.
Definition Version.h:37