From ba57e373864d44cfae17ec8c2c9de7a55f0b4113 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Thu, 9 Aug 2007 00:03:43 +0000 Subject: Moved Proxy generation to rubygen. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@564051 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/rubygen/templates/Proxy.rb | 141 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100755 cpp/rubygen/templates/Proxy.rb (limited to 'cpp/rubygen/templates') diff --git a/cpp/rubygen/templates/Proxy.rb b/cpp/rubygen/templates/Proxy.rb new file mode 100755 index 0000000000..16824b3083 --- /dev/null +++ b/cpp/rubygen/templates/Proxy.rb @@ -0,0 +1,141 @@ +#!/usr/bin/env ruby +$: << ".." # Include .. in load path +require 'cppgen' + +class ProxyGen < CppGen + + def initialize(chassis, outdir, amqp) + super(outdir, amqp) + @chassis=chassis + @classname="AMQP_#{@chassis.caps}Proxy" + @filename="qpid/framing/#{@classname}" + end + + def proxy_member(c) c.name.lcaps+"Proxy"; end + + def inner_class_decl(c) + cname=c.name.caps + gen <" + include "#{@classname}.h" + include "qpid/framing/ChannelAdapter.h" + include "qpid/framing/amqp_types_full.h" + @amqp.methods_on(@chassis).each { + |m| include "qpid/framing/#{m.body_name}.h" } + gen <