summaryrefslogtreecommitdiff
path: root/qpid/cpp/rubygen/templates
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-08-30 23:48:37 +0000
committerAlan Conway <aconway@apache.org>2007-08-30 23:48:37 +0000
commit13c8d4be86044a76133e175ae80261d179d3ca24 (patch)
tree1d414bc2ce7d936280ed09c8f3c23c071d68b5b8 /qpid/cpp/rubygen/templates
parent9cfc46c80e49f902f086d387c87aab33c337d77f (diff)
downloadqpid-python-13c8d4be86044a76133e175ae80261d179d3ca24.tar.gz
Fix compile errors in generated code.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@571347 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/rubygen/templates')
-rwxr-xr-xqpid/cpp/rubygen/templates/MethodBodyDefaultVisitor.rb7
-rwxr-xr-xqpid/cpp/rubygen/templates/constants.rb2
2 files changed, 5 insertions, 4 deletions
diff --git a/qpid/cpp/rubygen/templates/MethodBodyDefaultVisitor.rb b/qpid/cpp/rubygen/templates/MethodBodyDefaultVisitor.rb
index 2247c4d8a1..4944b10a84 100755
--- a/qpid/cpp/rubygen/templates/MethodBodyDefaultVisitor.rb
+++ b/qpid/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/qpid/cpp/rubygen/templates/constants.rb b/qpid/cpp/rubygen/templates/constants.rb
index 7e212bd38a..45efb35353 100755
--- a/qpid/cpp/rubygen/templates/constants.rb
+++ b/qpid/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} };"
}
}
}