diff options
| author | Kim van der Riet <kpvdr@apache.org> | 2006-11-10 21:04:43 +0000 |
|---|---|---|
| committer | Kim van der Riet <kpvdr@apache.org> | 2006-11-10 21:04:43 +0000 |
| commit | 3b4121f6d81dd4bbf9658813931bc6791aebf2cd (patch) | |
| tree | c5b428e232846dd5dfc878b4413be079343c02fa /gentools/templ.cpp/AMQP_ClientOperations.h.tmpl | |
| parent | 150ef9fa00ab29d7bd65323d3ae62129c8fdd9e1 (diff) | |
| download | qpid-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_ClientOperations.h.tmpl')
| -rw-r--r-- | gentools/templ.cpp/AMQP_ClientOperations.h.tmpl | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/gentools/templ.cpp/AMQP_ClientOperations.h.tmpl b/gentools/templ.cpp/AMQP_ClientOperations.h.tmpl index b8010896a7..28c9831105 100644 --- a/gentools/templ.cpp/AMQP_ClientOperations.h.tmpl +++ b/gentools/templ.cpp/AMQP_ClientOperations.h.tmpl @@ -26,7 +26,6 @@ #ifndef _AMQP_ClientOperations_ #define _AMQP_ClientOperations_ -#include "AMQP_Constants.h" #include "qpid/framing/FieldTable.h" namespace qpid { @@ -35,20 +34,28 @@ namespace framing { class AMQP_ClientOperations { private: - u_int8_t major; - u_int8_t minor; + ProtocolVersion version; public: - AMQP_ClientOperations(u_int8_t major, u_int8_t minor) : major(major), minor(minor) {} + AMQP_ClientOperations(u_int8_t major, u_int8_t minor) : version(major, minor) {} + AMQP_ClientOperations(ProtocolVersion version) : version(version) {} virtual ~AMQP_ClientOperations() {} - 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 %{CLIST} ${coh_method_handler_get_method} |
