From 58b9de3354b41f68029f83f3bb2372ab57656648 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Mon, 30 Jan 2017 00:20:48 +0100 Subject: [PATCH] [DEBUG] correct the code generated, missing Future::get() --- lutinMacro_zeus.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lutinMacro_zeus.py b/lutinMacro_zeus.py index 8e5f8b0..69aba65 100644 --- a/lutinMacro_zeus.py +++ b/lutinMacro_zeus.py @@ -466,6 +466,7 @@ class ServiceDefinition: out += "#include \n" out += "#include \n" out += "#include \n" + out += "#include \n" out += "#include \n" out += "#include \n" out += "#include \n" @@ -521,6 +522,22 @@ class ServiceDefinition: out += " return zeus::ObjectRemote(out);\n" out += " }\n" out += " }\n" + out += " \n" + out += " template<> " + class_name_proxy + " zeus::Future<" + class_name_proxy + ">::get() {\n" + out += " ememory::SharedPtr out;\n" + out += " if ( m_promise == nullptr\n" + out += " || m_promise->getRaw() == nullptr) {\n" + out += " return zeus::ObjectRemote(out);\n" + out += " }\n" + out += " if (m_promise->getRaw()->getType() != zeus::message::type::answer) {\n" + out += " ZEUS_WARNING(\"No Return value ...\");\n" + out += " return zeus::ObjectRemote(out);\n" + out += " }\n" + out += " out = static_cast(m_promise->getRaw().get())->getAnswer>();\n" + out += " \n" + out += " return zeus::ObjectRemote(out);\n" + out += " }\n" + out += " \n" out += "}\n" return [filename, out]