summaryrefslogtreecommitdiff
path: root/gentools/templ.cpp/AMQP_ServerOperations.h.tmpl
diff options
context:
space:
mode:
authorKim van der Riet <kpvdr@apache.org>2006-11-10 21:04:43 +0000
committerKim van der Riet <kpvdr@apache.org>2006-11-10 21:04:43 +0000
commit3b4121f6d81dd4bbf9658813931bc6791aebf2cd (patch)
treec5b428e232846dd5dfc878b4413be079343c02fa /gentools/templ.cpp/AMQP_ServerOperations.h.tmpl
parent150ef9fa00ab29d7bd65323d3ae62129c8fdd9e1 (diff)
downloadqpid-python-3b4121f6d81dd4bbf9658813931bc6791aebf2cd.tar.gz
Latest version of gentools. Java AmqpConstants class added which allows in changes in the <constant>
declarations in spec from version to version. C++ AMQP_Constants.h file still incomplete. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@473472 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'gentools/templ.cpp/AMQP_ServerOperations.h.tmpl')
-rw-r--r--gentools/templ.cpp/AMQP_ServerOperations.h.tmpl23
1 files changed, 15 insertions, 8 deletions
diff --git a/gentools/templ.cpp/AMQP_ServerOperations.h.tmpl b/gentools/templ.cpp/AMQP_ServerOperations.h.tmpl
index b1d1c98b25..b600979047 100644
--- a/gentools/templ.cpp/AMQP_ServerOperations.h.tmpl
+++ b/gentools/templ.cpp/AMQP_ServerOperations.h.tmpl
@@ -26,7 +26,6 @@
#ifndef _AMQP_ServerOperations_
#define _AMQP_ServerOperations_
-#include "AMQP_Constants.h"
#include "qpid/framing/FieldTable.h"
namespace qpid {
@@ -35,19 +34,27 @@ namespace framing {
class AMQP_ServerOperations
{
private:
- u_int8_t major;
- u_int8_t minor;
+ ProtocolVersion version;
public:
- AMQP_ServerOperations(u_int8_t major, u_int8_t minor) : major(major), minor(minor) {}
+ AMQP_ServerOperations(u_int8_t major, u_int8_t minor) : version(major, minor) {}
+ AMQP_ServerOperations(ProtocolVersion version) : version(version) {}
virtual ~AMQP_ServerOperations() {}
- inline u_int8_t getMajor() { return major; }
- inline u_int8_t getMinor() { return minor; }
- inline isVersion(u_int8_t _major, u_int8_t _minor)
+ inline u_int8_t getMajor() const { return version.getMajor(); }
+ inline u_int8_t getMinor() const { return version.getMinor(); }
+ inline const ProtocolVersion& getVersion() const { return version; }
+ inline isVersion(u_int8_t _major, u_int8_t _minor) const
{
- return major == _major && minor == _minor;
+ return version.equals(_major, _minor);
}
+ inline isVersion(ProtocolVersion& _version) const
+ {
+ return version.equals(_version);
+ }
+
+ // Include framing constant declarations
+ #include "AMQP_Constants.h"
// Method handler get methods