From 03b8de17239609c9de5e18e0d59eccdd004067eb Mon Sep 17 00:00:00 2001 From: Kim van der Riet Date: Tue, 21 Nov 2006 19:44:40 +0000 Subject: Updates and bugfixes git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@477844 13f79535-47bb-0310-9956-ffa450edef68 --- gentools/templ.cpp/MethodBodyClass.h.tmpl | 32 +++++++++++-------------------- 1 file changed, 11 insertions(+), 21 deletions(-) (limited to 'gentools/templ.cpp/MethodBodyClass.h.tmpl') diff --git a/gentools/templ.cpp/MethodBodyClass.h.tmpl b/gentools/templ.cpp/MethodBodyClass.h.tmpl index 5d68ac4f2d..2a562cadcf 100644 --- a/gentools/templ.cpp/MethodBodyClass.h.tmpl +++ b/gentools/templ.cpp/MethodBodyClass.h.tmpl @@ -26,15 +26,13 @@ %{VLIST} * ${major}-${minor} */ -#include #include #include -#include "qpid/framing/amqp_types.h" -#include "AMQP_ServerOperations.h" -#include "qpid/framing/AMQMethodBody.h" -#include "qpid/framing/Buffer.h" -#include "qpid/framing/FieldTable.h" +#include +#include +#include +#include #ifndef _${CLASS}${METHOD}Body_ #define _${CLASS}${METHOD}Body_ @@ -56,15 +54,11 @@ public: typedef boost::shared_ptr<${CLASS}${METHOD}Body> shared_ptr; // Constructors and destructors - - inline ${CLASS}${METHOD}Body( -%{FLIST} ${mb_field_list_declare} - ) : -%{FLIST} ${mb_field_list_initializer} - {} - inline ${CLASS}${METHOD}Body() {} +${mb_constructor_with_initializers} + inline ${CLASS}${METHOD}Body(u_int8_t major, u_int8_t minor): AMQMethodBody(major, minor) {} + inline ${CLASS}${METHOD}Body(ProtocolVersion version): AMQMethodBody(version) {} virtual ~${CLASS}${METHOD}Body() {} // Attribute get methods @@ -96,22 +90,18 @@ public: return size; } - inline void encodeContent(Buffer& buffer) const + inline void encodeContent(Buffer&${mb_buffer_param}) const { %{FLIST} ${mb_encode} } - inline void decodeContent(Buffer& buffer) + inline void decodeContent(Buffer&${mb_buffer_param}) { %{FLIST} ${mb_decode} } - inline void invoke(AMQP_ServerOperations& target, u_int16_t channel) - { - target.getBasicHandler()->publish(channel, -%{FLIST} ${mb_field_list} - ); - } +${mb_server_operation_invoke} + }; // class ${CLASS}${METHOD}Body ${version_namespace_end} -- cgit v1.2.1