summaryrefslogtreecommitdiff
path: root/gentools/templ.cpp
diff options
context:
space:
mode:
authorKim van der Riet <kpvdr@apache.org>2006-11-14 16:56:12 +0000
committerKim van der Riet <kpvdr@apache.org>2006-11-14 16:56:12 +0000
commit18d2f941b353df77e310465bff30125768ecc8aa (patch)
treeb6f42b0b7bb680c1aadec5ea58d9017416afcc4b /gentools/templ.cpp
parenta2c787d6e266d804a6b673c5d4c207f2a16c1454 (diff)
downloadqpid-python-18d2f941b353df77e310465bff30125768ecc8aa.tar.gz
Fixes to the generated C++ code and templates
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@474866 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'gentools/templ.cpp')
-rw-r--r--gentools/templ.cpp/AMQP_Constants.h.tmpl4
-rw-r--r--gentools/templ.cpp/AMQP_ServerOperations.h.tmpl15
-rw-r--r--gentools/templ.cpp/MethodBodyClass.h.tmpl13
3 files changed, 13 insertions, 19 deletions
diff --git a/gentools/templ.cpp/AMQP_Constants.h.tmpl b/gentools/templ.cpp/AMQP_Constants.h.tmpl
index 87592119ed..c60407b014 100644
--- a/gentools/templ.cpp/AMQP_Constants.h.tmpl
+++ b/gentools/templ.cpp/AMQP_Constants.h.tmpl
@@ -27,10 +27,6 @@
*/
// NOTE: This file is intended to be included within the class structure of both
// the client and server operations classes.
-
- // Constant declarations for constants that change by version
-
-%{TLIST} ${ch_static_const_decl}
// Constant getValue methods
diff --git a/gentools/templ.cpp/AMQP_ServerOperations.h.tmpl b/gentools/templ.cpp/AMQP_ServerOperations.h.tmpl
index b802cbcdce..eed4d7960f 100644
--- a/gentools/templ.cpp/AMQP_ServerOperations.h.tmpl
+++ b/gentools/templ.cpp/AMQP_ServerOperations.h.tmpl
@@ -30,6 +30,9 @@
#define _AMQP_ServerOperations_
#include "qpid/framing/FieldTable.h"
+#include "qpid/framing/ProtocolVersion.h"
+#include "qpid/framing/ProtocolVersionException.h"
+#include <sstream>
namespace qpid {
namespace framing {
@@ -47,11 +50,11 @@ public:
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
+ inline bool isVersion(u_int8_t _major, u_int8_t _minor) const
{
return version.equals(_major, _minor);
}
- inline isVersion(ProtocolVersion& _version) const
+ inline bool isVersion(ProtocolVersion& _version) const
{
return version.equals(_version);
}
@@ -59,14 +62,14 @@ public:
// Include framing constant declarations
#include "AMQP_Constants.h"
- // Method handler get methods
-
-%{CLIST} ${soh_method_handler_get_method}
-
// Inner classes
%{CLIST} ${soh_inner_class}
+ // Method handler get methods
+
+%{CLIST} ${soh_method_handler_get_method}
+
}; /* class AMQP_ServerOperations */
} /* namespace framing */
diff --git a/gentools/templ.cpp/MethodBodyClass.h.tmpl b/gentools/templ.cpp/MethodBodyClass.h.tmpl
index f62e24729e..5d68ac4f2d 100644
--- a/gentools/templ.cpp/MethodBodyClass.h.tmpl
+++ b/gentools/templ.cpp/MethodBodyClass.h.tmpl
@@ -47,16 +47,13 @@ ${version_namespace_start}
class ${CLASS}${METHOD}Body : virtual public AMQMethodBody
{
- const int classId = ${CLASS_ID_INIT};
- const int methodId = ${METHOD_ID_INIT};
-
// Method field declarations
%{FLIST} ${mb_field_declaration}
public:
- typedef std::tr1::shared_ptr<${CLASS}${METHOD}Body> shared_ptr;
+ typedef boost::shared_ptr<${CLASS}${METHOD}Body> shared_ptr;
// Constructors and destructors
@@ -68,8 +65,6 @@ public:
inline ${CLASS}${METHOD}Body() {}
- ${CLASS}${METHOD}Body() {}
-
virtual ~${CLASS}${METHOD}Body() {}
// Attribute get methods
@@ -86,12 +81,12 @@ public:
inline u_int16_t amqpClassId() const
{
- return classId;
+ return ${CLASS_ID_INIT};
}
inline u_int16_t amqpMethodId() const
{
- return methodId;
+ return ${METHOD_ID_INIT};
}
inline u_int32_t bodySize() const
@@ -113,7 +108,7 @@ public:
inline void invoke(AMQP_ServerOperations& target, u_int16_t channel)
{
- target.getBasicHandler()->consume(
+ target.getBasicHandler()->publish(channel,
%{FLIST} ${mb_field_list}
);
}