Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET
Apache Qpid Documentation
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
qpid
framing
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
24
#include "
qpid/framing/amqp_types.h
"
25
#include "
qpid/CommonImportExport.h
"
26
27
#include <string>
28
29
namespace
qpid
30
{
31
namespace
framing
32
{
33
34
class
QPID_COMMON_CLASS_EXTERN
ProtocolVersion
35
{
36
private
:
37
uint8_t
major_;
38
uint8_t
minor_;
39
40
public
:
41
explicit
ProtocolVersion
(
uint8_t
_major=0,
uint8_t
_minor=0)
42
: major_(_major), minor_(_minor) {}
43
44
QPID_COMMON_INLINE_EXTERN
uint8_t
getMajor
()
const
{
return
major_; }
45
QPID_COMMON_INLINE_EXTERN
void
setMajor
(
uint8_t
major) { major_ = major; }
46
QPID_COMMON_INLINE_EXTERN
uint8_t
getMinor
()
const
{
return
minor_; }
47
QPID_COMMON_INLINE_EXTERN
void
setMinor
(
uint8_t
minor) { minor_ = minor; }
48
QPID_COMMON_EXTERN
const
std::string toString()
const
;
49
50
QPID_COMMON_EXTERN
ProtocolVersion
& operator=(
ProtocolVersion
p);
51
52
QPID_COMMON_EXTERN
bool
operator==
(
ProtocolVersion
p)
const
;
53
QPID_COMMON_INLINE_EXTERN
bool
operator!=
(
ProtocolVersion
p)
const
{
return
! (*
this
== p); }
54
};
55
56
}
// namespace framing
57
}
// namespace qpid
58
59
60
#endif // ifndef _ProtocolVersion_
Qpid C++ API Reference
Generated on Tue Sep 25 2012 for Qpid C++ Client API by
1.8.1.1