Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
ProtocolVersion.h
Go to the documentation of this file.
1 /*
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements. See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership. The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License. You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied. See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  */
21 #ifndef _ProtocolVersion_
22 #define _ProtocolVersion_
23 
26 
27 #include <string>
28 
29 namespace qpid
30 {
31 namespace framing
32 {
33 
35 {
36 private:
37  uint8_t major_;
38  uint8_t minor_;
39  uint8_t protocol_;
40 
41 public:
42  explicit ProtocolVersion(uint8_t _major=0, uint8_t _minor=0, uint8_t _protocol=0)
43  : major_(_major), minor_(_minor), protocol_(_protocol) {}
44 
45  QPID_COMMON_INLINE_EXTERN uint8_t getMajor() const { return major_; }
46  QPID_COMMON_INLINE_EXTERN void setMajor(uint8_t major) { major_ = major; }
47  QPID_COMMON_INLINE_EXTERN uint8_t getMinor() const { return minor_; }
48  QPID_COMMON_INLINE_EXTERN void setMinor(uint8_t minor) { minor_ = minor; }
49  QPID_COMMON_INLINE_EXTERN uint8_t getProtocol() const { return protocol_; }
51  QPID_COMMON_EXTERN const std::string toString() const;
52 
54 
56  QPID_COMMON_INLINE_EXTERN bool operator!=(ProtocolVersion p) const { return ! (*this == p); }
61 };
62 
63 } // namespace framing
64 } // namespace qpid
65 
66 
67 #endif // ifndef _ProtocolVersion_
QPID_COMMON_INLINE_EXTERN void setProtocol(uint8_t protocol)
QPID_COMMON_INLINE_EXTERN void setMinor(uint8_t minor)
QPID_COMMON_INLINE_EXTERN uint8_t getProtocol() const
#define QPID_COMMON_INLINE_EXTERN
ProtocolVersion(uint8_t _major=0, uint8_t _minor=0, uint8_t _protocol=0)
QPID_COMMON_INLINE_EXTERN uint8_t getMinor() const
unsigned char uint8_t
Definition: IntegerTypes.h:24
QPID_COMMON_INLINE_EXTERN uint8_t getMajor() const
QPID_COMMON_INLINE_EXTERN void setMajor(uint8_t major)
QPID_COMMON_INLINE_EXTERN bool operator!=(ProtocolVersion p) const
#define QPID_COMMON_CLASS_EXTERN
Definitions and forward declarations of all types used in AMQP messages.
bool operator==(const Address &x, const Address &y)
#define QPID_COMMON_EXTERN

Qpid C++ API Reference
Generated on Tue Apr 14 2020 for Qpid C++ Client API by doxygen 1.8.5