summaryrefslogtreecommitdiff
path: root/cpp/rubygen/amqpgen.rb
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-02-28 17:53:47 +0000
committerAlan Conway <aconway@apache.org>2008-02-28 17:53:47 +0000
commit1820dd421a096ed184a08deee9512e809312fed2 (patch)
tree3d7ec12c8fbfa3e55b8c6374ce1c73fe0fe4f7f3 /cpp/rubygen/amqpgen.rb
parenta9b496076e65aba6b23eea2284c2f3de39a0a79d (diff)
downloadqpid-python-1820dd421a096ed184a08deee9512e809312fed2.tar.gz
amqp_0_10::ProxyTemplate - tested & functional.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@632075 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/rubygen/amqpgen.rb')
-rwxr-xr-xcpp/rubygen/amqpgen.rb11
1 files changed, 3 insertions, 8 deletions
diff --git a/cpp/rubygen/amqpgen.rb b/cpp/rubygen/amqpgen.rb
index b95a507b5e..2edc573d00 100755
--- a/cpp/rubygen/amqpgen.rb
+++ b/cpp/rubygen/amqpgen.rb
@@ -136,9 +136,6 @@ class AmqpElement
@cache_child[[elname,name]] ||= children(elname).find { |c| c.name==name }
end
- # Fully qualified amqp dotted name of this element
- def dotted_name() (parent ? parent.dotted_name+"." : "") + name; end
-
# The root <amqp> element.
def root() @root ||=parent ? parent.root : self; end
@@ -167,6 +164,7 @@ end
class AmqpResponse < AmqpElement
def initialize(xml, parent) super; end
+ def fqname() (parent ? parent.dotted_name+"." : "") + "response"; end
end
class AmqpDoc < AmqpElement
@@ -454,7 +452,7 @@ class Generator
end
# Append multi-line string to generated code, prefixing each line.
- def gen (str)
+ def gen(str)
str.each_line { |line|
@out << @prefix.last unless @midline
@out << line
@@ -465,10 +463,7 @@ class Generator
end
# Append str + '\n' to generated code.
- def genl(str="")
- gen str
- gen "\n"
- end
+ def genl(str="") gen str+"\n"; end
# Generate code with added prefix.
def prefix(add, &block)