diff options
author | Gordon Sim <gsim@apache.org> | 2007-09-06 20:27:33 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2007-09-06 20:27:33 +0000 |
commit | b33a63b36c659a894143382d0a61efe6a598fcc6 (patch) | |
tree | 0efc848ae9cc6064d615c6968b1d127e92b231d3 /cpp/rubygen/templates/structs.rb | |
parent | 748698e4b8d5bd0c3ccec4ca898d334c13fc0795 (diff) | |
download | qpid-python-b33a63b36c659a894143382d0a61efe6a598fcc6.tar.gz |
Implementation of execution.result on the client side
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@573359 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/rubygen/templates/structs.rb')
-rw-r--r-- | cpp/rubygen/templates/structs.rb | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/cpp/rubygen/templates/structs.rb b/cpp/rubygen/templates/structs.rb index fd949eb53d..363fe4ec35 100644 --- a/cpp/rubygen/templates/structs.rb +++ b/cpp/rubygen/templates/structs.rb @@ -117,19 +117,15 @@ class StructGen < CppGen end def methodbody_extra_defs(s) - if (s.content) - content = "true" - else - content = "false" - end - gen <<EOS using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } inline ClassId amqpClassId() const { return CLASS_ID; } inline MethodId amqpMethodId() const { return METHOD_ID; } - inline bool isContentBearing() const { return #{content}; } + inline bool isContentBearing() const { return #{s.content ? "true" : "false" }; } + inline bool resultExpected() const { return #{s.result ? "true" : "false"}; } + inline bool responseExpected() const { return #{s.responses().empty? ? "false" : "true"}; } EOS end @@ -201,7 +197,7 @@ EOS #as result structs have types that are only unique to the #class, they have a class dependent qualifier added to them #(this is inline with current python code but a formal - #solution is expected from the WG + #solution is expected from the WG) indent { genl "static const uint16_t TYPE = #{s.type_} + #{s.parent.parent.parent.index} * 256;" } else indent { genl "static const uint16_t TYPE = #{s.type_};" } |