diff options
author | Alan Conway <aconway@apache.org> | 2007-08-30 23:48:37 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2007-08-30 23:48:37 +0000 |
commit | 84eff672307de3816b0372ae89ad164a162c83e2 (patch) | |
tree | 6ef2b1c8ea18cd6d3dd14ebc22bbb3983427c2da /cpp/rubygen/templates | |
parent | 72a955ddc5f5e6c2fba3dd1c0a21d538a3ce2ad9 (diff) | |
download | qpid-python-84eff672307de3816b0372ae89ad164a162c83e2.tar.gz |
Fix compile errors in generated code.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@571347 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/rubygen/templates')
-rwxr-xr-x | cpp/rubygen/templates/MethodBodyDefaultVisitor.rb | 7 | ||||
-rwxr-xr-x | cpp/rubygen/templates/constants.rb | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/cpp/rubygen/templates/MethodBodyDefaultVisitor.rb b/cpp/rubygen/templates/MethodBodyDefaultVisitor.rb index 2247c4d8a1..4944b10a84 100755 --- a/cpp/rubygen/templates/MethodBodyDefaultVisitor.rb +++ b/cpp/rubygen/templates/MethodBodyDefaultVisitor.rb @@ -13,19 +13,20 @@ class MethodBodyDefaultVisitorGen < CppGen h_file(@filename) { include "qpid/framing/MethodBodyConstVisitor" namespace(@namespace) { - genl + genl "class AMQMethodBody;" cpp_class(@classname, "public MethodBodyConstVisitor") { genl "public:" - genl "virtual void defaultVisit() = 0;" + genl "virtual void defaultVisit(const AMQMethodBody&) = 0;" @amqp.methods_.each { |m| genl "virtual void visit(const #{m.body_name}&);" } }}} cpp_file(@filename) { include(@filename) + include("all_method_bodies.h") namespace(@namespace) { @amqp.methods_.each { |m| - genl "void #{@classname}::visit(const #{m.body_name}&) { defaultVisit(); }" + genl "void #{@classname}::visit(const #{m.body_name}& b) { defaultVisit(b); }" }}} end end diff --git a/cpp/rubygen/templates/constants.rb b/cpp/rubygen/templates/constants.rb index 7e212bd38a..45efb35353 100755 --- a/cpp/rubygen/templates/constants.rb +++ b/cpp/rubygen/templates/constants.rb @@ -14,7 +14,7 @@ class ConstantsGen < CppGen h_file("#{@dir}/constants") { namespace(@namespace) { @amqp.constants.each { |c| - genl "inline const int #{c.name.shout} = #{c.value};" + genl "enum { #{c.name.shout} = #{c.value} };" } } } |