From aa0e4df68168895d4a55d687e6acd239eccd2e69 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Tue, 14 Aug 2007 16:15:26 +0000 Subject: Removed unused types: RequestId, ResponseId, MethodContext. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@565821 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/rubygen/amqpgen.rb | 9 +++ qpid/cpp/rubygen/cppgen.rb | 5 +- qpid/cpp/rubygen/templates/Proxy.rb | 142 +++++++++++------------------------- 3 files changed, 56 insertions(+), 100 deletions(-) (limited to 'qpid/cpp/rubygen') diff --git a/qpid/cpp/rubygen/amqpgen.rb b/qpid/cpp/rubygen/amqpgen.rb index edfbce2576..a144825f08 100755 --- a/qpid/cpp/rubygen/amqpgen.rb +++ b/qpid/cpp/rubygen/amqpgen.rb @@ -188,6 +188,7 @@ class Generator @outdir=outdir @prefix='' # For indentation or comments. @indentstr=' ' # One indent level. + @outdent=2 raise "Invalid output directory: #{outdir}" unless @outdir=="-" or File.directory?(@outdir) end @@ -229,6 +230,14 @@ class Generator # Generate indented code def indent(n=1,&block) prefix(@indentstr * n,&block); end + # Generate outdented code + def outdent(&block) + save=@prefix + @prefix=@prefix[0...-2] + yield + @prefix=save + end + attr_accessor :out end diff --git a/qpid/cpp/rubygen/cppgen.rb b/qpid/cpp/rubygen/cppgen.rb index 64987e763f..724634e514 100755 --- a/qpid/cpp/rubygen/cppgen.rb +++ b/qpid/cpp/rubygen/cppgen.rb @@ -172,6 +172,9 @@ class CppGen < Generator def variantl(types) "boost::variant<#{types.join(", \n")}>"; end def blank_variant(types) variant(["boost::blank"]+types); end def tuple(types) "boost::tuple<#{types.join(', ')}>"; end - + + def public() outdent { genl "public:" } end + def private() outdent { genl "private:" } end + def protected() outdent { genl "protected:" } end end diff --git a/qpid/cpp/rubygen/templates/Proxy.rb b/qpid/cpp/rubygen/templates/Proxy.rb index 40eaa2baa3..f36d6bcd99 100755 --- a/qpid/cpp/rubygen/templates/Proxy.rb +++ b/qpid/cpp/rubygen/templates/Proxy.rb @@ -15,96 +15,51 @@ class ProxyGen < CppGen def inner_class_decl(c) cname=c.name.caps - gen <