1 //
2 // Copyright (c) ZeroC, Inc. All rights reserved.
3 //
4
5 #include <WstringAMDI.h>
6
7 #ifdef ICE_CPP11_MAPPING
8
9 void
opStringAsync(std::wstring in,std::function<void (const std::wstring &,const std::wstring &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)10 Test1::WstringClassI::opStringAsync(std::wstring in,
11 std::function<void(const std::wstring&, const std::wstring&)> response,
12 std::function<void(std::exception_ptr)>, const Ice::Current&)
13 {
14 response(in, in);
15 }
16
17 void
opStructAsync(Test1::WstringStruct in,std::function<void (const Test1::WstringStruct &,const Test1::WstringStruct &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)18 Test1::WstringClassI::opStructAsync(Test1::WstringStruct in,
19 std::function<void(const Test1::WstringStruct&, const Test1::WstringStruct&)> response,
20 std::function<void(std::exception_ptr)>, const Ice::Current&)
21 {
22 response(in, in);
23 }
24
25 void
throwExceptAsync(std::wstring in,std::function<void ()>,std::function<void (std::exception_ptr)> error,const Ice::Current &)26 Test1::WstringClassI::throwExceptAsync(std::wstring in,
27 std::function<void()>,
28 std::function<void(std::exception_ptr)> error, const Ice::Current&)
29 {
30 Test1::WstringException ex(in);
31 error(std::make_exception_ptr(ex));
32 }
33
34 void
opStringAsync(std::wstring in,std::function<void (const std::wstring &,const std::wstring &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)35 Test2::WstringClassI::opStringAsync(std::wstring in,
36 std::function<void(const std::wstring&, const std::wstring&)> response,
37 std::function<void(std::exception_ptr)>, const Ice::Current&)
38 {
39 response(in, in);
40 }
41
42 void
opStructAsync(Test2::WstringStruct in,std::function<void (const Test2::WstringStruct &,const Test2::WstringStruct &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)43 Test2::WstringClassI::opStructAsync(Test2::WstringStruct in,
44 std::function<void(const Test2::WstringStruct&, const Test2::WstringStruct&)> response,
45 std::function<void(std::exception_ptr)>, const Ice::Current&)
46 {
47 response(in, in);
48 }
49
50 void
throwExceptAsync(std::wstring in,std::function<void ()>,std::function<void (std::exception_ptr)> error,const Ice::Current &)51 Test2::WstringClassI::throwExceptAsync(std::wstring in,
52 std::function<void()>,
53 std::function<void(std::exception_ptr)> error, const Ice::Current&)
54
55 {
56 Test2::WstringException ex(in);
57 error(std::make_exception_ptr(ex));
58 }
59
60 #else
61
62 void
opString_async(const Test1::AMD_WstringClass_opStringPtr & opStringCB,const::std::wstring & s1,const Ice::Current &)63 Test1::WstringClassI::opString_async(const Test1::AMD_WstringClass_opStringPtr& opStringCB,
64 const ::std::wstring& s1,
65 const Ice::Current&)
66 {
67 opStringCB->ice_response(s1, s1);
68 }
69
70 void
opStruct_async(const Test1::AMD_WstringClass_opStructPtr & opStructCB,const Test1::WstringStruct & s1,const Ice::Current &)71 Test1::WstringClassI::opStruct_async(const Test1::AMD_WstringClass_opStructPtr& opStructCB,
72 const Test1::WstringStruct& s1,
73 const Ice::Current&)
74 {
75 opStructCB->ice_response(s1, s1);
76 }
77
78 void
throwExcept_async(const Test1::AMD_WstringClass_throwExceptPtr & throwExceptCB,const::std::wstring & reason,const Ice::Current &)79 Test1::WstringClassI::throwExcept_async(const Test1::AMD_WstringClass_throwExceptPtr& throwExceptCB,
80 const ::std::wstring& reason,
81 const Ice::Current&)
82 {
83 Test1::WstringException ex;
84 ex.reason = reason;
85 throwExceptCB->ice_exception(ex);
86 }
87
88 void
opString_async(const Test2::AMD_WstringClass_opStringPtr & opStringCB,const::std::wstring & s1,const Ice::Current &)89 Test2::WstringClassI::opString_async(const Test2::AMD_WstringClass_opStringPtr& opStringCB,
90 const ::std::wstring& s1,
91 const Ice::Current&)
92 {
93 opStringCB->ice_response(s1, s1);
94 }
95
96 void
opStruct_async(const Test2::AMD_WstringClass_opStructPtr & opStructCB,const Test2::WstringStruct & s1,const Ice::Current &)97 Test2::WstringClassI::opStruct_async(const Test2::AMD_WstringClass_opStructPtr& opStructCB,
98 const Test2::WstringStruct& s1,
99 const Ice::Current&)
100 {
101 opStructCB->ice_response(s1, s1);
102 }
103
104 void
throwExcept_async(const Test2::AMD_WstringClass_throwExceptPtr & throwExceptCB,const::std::wstring & reason,const Ice::Current &)105 Test2::WstringClassI::throwExcept_async(const Test2::AMD_WstringClass_throwExceptPtr& throwExceptCB,
106 const ::std::wstring& reason,
107 const Ice::Current&)
108 {
109 Test2::WstringException ex;
110 ex.reason = reason;
111 throwExceptCB->ice_exception(ex);
112 }
113 #endif
114