summaryrefslogtreecommitdiff
path: root/cpp/rubygen
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/rubygen')
-rw-r--r--cpp/rubygen/templates/InvocationVisitor.rb4
-rw-r--r--cpp/rubygen/templates/structs.rb39
2 files changed, 2 insertions, 41 deletions
diff --git a/cpp/rubygen/templates/InvocationVisitor.rb b/cpp/rubygen/templates/InvocationVisitor.rb
index f3ac03ece2..7017872176 100644
--- a/cpp/rubygen/templates/InvocationVisitor.rb
+++ b/cpp/rubygen/templates/InvocationVisitor.rb
@@ -71,8 +71,8 @@ EOS
}
genl "public:"
indent {
- genl "InvocationVisitor(AMQP_ServerOperations* _ops) : ops(_ops), invocable(0) {}"
- genl "InvocationVisitor(Invocable* _invocable) : ops(0), invocable(_invocable) {}"
+ genl "InvocationVisitor(AMQP_ServerOperations* _ops) : ops(_ops), invocable(0), succeeded(false) {}"
+ genl "InvocationVisitor(Invocable* _invocable) : ops(0), invocable(_invocable), succeeded(false) {}"
genl "const std::string& getResult() const { return result; }"
genl "const bool hasResult() const { return !result.empty(); }"
genl "bool wasHandled() const { return succeeded; }"
diff --git a/cpp/rubygen/templates/structs.rb b/cpp/rubygen/templates/structs.rb
index 972a0386b9..571a85b827 100644
--- a/cpp/rubygen/templates/structs.rb
+++ b/cpp/rubygen/templates/structs.rb
@@ -129,45 +129,6 @@ 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)