summaryrefslogtreecommitdiff
path: root/qpid/cpp/rubygen/templates
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-08-01 16:50:33 +0000
committerAlan Conway <aconway@apache.org>2007-08-01 16:50:33 +0000
commitf0281e4654f49dd1b0e4607d6721553847e428a2 (patch)
treeacc50e0425b88016d7ccaec6839c9d8e1af103aa /qpid/cpp/rubygen/templates
parentc6766aa1bf420a908acef1ea577755f8741c9d03 (diff)
downloadqpid-python-f0281e4654f49dd1b0e4607d6721553847e428a2.tar.gz
* src/generate.sh: Moved requirements test to configure.ac
* rubygen: Cleanup and improvements, template for cluster work. * configure.ac: - support for ruby code generator + cleanup. - moved "can generate" tests to configure.ac - removed redundant APR stuff. * bootstrap: Remove codegen from bootstrap, all in config/make. * src/Makefile.am (libqpidcommon_la_LIBADD): - Ruby code generator. - Improvements to existing generator rules. - Removed APR stuff. * configure.ac (CPPUNIT_CXXFLAGS): Removed APR stuff. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@561869 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/rubygen/templates')
-rw-r--r--qpid/cpp/rubygen/templates/frame_body_lists.rb31
1 files changed, 31 insertions, 0 deletions
diff --git a/qpid/cpp/rubygen/templates/frame_body_lists.rb b/qpid/cpp/rubygen/templates/frame_body_lists.rb
new file mode 100644
index 0000000000..33c416fe84
--- /dev/null
+++ b/qpid/cpp/rubygen/templates/frame_body_lists.rb
@@ -0,0 +1,31 @@
+$: << ".." # Include .. in load path
+require 'cppgen'
+
+class FrameBodyListsGen < CppGen
+
+ def initialize(outdir, amqp)
+ super(outdir, amqp);
+ end
+
+ def generate
+ h_file("qpid/framing/frame_body_lists.h") {
+ gen <<EOS
+/**@file
+ * Macro lists of frame body classes, used to generate Visitors
+ */
+EOS
+ gen "#define METHOD_BODIES() "
+ @amqp.methods.each { |m| gen "\\\n (#{m.body_name}) " }
+ gen <<EOS
+
+
+#define OTHER_BODIES() (AMQContentBody)(AMQHeaderBody)(AMQHeartbeatBody))
+
+EOS
+ }
+ end
+end
+
+FrameBodyListsGen.new(ARGV[0], Amqp).generate;
+
+