summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/optional/TestAMDI.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2016-09-01 16:37:29 +0200
committerBenoit Foucher <benoit@zeroc.com>2016-09-01 16:37:29 +0200
commitdb53db6c3e2e75d17e65e6649d85436b1e889944 (patch)
tree0df84b4b8d77eb8d35115efb9a44cec46ea80fbb /cpp/test/Ice/optional/TestAMDI.cpp
parentFixed servant locator cookie bug introduced with dispatch code changes (diff)
downloadice-db53db6c3e2e75d17e65e6649d85436b1e889944.tar.bz2
ice-db53db6c3e2e75d17e65e6649d85436b1e889944.tar.xz
ice-db53db6c3e2e75d17e65e6649d85436b1e889944.zip
Added support for C+11 marshaled results
Diffstat (limited to 'cpp/test/Ice/optional/TestAMDI.cpp')
-rw-r--r--cpp/test/Ice/optional/TestAMDI.cpp70
1 files changed, 70 insertions, 0 deletions
diff --git a/cpp/test/Ice/optional/TestAMDI.cpp b/cpp/test/Ice/optional/TestAMDI.cpp
index 94c5645d326..817afefb905 100644
--- a/cpp/test/Ice/optional/TestAMDI.cpp
+++ b/cpp/test/Ice/optional/TestAMDI.cpp
@@ -379,6 +379,75 @@ InitialI::opVoidAsync(::std::function<void()> response,
response();
}
+#ifdef ICE_CPP11_MAPPING
+void
+InitialI::opMStruct1Async(function<void(const OpMStruct1MarshaledResult&)> response,
+ function<void(exception_ptr)>,
+ const Ice::Current& current)
+{
+ response(OpMStruct1MarshaledResult(Test::SmallStruct(), current));
+}
+
+void
+InitialI::opMStruct2Async(Ice::optional<SmallStruct> p1,
+ function<void(const OpMStruct2MarshaledResult&)> response,
+ function<void(exception_ptr)>,
+ const Ice::Current& current)
+{
+ response(OpMStruct2MarshaledResult(p1, p1, current));
+}
+
+void
+InitialI::opMSeq1Async(function<void(const OpMSeq1MarshaledResult&)> response,
+ function<void(exception_ptr)>,
+ const Ice::Current& current)
+{
+ response(OpMSeq1MarshaledResult(Test::StringSeq(), current));
+}
+
+void
+InitialI::opMSeq2Async(Ice::optional<Test::StringSeq> p1,
+ function<void(const OpMSeq2MarshaledResult&)> response,
+ function<void(exception_ptr)>,
+ const Ice::Current& current)
+{
+ response(OpMSeq2MarshaledResult(p1, p1, current));
+}
+
+void
+InitialI::opMDict1Async(function<void(const OpMDict1MarshaledResult&)> response,
+ function<void(exception_ptr)>,
+ const Ice::Current& current)
+{
+ response(OpMDict1MarshaledResult(StringIntDict(), current));
+}
+
+void
+InitialI::opMDict2Async(Ice::optional<StringIntDict> p1,
+ function<void(const OpMDict2MarshaledResult&)> response,
+ function<void(exception_ptr)>,
+ const Ice::Current& current)
+{
+ response(OpMDict2MarshaledResult(p1, p1, current));
+}
+
+void
+InitialI::opMG1Async(function<void(const OpMG1MarshaledResult&)> response,
+ function<void(exception_ptr)>,
+ const Ice::Current& current)
+{
+ response(OpMG1MarshaledResult(ICE_MAKE_SHARED(G), current));
+}
+
+void
+InitialI::opMG2Async(Ice::optional<GPtr> p1,
+ function<void(const OpMG2MarshaledResult&)> response,
+ function<void(exception_ptr)>,
+ const Ice::Current& current)
+{
+ response(OpMG2MarshaledResult(p1, p1, current));
+}
+#else
void
InitialI::opMStruct1Async(function<void(const Ice::optional<SmallStruct>&)> response,
function<void(exception_ptr)>,
@@ -446,6 +515,7 @@ InitialI::opMG2Async(Ice::optional<GPtr> p1,
{
response(p1, p1);
}
+#endif
void
InitialI::supportsRequiredParamsAsync(::std::function<void(bool)> response,