diff options
| author | Alan Conway <aconway@apache.org> | 2007-08-21 21:52:31 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2007-08-21 21:52:31 +0000 |
| commit | b59aa99fe6f813dcd2cffd1a793ecbe299664217 (patch) | |
| tree | 7a0ce3168b537443af8fa8144922cccad2839538 /qpid/cpp/rubygen | |
| parent | 31f553bba8345e9bda0a7d62465d758a19309c8c (diff) | |
| download | qpid-python-b59aa99fe6f813dcd2cffd1a793ecbe299664217.tar.gz | |
Undo revision 568249, causing tests to hang.
------------------------------------------------------------------------
r568249 | gsim | 2007-08-21 16:11:20 -0400 (Tue, 21 Aug 2007) | 3 lines
Invocation now uses the visitor mechanism
------------------------------------------------------------------------
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@568298 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/rubygen')
| -rw-r--r-- | qpid/cpp/rubygen/templates/structs.rb | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/qpid/cpp/rubygen/templates/structs.rb b/qpid/cpp/rubygen/templates/structs.rb index 571a85b827..972a0386b9 100644 --- a/qpid/cpp/rubygen/templates/structs.rb +++ b/qpid/cpp/rubygen/templates/structs.rb @@ -129,6 +129,45 @@ class StructGen < CppGen inline ClassId amqpClassId() const { return CLASS_ID; } inline MethodId amqpMethodId() const { return METHOD_ID; } EOS + if (s.is_server_method?) + gen <<EOS + void invoke(AMQP_ServerOperations& target) + { + target.get#{s.amqp_parent.cppname}Handler()->#{s.cppname} + ( +EOS + if (s.amqp_parent.name == "message" && (s.name == "transfer" || s.name == "append")) + indent(4) { genl "*this" } + else + indent(4) { genl s.param_names.join(",\n") } + end + + genl <<EOS + ); + } + + bool invoke(Invocable* target) + { + AMQP_ServerOperations::#{s.amqp_parent.cppname}Handler* ptr + = dynamic_cast<AMQP_ServerOperations::#{s.amqp_parent.cppname}Handler*>(target); + if (ptr) { + ptr->#{s.cppname}( +EOS + if (s.amqp_parent.name == "message" && (s.name == "transfer" || s.name == "append")) + indent(5) { genl "*this" } + else + indent(5) { genl s.param_names.join(",\n") } + end + + gen <<EOS + ); + return true; + } else { + return false; + } + } +EOS + end end def define_constructor(name, s) |
