summaryrefslogtreecommitdiff
path: root/cpp/rubygen/cppgen.rb
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2009-12-26 12:42:57 +0000
committerRafael H. Schloming <rhs@apache.org>2009-12-26 12:42:57 +0000
commit248f1fe188fe2307b9dcf2c87a83b653eaa1920c (patch)
treed5d0959a70218946ff72e107a6c106e32479a398 /cpp/rubygen/cppgen.rb
parent3c83a0e3ec7cf4dc23e83a340b25f5fc1676f937 (diff)
downloadqpid-python-248f1fe188fe2307b9dcf2c87a83b653eaa1920c.tar.gz
synchronized with trunk except for ruby dir
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/qpid.rnr@893970 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/rubygen/cppgen.rb')
-rwxr-xr-xcpp/rubygen/cppgen.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/cpp/rubygen/cppgen.rb b/cpp/rubygen/cppgen.rb
index 3a4228567a..7818e1c4b0 100755
--- a/cpp/rubygen/cppgen.rb
+++ b/cpp/rubygen/cppgen.rb
@@ -118,6 +118,7 @@ class AmqpRoot
# preview; map 0-10 types to preview code generator types
@@typemap = {
"bit"=> CppType.new("bool").code("Octet").defval("false"),
+ "boolean"=> CppType.new("bool").code("Octet").defval("false"),
"uint8"=>CppType.new("uint8_t").code("Octet").defval("0"),
"uint16"=>CppType.new("uint16_t").code("Short").defval("0"),
"uint32"=>CppType.new("uint32_t").code("Long").defval("0"),
@@ -146,7 +147,7 @@ end
class AmqpElement
# convert my amqp type_ attribute to a C++ type.
def amqp2cpp()
- return "ArrayDomain<#{ArrayTypes[name].amqp2cpp}> " if type_=="array"
+ return "ArrayDomain<#{array_type(name).amqp2cpp}> " if type_=="array"
return type_.amqp2cpp
end
@@ -189,7 +190,7 @@ class AmqpField
c=containing_class
c.struct(type_)
end
- def cpptype() lookup_cpptype(type_) or raise "no cpptype #{self}" end
+ def cpptype() lookup_cpptype(type_) or raise "no cpptype #{type_} for field #{self}" end
def cppname() name.lcaps.cppsafe; end
def bit?() type_ == "bit"; end
def signature() cpptype.param+" "+cppname; end