1 //
2 // Copyright (c) ZeroC, Inc. All rights reserved.
3 //
4
5 #include <Ice/Communicator.h>
6 #include <TestAMDI.h>
7
8 #ifdef ICE_CPP11_MAPPING
9
10 void
opDoubleArrayAsync(std::pair<const Ice::Double *,const Ice::Double * > in,std::function<void (const Test::DoubleSeq &,const Test::DoubleSeq &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)11 TestIntfI::opDoubleArrayAsync(std::pair<const Ice::Double*, const Ice::Double*> in,
12 std::function<void(const Test::DoubleSeq&, const Test::DoubleSeq&)> response,
13 std::function<void(std::exception_ptr)>, const Ice::Current&)
14 {
15 Test::DoubleSeq out(in.first, in.second);
16 response(out, out);
17 }
18
19 void
opBoolArrayAsync(std::pair<const bool *,const bool * > in,std::function<void (const Test::BoolSeq &,const Test::BoolSeq &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)20 TestIntfI::opBoolArrayAsync(std::pair<const bool*, const bool*> in,
21 std::function<void(const Test::BoolSeq&, const Test::BoolSeq&)> response,
22 std::function<void(std::exception_ptr)>, const Ice::Current&)
23 {
24 Test::BoolSeq out(in.first, in.second);
25 response(out, out);
26 }
27
28 void
opByteArrayAsync(std::pair<const Ice::Byte *,const Ice::Byte * > in,std::function<void (const std::pair<const Ice::Byte *,const Ice::Byte * > &,const std::pair<const Ice::Byte *,const Ice::Byte * > &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)29 TestIntfI::opByteArrayAsync(std::pair<const Ice::Byte*, const Ice::Byte*> in,
30 std::function<void(const std::pair<const Ice::Byte*, const Ice::Byte*>&,
31 const std::pair<const Ice::Byte*, const Ice::Byte*>&)> response,
32 std::function<void(std::exception_ptr)>, const Ice::Current&)
33 {
34 response(in, in);
35 }
36
37 void
opVariableArrayAsync(std::pair<const Test::Variable *,const Test::Variable * > in,std::function<void (const Test::VariableList &,const Test::VariableList &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)38 TestIntfI::opVariableArrayAsync(std::pair<const Test::Variable*, const Test::Variable*> in,
39 std::function<void(const Test::VariableList&, const Test::VariableList&)> response,
40 std::function<void(std::exception_ptr)>, const Ice::Current&)
41 {
42 Test::VariableList out(in.first, in.second);
43 response(out, out);
44 }
45
46 void
opBoolRangeAsync(Test::BoolSeq in,std::function<void (const Test::BoolSeq &,const Test::BoolSeq &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)47 TestIntfI::opBoolRangeAsync(Test::BoolSeq in,
48 std::function<void(const Test::BoolSeq&, const Test::BoolSeq&)> response,
49 std::function<void(std::exception_ptr)>, const Ice::Current&)
50 {
51 response(in, in);
52 }
53
54 void
opByteRangeAsync(Test::ByteList in,std::function<void (const Test::ByteList &,const Test::ByteList &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)55 TestIntfI::opByteRangeAsync(Test::ByteList in,
56 std::function<void(const Test::ByteList&, const Test::ByteList&)> response,
57 std::function<void(std::exception_ptr)>, const Ice::Current&)
58 {
59 response(in, in);
60 }
61
62 void
opVariableRangeAsync(Test::VariableList in,std::function<void (const Test::VariableList &,const Test::VariableList &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)63 TestIntfI::opVariableRangeAsync(Test::VariableList in,
64 std::function<void(const Test::VariableList&, const Test::VariableList&)> response,
65 std::function<void(std::exception_ptr)>, const Ice::Current&)
66 {
67 response(in, in);
68 }
69
70 void
opByteRangeTypeAsync(Test::ByteList in,std::function<void (const Test::ByteList &,const Test::ByteList &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)71 TestIntfI::opByteRangeTypeAsync(Test::ByteList in,
72 std::function<void(const Test::ByteList&, const Test::ByteList&)> response,
73 std::function<void(std::exception_ptr)>, const Ice::Current&)
74 {
75 response(in, in);
76 }
77
78 void
opVariableRangeTypeAsync(Test::VariableList in,std::function<void (const Test::VariableList &,const Test::VariableList &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)79 TestIntfI::opVariableRangeTypeAsync(Test::VariableList in,
80 std::function<void(const Test::VariableList&,
81 const Test::VariableList&)> response,
82 std::function<void(std::exception_ptr)>, const Ice::Current&)
83 {
84 response(in, in);
85 }
86
87 void
opBoolSeqAsync(std::deque<bool> in,std::function<void (const std::deque<bool> &,const std::deque<bool> &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)88 TestIntfI::opBoolSeqAsync(std::deque<bool> in,
89 std::function<void(const std::deque<bool>&, const std::deque<bool>&)> response,
90 std::function<void(std::exception_ptr)>, const Ice::Current&)
91 {
92 response(in, in);
93 }
94
95 void
opBoolListAsync(Test::BoolList in,std::function<void (const Test::BoolList &,const Test::BoolList &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)96 TestIntfI::opBoolListAsync(Test::BoolList in,
97 std::function<void(const Test::BoolList&, const Test::BoolList&)> response,
98 std::function<void(std::exception_ptr)>, const Ice::Current&)
99 {
100 response(in, in);
101 }
102
103 void
opByteSeqAsync(std::deque<Ice::Byte> in,std::function<void (const std::deque<Ice::Byte> &,const std::deque<Ice::Byte> &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)104 TestIntfI::opByteSeqAsync(std::deque<Ice::Byte> in,
105 std::function<void(const std::deque<Ice::Byte>&, const std::deque<Ice::Byte>&)> response,
106 std::function<void(std::exception_ptr)>, const Ice::Current&)
107 {
108 response(in, in);
109 }
110
111 void
opByteListAsync(Test::ByteList in,std::function<void (const Test::ByteList &,const Test::ByteList &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)112 TestIntfI::opByteListAsync(Test::ByteList in,
113 std::function<void(const Test::ByteList&, const Test::ByteList&)> response,
114 std::function<void(std::exception_ptr)>, const Ice::Current&)
115 {
116 response(in, in);
117 }
118
119 void
opMyByteSeqAsync(MyByteSeq in,std::function<void (const MyByteSeq &,const MyByteSeq &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)120 TestIntfI::opMyByteSeqAsync(MyByteSeq in,
121 std::function<void(const MyByteSeq&, const MyByteSeq&)> response,
122 std::function<void(std::exception_ptr)>, const Ice::Current&)
123 {
124 response(in, in);
125 }
126
127 void
opStringAsync(Util::string_view in,std::function<void (const Util::string_view &,const Util::string_view &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)128 TestIntfI::opStringAsync(Util::string_view in,
129 std::function<void(const Util::string_view&, const Util::string_view&)> response,
130 std::function<void(std::exception_ptr)>, const Ice::Current&)
131 {
132 response(in, in);
133 }
134
135 void
opStringSeqAsync(std::deque<std::string> in,std::function<void (const std::deque<std::string> &,const std::deque<std::string> &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)136 TestIntfI::opStringSeqAsync(std::deque<std::string> in,
137 std::function<void(const std::deque<std::string>&, const std::deque<std::string>&)> response,
138 std::function<void(std::exception_ptr)>, const Ice::Current&)
139 {
140 response(in, in);
141 }
142
143 void
opStringListAsync(Test::StringList in,std::function<void (const Test::StringList &,const Test::StringList &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)144 TestIntfI::opStringListAsync(Test::StringList in,
145 std::function<void(const Test::StringList&, const Test::StringList&)> response,
146 std::function<void(std::exception_ptr)>, const Ice::Current&)
147 {
148 response(in, in);
149 }
150
151 void
opFixedSeqAsync(std::deque<Test::Fixed> in,std::function<void (const std::deque<Test::Fixed> &,const std::deque<Test::Fixed> &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)152 TestIntfI::opFixedSeqAsync(std::deque<Test::Fixed> in,
153 std::function<void(const std::deque<Test::Fixed>&,
154 const std::deque<Test::Fixed>&)> response,
155 std::function<void(std::exception_ptr)>, const Ice::Current&)
156 {
157 response(in, in);
158 }
159
160 void
opFixedListAsync(Test::FixedList in,std::function<void (const Test::FixedList &,const Test::FixedList &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)161 TestIntfI::opFixedListAsync(Test::FixedList in,
162 std::function<void(const Test::FixedList&, const Test::FixedList&)> response,
163 std::function<void(std::exception_ptr)>, const Ice::Current&)
164 {
165 response(in, in);
166 }
167
168 void
opVariableSeqAsync(std::deque<Test::Variable> in,std::function<void (const std::deque<Test::Variable> &,const std::deque<Test::Variable> &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)169 TestIntfI::opVariableSeqAsync(std::deque<Test::Variable> in,
170 std::function<void(const std::deque<Test::Variable>&,
171 const std::deque<Test::Variable>&)> response,
172 std::function<void(std::exception_ptr)>, const Ice::Current&)
173 {
174 response(in, in);
175 }
176
177 void
opVariableListAsync(Test::VariableList in,std::function<void (const Test::VariableList &,const Test::VariableList &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)178 TestIntfI::opVariableListAsync(Test::VariableList in,
179 std::function<void(const Test::VariableList&, const Test::VariableList&)> response,
180 std::function<void(std::exception_ptr)>, const Ice::Current&)
181 {
182 response(in, in);
183 }
184
185 void
opStringStringDictSeqAsync(std::deque<Test::StringStringDict> in,std::function<void (const std::deque<Test::StringStringDict> &,const std::deque<Test::StringStringDict> &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)186 TestIntfI::opStringStringDictSeqAsync(std::deque<Test::StringStringDict> in,
187 std::function<void(const std::deque<Test::StringStringDict>&,
188 const std::deque<Test::StringStringDict>&)> response,
189 std::function<void(std::exception_ptr)>, const Ice::Current&)
190 {
191 response(in, in);
192 }
193
194 void
opStringStringDictListAsync(Test::StringStringDictList in,std::function<void (const Test::StringStringDictList &,const Test::StringStringDictList &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)195 TestIntfI::opStringStringDictListAsync(Test::StringStringDictList in,
196 std::function<void(const Test::StringStringDictList&,
197 const Test::StringStringDictList&)> response,
198 std::function<void(std::exception_ptr)>, const Ice::Current&)
199 {
200 response(in, in);
201 }
202
203 void
opESeqAsync(std::deque<Test::E> in,std::function<void (const std::deque<Test::E> &,const std::deque<Test::E> &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)204 TestIntfI::opESeqAsync(std::deque<Test::E> in,
205 std::function<void(const std::deque<Test::E>&, const std::deque<Test::E>&)> response,
206 std::function<void(std::exception_ptr)>, const Ice::Current&)
207 {
208 response(in, in);
209 }
210
211 void
opEListAsync(Test::EList in,std::function<void (const Test::EList &,const Test::EList &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)212 TestIntfI::opEListAsync(Test::EList in,
213 std::function<void(const Test::EList&, const Test::EList&)> response,
214 std::function<void(std::exception_ptr)>, const Ice::Current&)
215 {
216 response(in, in);
217 }
218
219 void
opDPrxSeqAsync(std::deque<std::shared_ptr<Test::DPrx>> in,std::function<void (const std::deque<std::shared_ptr<Test::DPrx>> &,const std::deque<std::shared_ptr<Test::DPrx>> &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)220 TestIntfI::opDPrxSeqAsync(std::deque<std::shared_ptr<Test::DPrx>> in,
221 std::function<void(const std::deque<std::shared_ptr<Test::DPrx>>&,
222 const std::deque<std::shared_ptr<Test::DPrx>>&)> response,
223 std::function<void(std::exception_ptr)>, const Ice::Current&)
224 {
225 response(in, in);
226 }
227
228 void
opDPrxListAsync(Test::DPrxList in,std::function<void (const Test::DPrxList &,const Test::DPrxList &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)229 TestIntfI::opDPrxListAsync(Test::DPrxList in,
230 std::function<void(const Test::DPrxList&, const Test::DPrxList&)> response,
231 std::function<void(std::exception_ptr)>, const Ice::Current&)
232 {
233 response(in, in);
234 }
235
236 void
opCSeqAsync(std::deque<std::shared_ptr<Test::C>> in,std::function<void (const std::deque<std::shared_ptr<Test::C>> &,const std::deque<std::shared_ptr<Test::C>> &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)237 TestIntfI::opCSeqAsync(std::deque<std::shared_ptr<Test::C>> in,
238 std::function<void(const std::deque<std::shared_ptr<Test::C>>&,
239 const std::deque<std::shared_ptr<Test::C>>&)> response,
240 std::function<void(std::exception_ptr)>, const Ice::Current&)
241 {
242 response(in, in);
243 }
244
245 void
opCListAsync(Test::CList in,std::function<void (const Test::CList &,const Test::CList &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)246 TestIntfI::opCListAsync(Test::CList in,
247 std::function<void(const Test::CList&, const Test::CList&)> response,
248 std::function<void(std::exception_ptr)>, const Ice::Current&)
249 {
250 response(in, in);
251 }
252
253 void
opClassStructAsync(Test::ClassStruct in1,Test::ClassStructSeq in2,std::function<void (const Test::ClassStruct &,const Test::ClassStruct &,const Test::ClassStructSeq &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)254 TestIntfI::opClassStructAsync(Test::ClassStruct in1, Test::ClassStructSeq in2,
255 std::function<void(const Test::ClassStruct&,
256 const Test::ClassStruct&, const Test::ClassStructSeq&)> response,
257 std::function<void(std::exception_ptr)>, const Ice::Current&)
258 {
259 response(in1, in1, in2);
260 }
261
262 void
opOutArrayByteSeqAsync(Test::ByteSeq in,std::function<void (const std::pair<const Ice::Byte *,const Ice::Byte * > &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)263 TestIntfI::opOutArrayByteSeqAsync(Test::ByteSeq in,
264 std::function<void(const std::pair<const Ice::Byte*, const Ice::Byte*>&)> response,
265 std::function<void(std::exception_ptr)>, const Ice::Current&)
266 {
267 response(std::make_pair(in.data(), in.data() + in.size()));
268 }
269
270 void
opOutRangeByteSeqAsync(Test::ByteSeq in,std::function<void (const Test::ByteSeq &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)271 TestIntfI::opOutRangeByteSeqAsync(Test::ByteSeq in,
272 std::function<void(const Test::ByteSeq&)> response,
273 std::function<void(std::exception_ptr)>, const Ice::Current&)
274 {
275 response(in);
276 }
277
278 void
opIntStringDictAsync(Test::IntStringDict in,std::function<void (const Test::IntStringDict &,const Test::IntStringDict &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)279 TestIntfI::opIntStringDictAsync(Test::IntStringDict in,
280 std::function<void(const Test::IntStringDict&, const Test::IntStringDict&)> response,
281 std::function<void(std::exception_ptr)>, const Ice::Current&)
282 {
283 response(in, in);
284 }
285
286 void
opVarDictAsync(Test::CustomMap<std::string,Ice::Int> in,std::function<void (const Test::CustomMap<Ice::Long,Ice::Long> &,const Test::CustomMap<std::string,Ice::Int> &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)287 TestIntfI::opVarDictAsync(Test::CustomMap<std::string, Ice::Int> in,
288 std::function<void(const Test::CustomMap<Ice::Long, Ice::Long>&,
289 const Test::CustomMap<std::string, Ice::Int>&)> response,
290 std::function<void(std::exception_ptr)>, const Ice::Current&)
291 {
292 Test::CustomMap<Ice::Long, Ice::Long> result;
293 for(Ice::Long i = 0; i < 1000; ++i)
294 {
295 result[i] = i*i;
296 }
297 response(result, in);
298 }
299
300 void
opCustomIntStringDictAsync(std::map<Ice::Int,::Util::string_view> in,std::function<void (const std::map<Ice::Int,::Util::string_view> &,const std::map<Ice::Int,::Util::string_view> &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)301 TestIntfI::opCustomIntStringDictAsync(std::map<Ice::Int, ::Util::string_view> in,
302 std::function<void(const std::map<Ice::Int, ::Util::string_view>&,
303 const std::map<Ice::Int, ::Util::string_view>&)> response,
304 std::function<void(std::exception_ptr)>, const Ice::Current&)
305 {
306 response(in, in);
307 }
308
309 void
opShortBufferAsync(Test::ShortBuffer in,std::function<void (const Test::ShortBuffer &,const Test::ShortBuffer &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)310 TestIntfI::opShortBufferAsync(Test::ShortBuffer in,
311 std::function<void(const Test::ShortBuffer&, const Test::ShortBuffer&)> response,
312 std::function<void(std::exception_ptr)>, const Ice::Current&)
313 {
314 response(in, in);
315 }
316
317 void
opBoolBufferAsync(Test::CustomBuffer<bool> in,std::function<void (const Test::CustomBuffer<bool> &,const Test::CustomBuffer<bool> &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)318 TestIntfI::opBoolBufferAsync(Test::CustomBuffer<bool> in,
319 std::function<void(const Test::CustomBuffer<bool>&,
320 const Test::CustomBuffer<bool>&)> response,
321 std::function<void(std::exception_ptr)>, const Ice::Current&)
322 {
323 response(in, in);
324 }
325
326 void
opBufferStructAsync(Test::BufferStruct in,std::function<void (const Test::BufferStruct &)> response,std::function<void (std::exception_ptr)>,const Ice::Current &)327 TestIntfI::opBufferStructAsync(Test::BufferStruct in,
328 std::function<void(const Test::BufferStruct&)> response,
329 std::function<void(std::exception_ptr)>, const Ice::Current&)
330 {
331 response(in);
332 }
333
334 void
shutdownAsync(std::function<void ()> response,std::function<void (std::exception_ptr)>,const Ice::Current & current)335 TestIntfI::shutdownAsync(std::function<void()> response,
336 std::function<void(std::exception_ptr)>,
337 const Ice::Current& current)
338 {
339 current.adapter->getCommunicator()->shutdown();
340 response();
341 }
342
343 #else
344
345 void
opDoubleArray_async(const Test::AMD_TestIntf_opDoubleArrayPtr & opDoubleArrayCB,const std::pair<const Ice::Double *,const Ice::Double * > & inSeq,const Ice::Current &)346 TestIntfI::opDoubleArray_async(const Test::AMD_TestIntf_opDoubleArrayPtr& opDoubleArrayCB,
347 const std::pair<const Ice::Double*, const Ice::Double*>& inSeq,
348 const Ice::Current&)
349 {
350 Test::DoubleSeq outSeq(inSeq.first, inSeq.second);
351 opDoubleArrayCB->ice_response(outSeq, outSeq);
352 }
353
354 void
opBoolArray_async(const Test::AMD_TestIntf_opBoolArrayPtr & opBoolArrayCB,const std::pair<const bool *,const bool * > & inSeq,const Ice::Current &)355 TestIntfI::opBoolArray_async(const Test::AMD_TestIntf_opBoolArrayPtr& opBoolArrayCB,
356 const std::pair<const bool*, const bool*>& inSeq,
357 const Ice::Current&)
358 {
359 Test::BoolSeq outSeq(inSeq.first, inSeq.second);
360 opBoolArrayCB->ice_response(outSeq, outSeq);
361 }
362
363 void
opByteArray_async(const Test::AMD_TestIntf_opByteArrayPtr & opByteArrayCB,const std::pair<const Ice::Byte *,const Ice::Byte * > & inSeq,const Ice::Current &)364 TestIntfI::opByteArray_async(const Test::AMD_TestIntf_opByteArrayPtr& opByteArrayCB,
365 const std::pair<const Ice::Byte*, const Ice::Byte*>& inSeq,
366 const Ice::Current&)
367 {
368 opByteArrayCB->ice_response(inSeq, inSeq);
369 }
370
371 void
opVariableArray_async(const Test::AMD_TestIntf_opVariableArrayPtr & opVariableArrayCB,const std::pair<const Test::Variable *,const Test::Variable * > & inSeq,const Ice::Current &)372 TestIntfI::opVariableArray_async(const Test::AMD_TestIntf_opVariableArrayPtr& opVariableArrayCB,
373 const std::pair<const Test::Variable*, const Test::Variable*>& inSeq,
374 const Ice::Current&)
375 {
376 Test::VariableList outSeq(inSeq.first, inSeq.second);
377 opVariableArrayCB->ice_response(outSeq, outSeq);
378 }
379
380 void
opBoolRange_async(const Test::AMD_TestIntf_opBoolRangePtr & opBoolRangeCB,const std::pair<Test::BoolSeq::const_iterator,Test::BoolSeq::const_iterator> & inSeq,const Ice::Current &)381 TestIntfI::opBoolRange_async(const Test::AMD_TestIntf_opBoolRangePtr& opBoolRangeCB,
382 const std::pair<Test::BoolSeq::const_iterator, Test::BoolSeq::const_iterator>& inSeq,
383 const Ice::Current&)
384 {
385 Test::BoolSeq outSeq(inSeq.first, inSeq.second);
386 opBoolRangeCB->ice_response(outSeq, outSeq);
387 }
388
389 void
opByteRange_async(const Test::AMD_TestIntf_opByteRangePtr & opByteRangeCB,const std::pair<Test::ByteList::const_iterator,Test::ByteList::const_iterator> & inSeq,const Ice::Current &)390 TestIntfI::opByteRange_async(const Test::AMD_TestIntf_opByteRangePtr& opByteRangeCB,
391 const std::pair<Test::ByteList::const_iterator, Test::ByteList::const_iterator>& inSeq,
392 const Ice::Current&)
393 {
394 opByteRangeCB->ice_response(inSeq, inSeq);
395 }
396
397 void
opVariableRange_async(const Test::AMD_TestIntf_opVariableRangePtr & opVariableRangeCB,const std::pair<Test::VariableList::const_iterator,Test::VariableList::const_iterator> & inSeq,const Ice::Current &)398 TestIntfI::opVariableRange_async(const Test::AMD_TestIntf_opVariableRangePtr& opVariableRangeCB,
399 const std::pair<Test::VariableList::const_iterator,
400 Test::VariableList::const_iterator>& inSeq,
401 const Ice::Current&)
402 {
403 Test::VariableList outSeq(inSeq.first, inSeq.second);
404 opVariableRangeCB->ice_response(outSeq, outSeq);
405 }
406
407 void
opByteRangeType_async(const Test::AMD_TestIntf_opByteRangeTypePtr & opByteRangeTypeCB,const std::pair<Test::ByteList::const_iterator,Test::ByteList::const_iterator> & inSeq,const Ice::Current &)408 TestIntfI::opByteRangeType_async(const Test::AMD_TestIntf_opByteRangeTypePtr& opByteRangeTypeCB,
409 const std::pair<Test::ByteList::const_iterator, Test::ByteList::const_iterator>& inSeq,
410 const Ice::Current&)
411 {
412 Test::ByteList outSeq(inSeq.first, inSeq.second);
413 opByteRangeTypeCB->ice_response(outSeq, outSeq);
414 }
415
416 void
opVariableRangeType_async(const Test::AMD_TestIntf_opVariableRangeTypePtr & opVariableRangeTypeCB,const std::pair<std::deque<Test::Variable>::const_iterator,std::deque<Test::Variable>::const_iterator> & inSeq,const Ice::Current &)417 TestIntfI::opVariableRangeType_async(const Test::AMD_TestIntf_opVariableRangeTypePtr& opVariableRangeTypeCB,
418 const std::pair<std::deque<Test::Variable>::const_iterator,
419 std::deque<Test::Variable>::const_iterator>& inSeq,
420 const Ice::Current&)
421 {
422 Test::VariableList outSeq;
423 for(std::deque<Test::Variable>::const_iterator p = inSeq.first; p != inSeq.second; ++p)
424 {
425 outSeq.push_back(*p);
426 }
427 opVariableRangeTypeCB->ice_response(outSeq, outSeq);
428 }
429
430 void
opBoolSeq_async(const Test::AMD_TestIntf_opBoolSeqPtr & opBoolSeqCB,const std::deque<bool> & inSeq,const Ice::Current &)431 TestIntfI::opBoolSeq_async(const Test::AMD_TestIntf_opBoolSeqPtr& opBoolSeqCB,
432 const std::deque<bool>& inSeq,
433 const Ice::Current&)
434 {
435 std::deque<bool> outSeq(inSeq);
436 opBoolSeqCB->ice_response(outSeq, outSeq);
437 }
438
439 void
opBoolList_async(const Test::AMD_TestIntf_opBoolListPtr & opBoolListCB,const Test::BoolList & inSeq,const Ice::Current &)440 TestIntfI::opBoolList_async(const Test::AMD_TestIntf_opBoolListPtr& opBoolListCB,
441 const Test::BoolList& inSeq,
442 const Ice::Current&)
443 {
444 Test::BoolList outSeq(inSeq);
445 opBoolListCB->ice_response(outSeq, outSeq);
446 }
447
448 void
opByteSeq_async(const Test::AMD_TestIntf_opByteSeqPtr & opByteSeqCB,const std::deque<Ice::Byte> & inSeq,const Ice::Current &)449 TestIntfI::opByteSeq_async(const Test::AMD_TestIntf_opByteSeqPtr& opByteSeqCB,
450 const std::deque<Ice::Byte>& inSeq,
451 const Ice::Current&)
452 {
453 std::deque<Ice::Byte> outSeq(inSeq);
454 opByteSeqCB->ice_response(outSeq, outSeq);
455 }
456
457 void
opByteList_async(const Test::AMD_TestIntf_opByteListPtr & opByteListCB,const Test::ByteList & inSeq,const Ice::Current &)458 TestIntfI::opByteList_async(const Test::AMD_TestIntf_opByteListPtr& opByteListCB,
459 const Test::ByteList& inSeq,
460 const Ice::Current&)
461 {
462 Test::ByteList outSeq(inSeq);
463 opByteListCB->ice_response(outSeq, outSeq);
464 }
465
466 void
opMyByteSeq_async(const Test::AMD_TestIntf_opMyByteSeqPtr & opMyByteSeqCB,const MyByteSeq & inSeq,const Ice::Current &)467 TestIntfI::opMyByteSeq_async(const Test::AMD_TestIntf_opMyByteSeqPtr& opMyByteSeqCB,
468 const MyByteSeq& inSeq,
469 const Ice::Current&)
470 {
471 MyByteSeq outSeq(inSeq);
472 opMyByteSeqCB->ice_response(outSeq, outSeq);
473 }
474
475 void
opString_async(const Test::AMD_TestIntf_opStringPtr & opStringCB,const Util::string_view & inString,const Ice::Current &)476 TestIntfI::opString_async(const Test::AMD_TestIntf_opStringPtr& opStringCB,
477 const Util::string_view& inString,
478 const Ice::Current&)
479 {
480 opStringCB->ice_response(inString, inString);
481 }
482
483 void
opStringSeq_async(const Test::AMD_TestIntf_opStringSeqPtr & opStringSeqCB,const std::deque<std::string> & inSeq,const Ice::Current &)484 TestIntfI::opStringSeq_async(const Test::AMD_TestIntf_opStringSeqPtr& opStringSeqCB,
485 const std::deque<std::string>& inSeq,
486 const Ice::Current&)
487 {
488 std::deque<std::string> outSeq(inSeq);
489 opStringSeqCB->ice_response(outSeq, outSeq);
490 }
491
492 void
opStringList_async(const Test::AMD_TestIntf_opStringListPtr & opStringListCB,const Test::StringList & inSeq,const Ice::Current &)493 TestIntfI::opStringList_async(const Test::AMD_TestIntf_opStringListPtr& opStringListCB,
494 const Test::StringList& inSeq,
495 const Ice::Current&)
496 {
497 Test::StringList outSeq(inSeq);
498 opStringListCB->ice_response(outSeq, outSeq);
499 }
500
501 void
opFixedSeq_async(const Test::AMD_TestIntf_opFixedSeqPtr & opFixedSeqCB,const std::deque<Test::Fixed> & inSeq,const Ice::Current &)502 TestIntfI::opFixedSeq_async(const Test::AMD_TestIntf_opFixedSeqPtr& opFixedSeqCB,
503 const std::deque<Test::Fixed>& inSeq,
504 const Ice::Current&)
505 {
506 std::deque<Test::Fixed> outSeq(inSeq);
507 opFixedSeqCB->ice_response(outSeq, outSeq);
508 }
509
510 void
opFixedList_async(const Test::AMD_TestIntf_opFixedListPtr & opFixedListCB,const Test::FixedList & inSeq,const Ice::Current &)511 TestIntfI::opFixedList_async(const Test::AMD_TestIntf_opFixedListPtr& opFixedListCB,
512 const Test::FixedList& inSeq,
513 const Ice::Current&)
514 {
515 Test::FixedList outSeq(inSeq);
516 opFixedListCB->ice_response(outSeq, outSeq);
517 }
518
519 void
opVariableSeq_async(const Test::AMD_TestIntf_opVariableSeqPtr & opVariableSeqCB,const std::deque<Test::Variable> & inSeq,const Ice::Current &)520 TestIntfI::opVariableSeq_async(const Test::AMD_TestIntf_opVariableSeqPtr& opVariableSeqCB,
521 const std::deque<Test::Variable>& inSeq,
522 const Ice::Current&)
523 {
524 std::deque<Test::Variable> outSeq(inSeq);
525 opVariableSeqCB->ice_response(outSeq, outSeq);
526 }
527
528 void
opVariableList_async(const Test::AMD_TestIntf_opVariableListPtr & opVariableListCB,const Test::VariableList & inSeq,const Ice::Current &)529 TestIntfI::opVariableList_async(const Test::AMD_TestIntf_opVariableListPtr& opVariableListCB,
530 const Test::VariableList& inSeq,
531 const Ice::Current&)
532 {
533 Test::VariableList outSeq(inSeq);
534 opVariableListCB->ice_response(outSeq, outSeq);
535 }
536
537 void
opStringStringDictSeq_async(const Test::AMD_TestIntf_opStringStringDictSeqPtr & opStringStringDictSeqCB,const std::deque<Test::StringStringDict> & inSeq,const Ice::Current &)538 TestIntfI::opStringStringDictSeq_async(const Test::AMD_TestIntf_opStringStringDictSeqPtr& opStringStringDictSeqCB,
539 const std::deque<Test::StringStringDict>& inSeq,
540 const Ice::Current&)
541 {
542 std::deque<Test::StringStringDict> outSeq(inSeq);
543 opStringStringDictSeqCB->ice_response(outSeq, outSeq);
544 }
545
546 void
opStringStringDictList_async(const Test::AMD_TestIntf_opStringStringDictListPtr & opStringStringDictListCB,const Test::StringStringDictList & inSeq,const Ice::Current &)547 TestIntfI::opStringStringDictList_async(const Test::AMD_TestIntf_opStringStringDictListPtr& opStringStringDictListCB,
548 const Test::StringStringDictList& inSeq,
549 const Ice::Current&)
550 {
551 Test::StringStringDictList outSeq(inSeq);
552 opStringStringDictListCB->ice_response(outSeq, outSeq);
553 }
554
555 void
opESeq_async(const Test::AMD_TestIntf_opESeqPtr & opESeqCB,const std::deque<Test::E> & inSeq,const Ice::Current &)556 TestIntfI::opESeq_async(const Test::AMD_TestIntf_opESeqPtr& opESeqCB,
557 const std::deque<Test::E>& inSeq,
558 const Ice::Current&)
559 {
560 std::deque<Test::E> outSeq(inSeq);
561 opESeqCB->ice_response(outSeq, outSeq);
562 }
563
564 void
opEList_async(const Test::AMD_TestIntf_opEListPtr & opEListCB,const Test::EList & inSeq,const Ice::Current &)565 TestIntfI::opEList_async(const Test::AMD_TestIntf_opEListPtr& opEListCB,
566 const Test::EList& inSeq,
567 const Ice::Current&)
568 {
569 Test::EList outSeq(inSeq);
570 opEListCB->ice_response(outSeq, outSeq);
571 }
572
573 void
opDPrxSeq_async(const Test::AMD_TestIntf_opDPrxSeqPtr & opDPrxSeqCB,const std::deque<Test::DPrx> & inSeq,const Ice::Current &)574 TestIntfI::opDPrxSeq_async(const Test::AMD_TestIntf_opDPrxSeqPtr& opDPrxSeqCB,
575 const std::deque<Test::DPrx>& inSeq,
576 const Ice::Current&)
577 {
578 std::deque<Test::DPrx> outSeq(inSeq);
579 opDPrxSeqCB->ice_response(outSeq, outSeq);
580 }
581
582 void
opDPrxList_async(const Test::AMD_TestIntf_opDPrxListPtr & opDPrxListCB,const Test::DPrxList & inSeq,const Ice::Current &)583 TestIntfI::opDPrxList_async(const Test::AMD_TestIntf_opDPrxListPtr& opDPrxListCB,
584 const Test::DPrxList& inSeq,
585 const Ice::Current&)
586 {
587 Test::DPrxList outSeq(inSeq);
588 opDPrxListCB->ice_response(outSeq, outSeq);
589 }
590
591 void
opCSeq_async(const Test::AMD_TestIntf_opCSeqPtr & opCSeqCB,const std::deque<Test::CPtr> & inSeq,const Ice::Current &)592 TestIntfI::opCSeq_async(const Test::AMD_TestIntf_opCSeqPtr& opCSeqCB,
593 const std::deque<Test::CPtr>& inSeq,
594 const Ice::Current&)
595 {
596 std::deque<Test::CPtr> outSeq(inSeq);
597 opCSeqCB->ice_response(outSeq, outSeq);
598 }
599
600 void
opCList_async(const Test::AMD_TestIntf_opCListPtr & opCListCB,const Test::CList & inSeq,const Ice::Current &)601 TestIntfI::opCList_async(const Test::AMD_TestIntf_opCListPtr& opCListCB,
602 const Test::CList& inSeq,
603 const Ice::Current&)
604 {
605 Test::CList outSeq(inSeq);
606 opCListCB->ice_response(outSeq, outSeq);
607 }
608
609 void
opClassStruct_async(const Test::AMD_TestIntf_opClassStructPtr & cb,const Test::ClassStructPtr & inS,const Test::ClassStructSeq & inSeq,const Ice::Current &)610 TestIntfI::opClassStruct_async(const Test::AMD_TestIntf_opClassStructPtr& cb,
611 const Test::ClassStructPtr& inS,
612 const Test::ClassStructSeq& inSeq,
613 const Ice::Current&)
614 {
615 cb->ice_response(inS, inS, inSeq);
616 }
617
618 void
opOutArrayByteSeq_async(const Test::AMD_TestIntf_opOutArrayByteSeqPtr & cb,const Test::ByteSeq & inS,const Ice::Current &)619 TestIntfI::opOutArrayByteSeq_async(const Test::AMD_TestIntf_opOutArrayByteSeqPtr& cb,
620 const Test::ByteSeq& inS,
621 const Ice::Current&)
622 {
623 cb->ice_response(std::pair<const Ice::Byte*,
624 const Ice::Byte*>(&inS[0], &inS[0] + inS.size()));
625 }
626
627 void
opOutRangeByteSeq_async(const Test::AMD_TestIntf_opOutRangeByteSeqPtr & cb,const Test::ByteSeq & inS,const Ice::Current &)628 TestIntfI::opOutRangeByteSeq_async(const Test::AMD_TestIntf_opOutRangeByteSeqPtr& cb,
629 const Test::ByteSeq& inS,
630 const Ice::Current&)
631 {
632 cb->ice_response(std::pair<Test::ByteSeq::const_iterator,
633 Test::ByteSeq::const_iterator>(inS.begin(), inS.end()));
634 }
635
636 void
opIntStringDict_async(const Test::AMD_TestIntf_opIntStringDictPtr & cb,const Test::IntStringDict & inDict,const Ice::Current &)637 TestIntfI::opIntStringDict_async(const Test::AMD_TestIntf_opIntStringDictPtr& cb,
638 const Test::IntStringDict& inDict,
639 const Ice::Current&)
640 {
641 cb->ice_response(inDict, inDict);
642 }
643
644 void
opVarDict_async(const Test::AMD_TestIntf_opVarDictPtr & cb,const Test::CustomMap<std::string,Ice::Int> & inDict,const Ice::Current &)645 TestIntfI::opVarDict_async(const Test::AMD_TestIntf_opVarDictPtr& cb,
646 const Test::CustomMap<std::string, Ice::Int>& inDict,
647 const Ice::Current&)
648 {
649 Test::CustomMap<Ice::Long, Ice::Long> result;
650 for(Ice::Long i = 0; i < 1000; ++i)
651 {
652 result[i] = i*i;
653 }
654 cb->ice_response(result, inDict);
655 }
656
657 void
opCustomIntStringDict_async(const Test::AMD_TestIntf_opCustomIntStringDictPtr & cb,const std::map<Ice::Int,Util::string_view> & data,const Ice::Current &)658 TestIntfI::opCustomIntStringDict_async(const Test::AMD_TestIntf_opCustomIntStringDictPtr& cb,
659 const std::map<Ice::Int, Util::string_view>& data,
660 const Ice::Current&)
661 {
662 cb->ice_response(data, data);
663 }
664
665 void
opShortBuffer_async(const Test::AMD_TestIntf_opShortBufferPtr & cb,const Test::ShortBuffer & inS,const Ice::Current &)666 TestIntfI::opShortBuffer_async(const Test::AMD_TestIntf_opShortBufferPtr& cb, const Test::ShortBuffer& inS,
667 const Ice::Current&)
668 {
669 cb->ice_response(inS, inS);
670 }
671
672 void
opBoolBuffer_async(const Test::AMD_TestIntf_opBoolBufferPtr & cb,const Test::CustomBuffer<bool> & inS,const Ice::Current &)673 TestIntfI::opBoolBuffer_async(const Test::AMD_TestIntf_opBoolBufferPtr& cb, const Test::CustomBuffer<bool>& inS,
674 const Ice::Current&)
675 {
676 cb->ice_response(inS, inS);
677 }
678
679 void
opBufferStruct_async(const Test::AMD_TestIntf_opBufferStructPtr & cb,const Test::BufferStruct & s,const Ice::Current &)680 TestIntfI::opBufferStruct_async(const Test::AMD_TestIntf_opBufferStructPtr& cb,
681 const Test::BufferStruct& s, const Ice::Current&)
682 {
683 cb->ice_response(s);
684 }
685
686 void
shutdown_async(const Test::AMD_TestIntf_shutdownPtr & shutdownCB,const Ice::Current & current)687 TestIntfI::shutdown_async(const Test::AMD_TestIntf_shutdownPtr& shutdownCB,
688 const Ice::Current& current)
689 {
690 current.adapter->getCommunicator()->shutdown();
691 shutdownCB->ice_response();
692 }
693 #endif
694