qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r571347 - in /incubator/qpid/trunk/qpid/cpp/rubygen/templates: MethodBodyDefaultVisitor.rb constants.rb
Date Thu, 30 Aug 2007 23:48:38 GMT
Author: aconway
Date: Thu Aug 30 16:48:37 2007
New Revision: 571347

URL: http://svn.apache.org/viewvc?rev=571347&view=rev
Log:
Fix compile errors in generated code.

Modified:
    incubator/qpid/trunk/qpid/cpp/rubygen/templates/MethodBodyDefaultVisitor.rb
    incubator/qpid/trunk/qpid/cpp/rubygen/templates/constants.rb

Modified: incubator/qpid/trunk/qpid/cpp/rubygen/templates/MethodBodyDefaultVisitor.rb
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/rubygen/templates/MethodBodyDefaultVisitor.rb?rev=571347&r1=571346&r2=571347&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/rubygen/templates/MethodBodyDefaultVisitor.rb (original)
+++ incubator/qpid/trunk/qpid/cpp/rubygen/templates/MethodBodyDefaultVisitor.rb Thu Aug 30
16:48:37 2007
@@ -13,19 +13,20 @@
     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

Modified: incubator/qpid/trunk/qpid/cpp/rubygen/templates/constants.rb
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/rubygen/templates/constants.rb?rev=571347&r1=571346&r2=571347&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/rubygen/templates/constants.rb (original)
+++ incubator/qpid/trunk/qpid/cpp/rubygen/templates/constants.rb Thu Aug 30 16:48:37 2007
@@ -14,7 +14,7 @@
     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} };"
         }
       }
     }



Mime
View raw message