1 //
2 // Copyright (c) ZeroC, Inc. All rights reserved.
3 //
4 
5 #ifndef ICE_PROXY_H
6 #define ICE_PROXY_H
7 
8 #include <IceUtil/Shared.h>
9 #include <IceUtil/Mutex.h>
10 #include <Ice/ProxyF.h>
11 #include <Ice/ProxyFactoryF.h>
12 #include <Ice/ConnectionIF.h>
13 #include <Ice/RequestHandlerF.h>
14 #include <Ice/EndpointF.h>
15 #include <Ice/EndpointTypes.h>
16 #include <Ice/Object.h>
17 #include <Ice/ObjectAdapterF.h>
18 #include <Ice/ReferenceF.h>
19 #include <Ice/BatchRequestQueueF.h>
20 #include <Ice/AsyncResult.h>
21 //#include <Ice/RouterF.h> // Can't include RouterF.h here, otherwise we have cyclic includes
22 //#include <Ice/LocatorF.h> // Can't include LocatorF.h here, otherwise we have cyclic includes
23 #include <Ice/Current.h>
24 #include <Ice/CommunicatorF.h>
25 #include <Ice/OutgoingAsync.h>
26 #include <Ice/LocalException.h>
27 #include <iosfwd>
28 
29 namespace Ice
30 {
31 
32 /** Marker value used to indicate that no explicit context was passed to a proxy invocation. */
33 ICE_API extern const Context noExplicitContext;
34 
35 }
36 
37 #if defined(_MSC_VER) && (_MSC_VER <= 1600)
38 //
39 // COMPILERFIX v90 and v100 get confused with namespaces and complains that
40 // ::Ice::noExplicitContext isn't defined in IceProxy namespace.
41 //
42 namespace IceProxy
43 {
44 
45 namespace Ice
46 {
47 
48 /** Marker value used to indicate that no explicit context was passed to a proxy invocation. */
49 ICE_API extern const ::Ice::Context noExplicitContext;
50 
51 }
52 
53 }
54 #endif
55 
56 namespace IceInternal
57 {
58 
59 //
60 // Class for handling the proxy's begin_ice_flushBatchRequest request.
61 //
62 class ICE_API ProxyFlushBatchAsync : public ProxyOutgoingAsyncBase
63 {
64 public:
65 
66     ProxyFlushBatchAsync(const Ice::ObjectPrxPtr&);
67 
68     virtual AsyncStatus invokeRemote(const Ice::ConnectionIPtr&, bool, bool);
69     virtual AsyncStatus invokeCollocated(CollocatedRequestHandler*);
70 
71     void invoke(const std::string&);
72 
73 private:
74 
75     int _batchRequestNum;
76 };
77 typedef IceUtil::Handle<ProxyFlushBatchAsync> ProxyFlushBatchAsyncPtr;
78 
79 //
80 // Class for handling the proxy's begin_ice_getConnection request.
81 //
82 class ICE_API ProxyGetConnection :  public ProxyOutgoingAsyncBase
83 {
84 public:
85 
86     ProxyGetConnection(const Ice::ObjectPrxPtr&);
87 
88     virtual AsyncStatus invokeRemote(const Ice::ConnectionIPtr&, bool, bool);
89     virtual AsyncStatus invokeCollocated(CollocatedRequestHandler*);
90 
91     virtual Ice::ConnectionPtr getConnection() const;
92 
93     void invoke(const std::string&);
94 };
95 typedef IceUtil::Handle<ProxyGetConnection> ProxyGetConnectionPtr;
96 
97 }
98 
99 #ifdef ICE_CPP11_MAPPING // C++11 mapping
100 
101 namespace IceInternal
102 {
103 
104 template<typename P>
createProxy()105 ::std::shared_ptr<P> createProxy()
106 {
107     return ::std::shared_ptr<P>(new P());
108 }
109 
110 inline ::std::pair<const Ice::Byte*, const Ice::Byte*>
makePair(const Ice::ByteSeq & seq)111 makePair(const Ice::ByteSeq& seq)
112 {
113     if(seq.empty())
114     {
115         return { nullptr, nullptr };
116     }
117     else
118     {
119         return { seq.data(), seq.data() + seq.size() };
120     }
121 }
122 
123 template<typename R>
124 class InvokeOutgoingAsyncT : public OutgoingAsync
125 {
126 public:
127 
128     using OutgoingAsync::OutgoingAsync;
129 
130     void
invoke(const std::string & operation,Ice::OperationMode mode,const::std::pair<const::Ice::Byte *,const::Ice::Byte * > & inParams,const Ice::Context & context)131     invoke(const std::string& operation,
132            Ice::OperationMode mode,
133            const ::std::pair<const ::Ice::Byte*, const ::Ice::Byte*>& inParams,
134            const Ice::Context& context)
135     {
136         _read = [](bool ok, Ice::InputStream* stream)
137         {
138             const ::Ice::Byte* encaps;
139             ::Ice::Int sz;
140             stream->readEncapsulation(encaps, sz);
141             return R { ok, { encaps, encaps + sz } };
142         };
143 
144         try
145         {
146             prepare(operation, mode, context);
147             if(inParams.first == inParams.second)
148             {
149                 _os.writeEmptyEncapsulation(_encoding);
150             }
151             else
152             {
153                 _os.writeEncapsulation(inParams.first, static_cast<Ice::Int>(inParams.second - inParams.first));
154             }
155             OutgoingAsync::invoke(operation);
156         }
157         catch(const Ice::Exception& ex)
158         {
159             abort(ex);
160         }
161     }
162 
163 protected:
164 
165     std::function<R(bool, Ice::InputStream*)> _read;
166 };
167 
168 template<typename R>
169 class InvokeLambdaOutgoing : public InvokeOutgoingAsyncT<R>, public LambdaInvoke
170 {
171 public:
172 
InvokeLambdaOutgoing(const::std::shared_ptr<::Ice::ObjectPrx> & proxy,::std::function<void (R)> response,::std::function<void (::std::exception_ptr)> ex,::std::function<void (bool)> sent)173     InvokeLambdaOutgoing(const ::std::shared_ptr<::Ice::ObjectPrx>& proxy,
174                          ::std::function<void(R)> response,
175                          ::std::function<void(::std::exception_ptr)> ex,
176                          ::std::function<void(bool)> sent) :
177         InvokeOutgoingAsyncT<R>(proxy, false), LambdaInvoke(::std::move(ex), ::std::move(sent))
178     {
179         if(response)
180         {
181             _response = [this, response](bool ok)
182             {
183                 if(this->_is.b.empty())
184                 {
185                     response(R { ok, { 0, 0 }});
186                 }
187                 else
188                 {
189                     response(this->_read(ok, &this->_is));
190                 }
191             };
192         }
193     }
194 };
195 
196 template<typename P, typename R>
197 class InvokePromiseOutgoing : public InvokeOutgoingAsyncT<R>, public PromiseInvoke<P>
198 {
199 public:
200 
InvokePromiseOutgoing(const std::shared_ptr<Ice::ObjectPrx> & proxy,bool synchronous)201     InvokePromiseOutgoing(const std::shared_ptr<Ice::ObjectPrx>& proxy, bool synchronous) :
202         InvokeOutgoingAsyncT<R>(proxy, false)
203     {
204         this->_synchronous = synchronous;
205         this->_response = [this](bool ok)
206         {
207             if(this->_is.b.empty())
208             {
209                 this->_promise.set_value(R { ok, { 0, 0 }});
210             }
211             else
212             {
213                 this->_promise.set_value(this->_read(ok, &this->_is));
214             }
215         };
216     }
217 
handleSent(bool done,bool)218     virtual bool handleSent(bool done, bool) override
219     {
220         if(done)
221         {
222             this->_promise.set_value(R { true, { 0, 0 }});
223         }
224         return false;
225     }
226 };
227 
228 class ProxyGetConnectionLambda : public ProxyGetConnection, public LambdaInvoke
229 {
230 public:
231 
ProxyGetConnectionLambda(const::std::shared_ptr<::Ice::ObjectPrx> & proxy,::std::function<void (::std::shared_ptr<Ice::Connection>)> response,::std::function<void (::std::exception_ptr)> ex,::std::function<void (bool)> sent)232     ProxyGetConnectionLambda(const ::std::shared_ptr<::Ice::ObjectPrx>& proxy,
233                              ::std::function<void(::std::shared_ptr<Ice::Connection>)> response,
234                              ::std::function<void(::std::exception_ptr)> ex,
235                              ::std::function<void(bool)> sent) :
236         ProxyGetConnection(proxy), LambdaInvoke(::std::move(ex), ::std::move(sent))
237     {
238         _response = [&, response](bool)
239         {
240             response(getConnection());
241         };
242     }
243 };
244 
245 template<typename P>
246 class ProxyGetConnectionPromise : public ProxyGetConnection, public PromiseInvoke<P>
247 {
248 public:
249 
ProxyGetConnectionPromise(const::std::shared_ptr<::Ice::ObjectPrx> & proxy)250     ProxyGetConnectionPromise(const ::std::shared_ptr<::Ice::ObjectPrx>& proxy) : ProxyGetConnection(proxy)
251     {
252         this->_response = [&](bool)
253         {
254             this->_promise.set_value(getConnection());
255         };
256     }
257 };
258 
259 class ProxyFlushBatchLambda : public ProxyFlushBatchAsync, public LambdaInvoke
260 {
261 public:
262 
ProxyFlushBatchLambda(const::std::shared_ptr<::Ice::ObjectPrx> & proxy,::std::function<void (::std::exception_ptr)> ex,::std::function<void (bool)> sent)263     ProxyFlushBatchLambda(const ::std::shared_ptr<::Ice::ObjectPrx>& proxy,
264                           ::std::function<void(::std::exception_ptr)> ex,
265                           ::std::function<void(bool)> sent) :
266         ProxyFlushBatchAsync(proxy), LambdaInvoke(::std::move(ex), ::std::move(sent))
267     {
268     }
269 };
270 
271 template<typename P>
272 class ProxyFlushBatchPromise : public ProxyFlushBatchAsync, public PromiseInvoke<P>
273 {
274 public:
275 
276     using ProxyFlushBatchAsync::ProxyFlushBatchAsync;
277 
handleSent(bool,bool)278     virtual bool handleSent(bool, bool) override
279     {
280         this->_promise.set_value();
281         return false;
282     }
283 };
284 
285 }
286 
287 namespace Ice
288 {
289 
290 class RouterPrx;
291 /// \cond INTERNAL
292 using RouterPrxPtr = ::std::shared_ptr<::Ice::RouterPrx>;
293 /// \endcond
294 
295 class LocatorPrx;
296 /// \cond INTERNAL
297 using LocatorPrxPtr = ::std::shared_ptr<::Ice::LocatorPrx>;
298 /// \endcond
299 
300 class LocalException;
301 class OutputStream;
302 
303 /**
304  * Base class of all object proxies.
305  * \headerfile Ice/Ice.h
306  */
307 class ICE_API ObjectPrx : public ::std::enable_shared_from_this<ObjectPrx>
308 {
309 public:
310 
311     virtual ~ObjectPrx() = default;
312 
313     friend ICE_API bool operator<(const ObjectPrx&, const ObjectPrx&);
314     friend ICE_API bool operator==(const ObjectPrx&, const ObjectPrx&);
315 
316     /**
317      * Obtains the communicator that created this proxy.
318      * @return The communicator that created this proxy.
319      */
320     ::std::shared_ptr<::Ice::Communicator> ice_getCommunicator() const;
321 
322     /**
323      * Obtains a stringified version of this proxy.
324      * @return A stringified proxy.
325      */
326     ::std::string ice_toString() const;
327 
328     /**
329      * Tests whether this object supports a specific Slice interface.
330      * @param typeId The type ID of the Slice interface to test against.
331      * @param context The context map for the invocation.
332      * @return true if the target object has the interface
333      * specified by id or derives from the interface specified by id.
334      */
335     bool
336     ice_isA(const ::std::string& typeId, const ::Ice::Context& context = ::Ice::noExplicitContext)
337     {
338         return _makePromiseOutgoing<bool>(true, this, &ObjectPrx::_iceI_isA, typeId, context).get();
339     }
340 
341     /**
342      * Tests whether this object supports a specific Slice interface.
343      * @param typeId The type ID of the Slice interface to test against.
344      * @param response The response callback.
345      * @param ex The exception callback.
346      * @param sent The sent callback.
347      * @param context The context map for the invocation.
348      * @return A function that can be called to cancel the invocation locally.
349      */
350     ::std::function<void()>
351     ice_isAAsync(const ::std::string& typeId,
352                  ::std::function<void(bool)> response,
353                  ::std::function<void(::std::exception_ptr)> ex = nullptr,
354                  ::std::function<void(bool)> sent = nullptr,
355                  const ::Ice::Context& context = ::Ice::noExplicitContext)
356     {
357         return _makeLamdaOutgoing<bool>(response, ex, sent, this, &ObjectPrx::_iceI_isA, typeId, context);
358     }
359 
360     /**
361      * Tests whether this object supports a specific Slice interface.
362      * @param typeId The type ID of the Slice interface to test against.
363      * @param context The context map for the invocation.
364      * @return The future object for the invocation.
365      */
366     template<template<typename> class P = std::promise> auto
367     ice_isAAsync(const ::std::string& typeId, const ::Ice::Context& context = ::Ice::noExplicitContext)
368         -> decltype(std::declval<P<bool>>().get_future())
369     {
370         return _makePromiseOutgoing<bool, P>(false, this, &ObjectPrx::_iceI_isA, typeId, context);
371     }
372 
373     /// \cond INTERNAL
374     void
375     _iceI_isA(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<bool>>&, const ::std::string&, const ::Ice::Context&);
376     /// \endcond
377 
378     /**
379      * Tests whether the target object of this proxy can be reached.
380      * @param context The context map for the invocation.
381      */
382     void
383     ice_ping(const ::Ice::Context& context = ::Ice::noExplicitContext)
384     {
385         _makePromiseOutgoing<void>(true, this, &ObjectPrx::_iceI_ping, context).get();
386     }
387 
388     /**
389      * Tests whether the target object of this proxy can be reached.
390      * @param response The response callback.
391      * @param ex The exception callback.
392      * @param sent The sent callback.
393      * @param context The context map for the invocation.
394      * @return A function that can be called to cancel the invocation locally.
395      */
396     ::std::function<void()>
397     ice_pingAsync(::std::function<void()> response,
398                   ::std::function<void(::std::exception_ptr)> ex = nullptr,
399                   ::std::function<void(bool)> sent = nullptr,
400                   const ::Ice::Context& context = ::Ice::noExplicitContext)
401     {
402         return _makeLamdaOutgoing<void>(response, ex, sent, this, &ObjectPrx::_iceI_ping, context);
403     }
404 
405     /**
406      * Tests whether the target object of this proxy can be reached.
407      * @param context The context map for the invocation.
408      * @return The future object for the invocation.
409      */
410     template<template<typename> class P = std::promise>
411     auto ice_pingAsync(const ::Ice::Context& context = ::Ice::noExplicitContext)
412         -> decltype(std::declval<P<void>>().get_future())
413     {
414         return _makePromiseOutgoing<void, P>(false, this, &ObjectPrx::_iceI_ping, context);
415     }
416 
417     /// \cond INTERNAL
418     void
419     _iceI_ping(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<void>>&, const ::Ice::Context&);
420     /// \endcond
421 
422     /**
423      * Returns the Slice type IDs of the interfaces supported by the target object of this proxy.
424      * @param context The context map for the invocation.
425      * @return The Slice type IDs of the interfaces supported by the target object, in base-to-derived
426      * order. The first element of the returned array is always "::Ice::Object".
427      */
428     ::std::vector<::std::string>
429     ice_ids(const ::Ice::Context& context = ::Ice::noExplicitContext)
430     {
431         return _makePromiseOutgoing<::std::vector<::std::string>>(true, this, &ObjectPrx::_iceI_ids, context).get();
432     }
433 
434     /**
435      * Returns the Slice type IDs of the interfaces supported by the target object of this proxy.
436      * @param response The response callback.
437      * @param ex The exception callback.
438      * @param sent The sent callback.
439      * @param context The context map for the invocation.
440      * @return A function that can be called to cancel the invocation locally.
441      */
442     ::std::function<void()>
443     ice_idsAsync(::std::function<void(::std::vector<::std::string>)> response,
444                  ::std::function<void(::std::exception_ptr)> ex = nullptr,
445                  ::std::function<void(bool)> sent = nullptr,
446                  const ::Ice::Context& context = ::Ice::noExplicitContext)
447     {
448         return _makeLamdaOutgoing<::std::vector<::std::string>>(response, ex, sent, this, &ObjectPrx::_iceI_ids, context);
449     }
450 
451     /**
452      * Returns the Slice type IDs of the interfaces supported by the target object of this proxy.
453      * @param context The context map for the invocation.
454      * @return The future object for the invocation.
455      */
456     template<template<typename> class P = std::promise> auto
457     ice_idsAsync(const ::Ice::Context& context = ::Ice::noExplicitContext)
458         -> decltype(std::declval<P<::std::vector<::std::string>>>().get_future())
459     {
460         return _makePromiseOutgoing<::std::vector<::std::string>, P>(false, this, &ObjectPrx::_iceI_ids, context);
461     }
462 
463     /// \cond INTERNAL
464     void
465     _iceI_ids(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<::std::vector<::std::string>>>&, const ::Ice::Context&);
466     /// \endcond
467 
468     /**
469      * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy.
470      * @param context The context map for the invocation.
471      * @return The Slice type ID of the most-derived interface.
472      */
473     ::std::string
474     ice_id(const ::Ice::Context& context = ::Ice::noExplicitContext)
475     {
476         return _makePromiseOutgoing<::std::string>(true, this, &ObjectPrx::_iceI_id, context).get();
477     }
478 
479     /**
480      * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy.
481      * @param response The response callback.
482      * @param ex The exception callback.
483      * @param sent The sent callback.
484      * @param context The context map for the invocation.
485      * @return A function that can be called to cancel the invocation locally.
486      */
487     ::std::function<void()>
488     ice_idAsync(::std::function<void(::std::string)> response,
489                 ::std::function<void(::std::exception_ptr)> ex = nullptr,
490                 ::std::function<void(bool)> sent = nullptr,
491                 const ::Ice::Context& context = ::Ice::noExplicitContext)
492     {
493         return _makeLamdaOutgoing<::std::string>(response, ex, sent, this, &ObjectPrx::_iceI_id, context);
494     }
495 
496     /**
497      * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy.
498      * @param context The context map for the invocation.
499      * @return The future object for the invocation.
500      */
501     template<template<typename> class P = std::promise>
502     auto ice_idAsync(const ::Ice::Context& context = ::Ice::noExplicitContext)
503         -> decltype(std::declval<P<::std::string>>().get_future())
504     {
505         return _makePromiseOutgoing<::std::string, P>(false, this, &ObjectPrx::_iceI_id, context);
506     }
507 
508     /// \cond INTERNAL
509     void
510     _iceI_id(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<::std::string>>&, const ::Ice::Context&);
511     /// \endcond
512 
513     /**
514      * Returns the Slice type ID associated with this type.
515      * @return The Slice type ID.
516      */
ice_staticId()517     static const ::std::string& ice_staticId()
518     {
519         return ::Ice::Object::ice_staticId();
520     }
521 
522     /**
523      * Invokes an operation dynamically.
524      * @param operation The name of the operation to invoke.
525      * @param mode The operation mode (normal or idempotent).
526      * @param inParams An encapsulation containing the encoded in-parameters for the operation.
527      * @param outParams An encapsulation containing the encoded results.
528      * @param context The context map for the invocation.
529      * @return True if the operation completed successfully, in which case outParams contains
530      * the encoded out parameters. False if the operation raised a user exception, in which
531      * case outParams contains the encoded user exception. If the operation raises a run-time
532      * exception, it throws it directly.
533      */
534     bool
535     ice_invoke(const ::std::string& operation,
536                ::Ice::OperationMode mode,
537                const ::std::vector<Byte>& inParams,
538                ::std::vector<::Ice::Byte>& outParams,
539                const ::Ice::Context& context = ::Ice::noExplicitContext)
540     {
541         return ice_invoke(operation, mode, ::IceInternal::makePair(inParams), outParams, context);
542     }
543 
544     /**
545      * Invokes an operation dynamically.
546      * @param operation The name of the operation to invoke.
547      * @param mode The operation mode (normal or idempotent).
548      * @param inParams An encapsulation containing the encoded in-parameters for the operation.
549      * @param context The context map for the invocation.
550      * @return The future object for the invocation.
551      */
552     template<template<typename> class P = std::promise> auto
553     ice_invokeAsync(const ::std::string& operation,
554                     ::Ice::OperationMode mode,
555                     const ::std::vector<Byte>& inParams,
556                     const ::Ice::Context& context = ::Ice::noExplicitContext)
557         -> decltype(std::declval<P<::Ice::Object::Ice_invokeResult>>().get_future())
558     {
559         return ice_invokeAsync<P>(operation, mode, ::IceInternal::makePair(inParams), context);
560     }
561 
562     /**
563      * Invokes an operation dynamically.
564      * @param operation The name of the operation to invoke.
565      * @param mode The operation mode (normal or idempotent).
566      * @param inParams An encapsulation containing the encoded in-parameters for the operation.
567      * @param response The response callback.
568      * @param ex The exception callback.
569      * @param sent The sent callback.
570      * @param context The context map for the invocation.
571      * @return A function that can be called to cancel the invocation locally.
572      */
573     ::std::function<void()>
574     ice_invokeAsync(const ::std::string& operation,
575                     ::Ice::OperationMode mode,
576                     const ::std::vector<::Ice::Byte>& inParams,
577                     ::std::function<void(bool, ::std::vector<::Ice::Byte>)> response,
578                     ::std::function<void(::std::exception_ptr)> ex = nullptr,
579                     ::std::function<void(bool)> sent = nullptr,
580                     const ::Ice::Context& context = ::Ice::noExplicitContext)
581     {
582         using Outgoing = ::IceInternal::InvokeLambdaOutgoing<::Ice::Object::Ice_invokeResult>;
583         ::std::function<void(::Ice::Object::Ice_invokeResult&&)> r;
584         if(response)
585         {
586             r = [response](::Ice::Object::Ice_invokeResult&& result)
587             {
588                 response(result.returnValue, std::move(result.outParams));
589             };
590         }
591         auto outAsync = ::std::make_shared<Outgoing>(shared_from_this(), r, ex, sent);
592         outAsync->invoke(operation, mode, ::IceInternal::makePair(inParams), context);
593         return [outAsync]() { outAsync->cancel(); };
594     }
595 
596     /**
597      * Invokes an operation dynamically.
598      * @param operation The name of the operation to invoke.
599      * @param mode The operation mode (normal or idempotent).
600      * @param inParams An encapsulation containing the encoded in-parameters for the operation.
601      * @param outParams An encapsulation containing the encoded results.
602      * @param context The context map for the invocation.
603      * @return True if the operation completed successfully, in which case outParams contains
604      * the encoded out parameters. False if the operation raised a user exception, in which
605      * case outParams contains the encoded user exception. If the operation raises a run-time
606      * exception, it throws it directly.
607      */
608     bool
609     ice_invoke(const ::std::string& operation,
610                ::Ice::OperationMode mode,
611                const ::std::pair<const ::Ice::Byte*, const ::Ice::Byte*>& inParams,
612                ::std::vector<::Ice::Byte>& outParams,
613                const ::Ice::Context& context = ::Ice::noExplicitContext)
614     {
615         using Outgoing = ::IceInternal::InvokePromiseOutgoing<
616             ::std::promise<::Ice::Object::Ice_invokeResult>, ::Ice::Object::Ice_invokeResult>;
617         auto outAsync = ::std::make_shared<Outgoing>(shared_from_this(), true);
618         outAsync->invoke(operation, mode, inParams, context);
619         auto result = outAsync->getFuture().get();
620         outParams.swap(result.outParams);
621         return result.returnValue;
622     }
623 
624     /**
625      * Invokes an operation dynamically.
626      * @param operation The name of the operation to invoke.
627      * @param mode The operation mode (normal or idempotent).
628      * @param inParams An encapsulation containing the encoded in-parameters for the operation.
629      * @param context The context map for the invocation.
630      * @return The future object for the invocation.
631      */
632     template<template<typename> class P = std::promise> auto
633     ice_invokeAsync(const ::std::string& operation,
634                     ::Ice::OperationMode mode,
635                     const ::std::pair<const ::Ice::Byte*, const ::Ice::Byte*>& inParams,
636                     const ::Ice::Context& context = ::Ice::noExplicitContext)
637         -> decltype(std::declval<P<::Ice::Object::Ice_invokeResult>>().get_future())
638     {
639         using Outgoing =
640             ::IceInternal::InvokePromiseOutgoing<P<::Ice::Object::Ice_invokeResult>, ::Ice::Object::Ice_invokeResult>;
641         auto outAsync = ::std::make_shared<Outgoing>(shared_from_this(), false);
642         outAsync->invoke(operation, mode, inParams, context);
643         return outAsync->getFuture();
644     }
645 
646     /**
647      * Invokes an operation dynamically.
648      * @param operation The name of the operation to invoke.
649      * @param mode The operation mode (normal or idempotent).
650      * @param inParams An encapsulation containing the encoded in-parameters for the operation.
651      * @param response The response callback.
652      * @param ex The exception callback.
653      * @param sent The sent callback.
654      * @param context The context map for the invocation.
655      * @return A function that can be called to cancel the invocation locally.
656      */
657     ::std::function<void()>
658     ice_invokeAsync(const ::std::string& operation,
659                     ::Ice::OperationMode mode,
660                     const ::std::pair<const ::Ice::Byte*, const ::Ice::Byte*>& inParams,
661                     ::std::function<void(bool, ::std::pair<const ::Ice::Byte*, const ::Ice::Byte*>)> response,
662                     ::std::function<void(::std::exception_ptr)> ex = nullptr,
663                     ::std::function<void(bool)> sent = nullptr,
664                     const ::Ice::Context& context = ::Ice::noExplicitContext)
665     {
666         using Result = ::std::tuple<bool, ::std::pair<const ::Ice::Byte*, const ::Ice::Byte*>>;
667         using Outgoing = ::IceInternal::InvokeLambdaOutgoing<Result>;
668 
669         ::std::function<void(Result&&)> r;
670         if(response)
671         {
672             r = [response](Result&& result)
673             {
674                 response(::std::get<0>(result), ::std::move(::std::get<1>(result)));
675             };
676         }
677         auto outAsync = ::std::make_shared<Outgoing>(shared_from_this(), r, ex, sent);
678         outAsync->invoke(operation, mode, inParams, context);
679         return [outAsync]() { outAsync->cancel(); };
680     }
681 
682     /**
683      * Obtains the identity embedded in this proxy.
684      * @return The identity of the target object.
685      */
686     ::Ice::Identity ice_getIdentity() const;
687 
688     /**
689      * Obtains a proxy that is identical to this proxy, except for the identity.
690      * @param id The identity for the new proxy.
691      * @return A proxy with the new identity.
692      */
693     ::std::shared_ptr<::Ice::ObjectPrx> ice_identity(const ::Ice::Identity& id) const;
694 
695     /**
696      * Obtains the per-proxy context for this proxy.
697      * @return The per-proxy context.
698      */
699     ::Ice::Context ice_getContext() const;
700 
701     /**
702      * Obtains a proxy that is identical to this proxy, except for the per-proxy context.
703      * @param context The context for the new proxy.
704      * @return A proxy with the new per-proxy context.
705      */
706     ::std::shared_ptr<::Ice::ObjectPrx> ice_context(const ::Ice::Context& context) const;
707 
708     /**
709      * Obtains the facet for this proxy.
710      * @return The facet for this proxy. If the proxy uses the default facet, the return value is the empty string.
711      */
712     const ::std::string& ice_getFacet() const;
713 
714     /**
715      * Obtains a proxy that is identical to this proxy, except for the facet.
716      * @param facet The facet for the new proxy.
717      * @return A proxy with the new facet.
718      */
719     ::std::shared_ptr<::Ice::ObjectPrx> ice_facet(const ::std::string& facet) const;
720 
721     /**
722      * Obtains the adapter ID for this proxy.
723      * @return The adapter ID. If the proxy does not have an adapter ID, the return value is the empty string.
724      */
725     ::std::string ice_getAdapterId() const;
726 
727     /**
728      * Obtains a proxy that is identical to this proxy, except for the adapter ID.
729      * @param id The adapter ID for the new proxy.
730      * @return A proxy with the new adapter ID.
731      */
732     ::std::shared_ptr<::Ice::ObjectPrx> ice_adapterId(const ::std::string& id) const;
733 
734     /**
735      * Obtains the endpoints used by this proxy.
736      * @return The endpoints used by this proxy.
737      */
738     ::Ice::EndpointSeq ice_getEndpoints() const;
739 
740     /**
741      * Obtains a proxy that is identical to this proxy, except for the endpoints.
742      * @param endpoints The endpoints for the new proxy.
743      * @return A proxy with the new endpoints.
744      */
745     ::std::shared_ptr<::Ice::ObjectPrx> ice_endpoints(const ::Ice::EndpointSeq& endpoints) const;
746 
747     /**
748      * Obtains the locator cache timeout of this proxy.
749      * @return The locator cache timeout value (in seconds).
750      */
751     ::Ice::Int ice_getLocatorCacheTimeout() const;
752 
753     /**
754      * Obtains a proxy that is identical to this proxy, except for the locator cache timeout.
755      * @param timeout The new locator cache timeout (in seconds).
756      * @return A proxy with the new timeout.
757      */
758     ::std::shared_ptr<::Ice::ObjectPrx> ice_locatorCacheTimeout(::Ice::Int timeout) const;
759 
760     /**
761      * Determines whether this proxy caches connections.
762      * @return True if this proxy caches connections, false otherwise.
763      */
764     bool ice_isConnectionCached() const;
765 
766     /**
767      * Obtains a proxy that is identical to this proxy, except for connection caching.
768      * @param b True if the new proxy should cache connections, false otherwise.
769      * @return A proxy with the specified caching policy.
770      */
771     ::std::shared_ptr<::Ice::ObjectPrx> ice_connectionCached(bool b) const;
772 
773     /**
774      * Obtains the endpoint selection policy for this proxy (randomly or ordered).
775      * @return The endpoint selection policy.
776      */
777     ::Ice::EndpointSelectionType ice_getEndpointSelection() const;
778 
779     /**
780      * Obtains a proxy that is identical to this proxy, except for the endpoint selection policy.
781      * @param type The new endpoint selection policy.
782      * @return A proxy with the specified endpoint selection policy.
783      */
784     ::std::shared_ptr<::Ice::ObjectPrx> ice_endpointSelection(::Ice::EndpointSelectionType type) const;
785 
786     /**
787      * Determines whether this proxy uses only secure endpoints.
788      * @return True if this proxy communicates only via secure endpoints, false otherwise.
789      */
790     bool ice_isSecure() const;
791 
792     /**
793      * Obtains a proxy that is identical to this proxy, except for how it selects endpoints.
794      * @param b If true, only endpoints that use a secure transport are used by the new proxy.
795      * If false, the returned proxy uses both secure and insecure endpoints.
796      * @return A proxy with the specified security policy.
797      */
798     ::std::shared_ptr<::Ice::ObjectPrx> ice_secure(bool b) const;
799 
800     /**
801      * Obtains the encoding version used to marshal request parameters.
802      * @return The encoding version.
803      */
804     ::Ice::EncodingVersion ice_getEncodingVersion() const;
805 
806     /**
807      * Obtains a proxy that is identical to this proxy, except for the encoding used to marshal
808      * parameters.
809      * @param version The encoding version to use to marshal request parameters.
810      * @return A proxy with the specified encoding version.
811      */
812     ::std::shared_ptr<::Ice::ObjectPrx> ice_encodingVersion(const ::Ice::EncodingVersion& version) const;
813 
814     /**
815      * Determines whether this proxy prefers secure endpoints.
816      * @return True if the proxy always attempts to invoke via secure endpoints before it
817      * attempts to use insecure endpoints, false otherwise.
818      */
819     bool ice_isPreferSecure() const;
820 
821     /**
822      * Obtains a proxy that is identical to this proxy, except for its endpoint selection policy.
823      * @param b If true, the new proxy will use secure endpoints for invocations and only use
824      * insecure endpoints if an invocation cannot be made via secure endpoints. If false, the
825      * proxy prefers insecure endpoints to secure ones.
826      * @return A proxy with the specified selection policy.
827      */
828     ::std::shared_ptr<::Ice::ObjectPrx> ice_preferSecure(bool b) const;
829 
830     /**
831      * Obtains the router for this proxy.
832      * @return The router for the proxy. If no router is configured for the proxy, the return value
833      * is nil.
834      */
835     ::std::shared_ptr<::Ice::RouterPrx> ice_getRouter() const;
836 
837     /**
838      * Obtains a proxy that is identical to this proxy, except for the router.
839      * @param router The router for the new proxy.
840      * @return A proxy with the specified router.
841      */
842     ::std::shared_ptr<::Ice::ObjectPrx> ice_router(const ::std::shared_ptr<::Ice::RouterPrx>& router) const;
843 
844     /**
845      * Obtains the locator for this proxy.
846      * @return The locator for this proxy. If no locator is configured, the return value is nil.
847      */
848     ::std::shared_ptr<::Ice::LocatorPrx> ice_getLocator() const;
849 
850     /**
851      * Obtains a proxy that is identical to this proxy, except for the locator.
852      * @param locator The locator for the new proxy.
853      * @return A proxy with the specified locator.
854      */
855     ::std::shared_ptr<::Ice::ObjectPrx> ice_locator(const ::std::shared_ptr<::Ice::LocatorPrx>& locator) const;
856 
857     /**
858      * Determines whether this proxy uses collocation optimization.
859      * @return True if the proxy uses collocation optimization, false otherwise.
860      */
861     bool ice_isCollocationOptimized() const;
862 
863     /**
864      * Obtains a proxy that is identical to this proxy, except for collocation optimization.
865      * @param b True if the new proxy enables collocation optimization, false otherwise.
866      * @return A proxy with the specified collocation optimization.
867      */
868     ::std::shared_ptr<::Ice::ObjectPrx> ice_collocationOptimized(bool b) const;
869 
870     /**
871      * Obtains the invocation timeout of this proxy.
872      * @return The invocation timeout value (in milliseconds).
873      */
874     ::Ice::Int ice_getInvocationTimeout() const;
875 
876     /**
877      * Obtains a proxy that is identical to this proxy, except for the invocation timeout.
878      * @param timeout The new invocation timeout (in milliseconds).
879      * @return A proxy with the new timeout.
880      */
881     ::std::shared_ptr<::Ice::ObjectPrx> ice_invocationTimeout(::Ice::Int timeout) const;
882 
883     /**
884      * Obtains a proxy that is identical to this proxy, but uses twoway invocations.
885      * @return A proxy that uses twoway invocations.
886      */
887     ::std::shared_ptr<::Ice::ObjectPrx> ice_twoway() const;
888 
889     /**
890      * Determines whether this proxy uses twoway invocations.
891      * @return True if this proxy uses twoway invocations, false otherwise.
892      */
893     bool ice_isTwoway() const;
894 
895     /**
896      * Obtains a proxy that is identical to this proxy, but uses oneway invocations.
897      * @return A proxy that uses oneway invocations.
898      */
899     ::std::shared_ptr<::Ice::ObjectPrx> ice_oneway() const;
900 
901     /**
902      * Determines whether this proxy uses oneway invocations.
903      * @return True if this proxy uses oneway invocations, false otherwise.
904      */
905     bool ice_isOneway() const;
906 
907     /**
908      * Obtains a proxy that is identical to this proxy, but uses batch oneway invocations.
909      * @return A proxy that uses batch oneway invocations.
910      */
911     ::std::shared_ptr<::Ice::ObjectPrx> ice_batchOneway() const;
912 
913     /**
914      * Determines whether this proxy uses batch oneway invocations.
915      * @return True if this proxy uses batch oneway invocations, false otherwise.
916      */
917     bool ice_isBatchOneway() const;
918 
919     /**
920      * Obtains a proxy that is identical to this proxy, but uses datagram invocations.
921      * @return A proxy that uses datagram invocations.
922      */
923     ::std::shared_ptr<::Ice::ObjectPrx> ice_datagram() const;
924 
925     /**
926      * Determines whether this proxy uses datagram invocations.
927      * @return True if this proxy uses datagram invocations, false otherwise.
928      */
929     bool ice_isDatagram() const;
930 
931     /**
932      * Obtains a proxy that is identical to this proxy, but uses batch datagram invocations.
933      * @return A proxy that uses batch datagram invocations.
934      */
935     ::std::shared_ptr<::Ice::ObjectPrx> ice_batchDatagram() const;
936 
937     /**
938      * Determines whether this proxy uses batch datagram invocations.
939      * @return True if this proxy uses batch datagram invocations, false otherwise.
940      */
941     bool ice_isBatchDatagram() const;
942 
943     /**
944      * Obtains a proxy that is identical to this proxy, except for its compression setting which
945      * overrides the compression setting from the proxy endpoints.
946      * @param b True enables compression for the new proxy, false disables compression.
947      * @return A proxy with the specified compression override setting.
948      */
949     ::std::shared_ptr<::Ice::ObjectPrx> ice_compress(bool b) const;
950 
951     /**
952      * Obtains the compression override setting of this proxy.
953      * @return The compression override setting. If nullopt is returned, no override is set. Otherwise, true
954      * if compression is enabled, false otherwise.
955      */
956     ::Ice::optional<bool> ice_getCompress() const;
957 
958     /**
959      * Obtains a proxy that is identical to this proxy, except for its connection timeout setting
960      * which overrides the timeot setting from the proxy endpoints.
961      * @param timeout The connection timeout override for the proxy (in milliseconds).
962      * @return A proxy with the specified timeout override.
963      */
964     ::std::shared_ptr<::Ice::ObjectPrx> ice_timeout(int timeout) const;
965 
966     /**
967      * Obtains the timeout override of this proxy.
968      * @return The timeout override. If nullopt is returned, no override is set. Otherwise, returns
969      * the timeout override value.
970      */
971     ::Ice::optional<int> ice_getTimeout() const;
972 
973     /**
974      * Obtains a proxy that is identical to this proxy, except for its connection ID.
975      * @param id The connection ID for the new proxy. An empty string removes the
976      * connection ID.
977      * @return A proxy with the specified connection ID.
978      */
979     ::std::shared_ptr<::Ice::ObjectPrx> ice_connectionId(const ::std::string& id) const;
980 
981     /**
982      * Obtains the connection ID of this proxy.
983      * @return The connection ID.
984      */
985     ::std::string ice_getConnectionId() const;
986 
987     /**
988      * Obtains a proxy that is identical to this proxy, except it's a fixed proxy bound
989      * the given connection.
990      * @param connection The fixed proxy connection.
991      * @return A fixed proxy bound to the given connection.
992      */
993     ::std::shared_ptr<::Ice::ObjectPrx> ice_fixed(const ::std::shared_ptr<::Ice::Connection>& connection) const;
994 
995     /**
996      * Obtains the Connection for this proxy. If the proxy does not yet have an established connection,
997      * it first attempts to create a connection.
998      * @return The connection for this proxy.
999      */
1000     ::std::shared_ptr<::Ice::Connection>
ice_getConnection()1001     ice_getConnection()
1002     {
1003         return ice_getConnectionAsync().get();
1004     }
1005 
1006     /**
1007      * Obtains the Connection for this proxy. If the proxy does not yet have an established connection,
1008      * it first attempts to create a connection.
1009      * @param response The response callback.
1010      * @param ex The exception callback.
1011      * @param sent The sent callback.
1012      * @return A function that can be called to cancel the invocation locally.
1013      */
1014     ::std::function<void()>
1015     ice_getConnectionAsync(::std::function<void(::std::shared_ptr<::Ice::Connection>)> response,
1016                            ::std::function<void(::std::exception_ptr)> ex = nullptr,
1017                            ::std::function<void(bool)> sent = nullptr)
1018     {
1019         using LambdaOutgoing = ::IceInternal::ProxyGetConnectionLambda;
1020         auto outAsync = ::std::make_shared<LambdaOutgoing>(shared_from_this(), response, ex, sent);
1021         _iceI_getConnection(outAsync);
1022         return [outAsync]() { outAsync->cancel(); };
1023     }
1024 
1025     /**
1026      * Obtains the Connection for this proxy. If the proxy does not yet have an established connection,
1027      * it first attempts to create a connection.
1028      * @return The future object for the invocation.
1029      */
1030     template<template<typename> class P = std::promise> auto
1031     ice_getConnectionAsync() -> decltype(std::declval<P<::std::shared_ptr<::Ice::Connection>>>().get_future())
1032     {
1033         using PromiseOutgoing = ::IceInternal::ProxyGetConnectionPromise<P<::std::shared_ptr<::Ice::Connection>>>;
1034         auto outAsync = ::std::make_shared<PromiseOutgoing>(shared_from_this());
1035         _iceI_getConnection(outAsync);
1036         return outAsync->getFuture();
1037     }
1038 
1039     /// \cond INTERNAL
1040     void _iceI_getConnection(const ::std::shared_ptr<::IceInternal::ProxyGetConnection>&);
1041     /// \endcond
1042 
1043     /**
1044      * Obtains the cached Connection for this proxy. If the proxy does not yet have an established
1045      * connection, it does not attempt to create a connection.
1046      * @return The cached connection for this proxy, or nil if the proxy does not have
1047      * an established connection.
1048      */
1049     ::std::shared_ptr<::Ice::Connection> ice_getCachedConnection() const;
1050 
1051     /**
1052      * Flushes any pending batched requests for this communicator. The call blocks until the flush is complete.
1053      */
ice_flushBatchRequests()1054     void ice_flushBatchRequests()
1055     {
1056         return ice_flushBatchRequestsAsync().get();
1057     }
1058 
1059     /**
1060      * Flushes any pending batched requests for this communicator. The call blocks until the flush is complete.
1061      * @param ex The exception callback.
1062      * @param sent The sent callback.
1063      * @return A function that can be called to cancel the invocation locally.
1064      */
1065     std::function<void()>
1066     ice_flushBatchRequestsAsync(::std::function<void(::std::exception_ptr)> ex,
1067                                 ::std::function<void(bool)> sent = nullptr)
1068     {
1069         using LambdaOutgoing = ::IceInternal::ProxyFlushBatchLambda;
1070         auto outAsync = ::std::make_shared<LambdaOutgoing>(shared_from_this(), ex, sent);
1071         _iceI_flushBatchRequests(outAsync);
1072         return [outAsync]() { outAsync->cancel(); };
1073     }
1074 
1075     /**
1076      * Flushes any pending batched requests for this communicator. The call blocks until the flush is complete.
1077      * @return The future object for the invocation.
1078      */
1079     template<template<typename> class P = std::promise> auto
1080     ice_flushBatchRequestsAsync() -> decltype(std::declval<P<void>>().get_future())
1081     {
1082         using PromiseOutgoing = ::IceInternal::ProxyFlushBatchPromise<P<void>>;
1083         auto outAsync = ::std::make_shared<PromiseOutgoing>(shared_from_this());
1084         _iceI_flushBatchRequests(outAsync);
1085         return outAsync->getFuture();
1086     }
1087 
1088     /// \cond INTERNAL
1089     void _iceI_flushBatchRequests(const ::std::shared_ptr<::IceInternal::ProxyFlushBatchAsync>&);
1090 
_getReference()1091     const ::IceInternal::ReferencePtr& _getReference() const { return _reference; }
1092 
1093     void _copyFrom(const std::shared_ptr<::Ice::ObjectPrx>&);
1094 
1095     int _handleException(const ::Ice::Exception&, const ::IceInternal::RequestHandlerPtr&, ::Ice::OperationMode,
1096                           bool, int&);
1097 
1098     void _checkTwowayOnly(const ::std::string&) const;
1099 
1100     ::IceInternal::RequestHandlerPtr _getRequestHandler();
1101     ::IceInternal::BatchRequestQueuePtr _getBatchRequestQueue();
1102     ::IceInternal::RequestHandlerPtr _setRequestHandler(const ::IceInternal::RequestHandlerPtr&);
1103     void _updateRequestHandler(const ::IceInternal::RequestHandlerPtr&, const ::IceInternal::RequestHandlerPtr&);
1104 
1105     int _hash() const;
1106 
1107     void _write(OutputStream&) const;
1108     /// \endcond
1109 
1110 protected:
1111 
1112     /// \cond INTERNAL
1113     template<typename R, template<typename> class P = ::std::promise, typename Obj, typename Fn, typename... Args>
1114     auto _makePromiseOutgoing(bool sync, Obj obj, Fn fn, Args&&... args)
1115         -> decltype(std::declval<P<R>>().get_future())
1116     {
1117         auto outAsync = ::std::make_shared<::IceInternal::PromiseOutgoing<P<R>, R>>(shared_from_this(), sync);
1118         (obj->*fn)(outAsync, std::forward<Args>(args)...);
1119         return outAsync->getFuture();
1120     }
1121 
1122     template<typename R, typename Re, typename E, typename S, typename Obj, typename Fn, typename... Args>
_makeLamdaOutgoing(Re r,E e,S s,Obj obj,Fn fn,Args &&...args)1123     ::std::function<void()> _makeLamdaOutgoing(Re r, E e, S s, Obj obj, Fn fn, Args&&... args)
1124     {
1125         auto outAsync = ::std::make_shared<::IceInternal::LambdaOutgoing<R>>(shared_from_this(), r, e, s);
1126         (obj->*fn)(outAsync, std::forward<Args>(args)...);
1127         return [outAsync]() { outAsync->cancel(); };
1128     }
1129 
1130     virtual ::std::shared_ptr<ObjectPrx> _newInstance() const;
1131     ObjectPrx() = default;
1132     friend ::std::shared_ptr<ObjectPrx> IceInternal::createProxy<ObjectPrx>();
1133     /// \endcond
1134 
1135 private:
1136 
1137     void setup(const ::IceInternal::ReferencePtr&);
1138     friend class ::IceInternal::ProxyFactory;
1139 
1140     ::IceInternal::ReferencePtr _reference;
1141     ::IceInternal::RequestHandlerPtr _requestHandler;
1142     ::IceInternal::BatchRequestQueuePtr _batchRequestQueue;
1143     IceUtil::Mutex _mutex;
1144 };
1145 
1146 inline bool
1147 operator>(const ObjectPrx& lhs, const ObjectPrx& rhs)
1148 {
1149     return rhs < lhs;
1150 }
1151 
1152 inline bool
1153 operator<=(const ObjectPrx& lhs, const ObjectPrx& rhs)
1154 {
1155     return !(lhs > rhs);
1156 }
1157 
1158 inline bool
1159 operator>=(const ObjectPrx& lhs, const ObjectPrx& rhs)
1160 {
1161     return !(lhs < rhs);
1162 }
1163 
1164 inline bool
1165 operator!=(const ObjectPrx& lhs, const ObjectPrx& rhs)
1166 {
1167     return !(lhs == rhs);
1168 }
1169 
1170 /**
1171  * Helper template that supplies proxy factory functions.
1172  * \headerfile Ice/Ice.h
1173  */
1174 template<typename Prx, typename... Bases>
1175 class Proxy : public virtual Bases...
1176 {
1177 public:
1178 
1179     /**
1180      * Obtains a proxy that is identical to this proxy, except for the per-proxy context.
1181      * @param context The context for the new proxy.
1182      * @return A proxy with the new per-proxy context.
1183      */
ice_context(const::Ice::Context & context)1184     ::std::shared_ptr<Prx> ice_context(const ::Ice::Context& context) const
1185     {
1186         return ::std::dynamic_pointer_cast<Prx>(ObjectPrx::ice_context(context));
1187     }
1188 
1189     /**
1190      * Obtains a proxy that is identical to this proxy, except for the adapter ID.
1191      * @param id The adapter ID for the new proxy.
1192      * @return A proxy with the new adapter ID.
1193      */
ice_adapterId(const::std::string & id)1194     ::std::shared_ptr<Prx> ice_adapterId(const ::std::string& id) const
1195     {
1196         return ::std::dynamic_pointer_cast<Prx>(ObjectPrx::ice_adapterId(id));
1197     }
1198 
1199     /**
1200      * Obtains a proxy that is identical to this proxy, except for the endpoints.
1201      * @param endpoints The endpoints for the new proxy.
1202      * @return A proxy with the new endpoints.
1203      */
ice_endpoints(const::Ice::EndpointSeq & endpoints)1204     ::std::shared_ptr<Prx> ice_endpoints(const ::Ice::EndpointSeq& endpoints) const
1205     {
1206         return ::std::dynamic_pointer_cast<Prx>(ObjectPrx::ice_endpoints(endpoints));
1207     }
1208 
1209     /**
1210      * Obtains a proxy that is identical to this proxy, except for the locator cache timeout.
1211      * @param timeout The new locator cache timeout (in seconds).
1212      * @return A proxy with the new timeout.
1213      */
ice_locatorCacheTimeout(int timeout)1214     ::std::shared_ptr<Prx> ice_locatorCacheTimeout(int timeout) const
1215     {
1216         return ::std::dynamic_pointer_cast<Prx>(ObjectPrx::ice_locatorCacheTimeout(timeout));
1217     }
1218 
1219     /**
1220      * Obtains a proxy that is identical to this proxy, except for connection caching.
1221      * @param b True if the new proxy should cache connections, false otherwise.
1222      * @return A proxy with the specified caching policy.
1223      */
ice_connectionCached(bool b)1224     ::std::shared_ptr<Prx> ice_connectionCached(bool b) const
1225     {
1226         return ::std::dynamic_pointer_cast<Prx>(ObjectPrx::ice_connectionCached(b));
1227     }
1228 
1229     /**
1230      * Obtains a proxy that is identical to this proxy, except for the endpoint selection policy.
1231      * @param type The new endpoint selection policy.
1232      * @return A proxy with the specified endpoint selection policy.
1233      */
ice_endpointSelection(::Ice::EndpointSelectionType type)1234     ::std::shared_ptr<Prx> ice_endpointSelection(::Ice::EndpointSelectionType type) const
1235     {
1236         return ::std::dynamic_pointer_cast<Prx>(ObjectPrx::ice_endpointSelection(type));
1237     }
1238 
1239     /**
1240      * Obtains a proxy that is identical to this proxy, except for how it selects endpoints.
1241      * @param b If true, only endpoints that use a secure transport are used by the new proxy.
1242      * If false, the returned proxy uses both secure and insecure endpoints.
1243      * @return A proxy with the specified security policy.
1244      */
ice_secure(bool b)1245     ::std::shared_ptr<Prx> ice_secure(bool b) const
1246     {
1247         return ::std::dynamic_pointer_cast<Prx>(ObjectPrx::ice_secure(b));
1248     }
1249 
1250     /**
1251      * Obtains a proxy that is identical to this proxy, except for its endpoint selection policy.
1252      * @param b If true, the new proxy will use secure endpoints for invocations and only use
1253      * insecure endpoints if an invocation cannot be made via secure endpoints. If false, the
1254      * proxy prefers insecure endpoints to secure ones.
1255      * @return A proxy with the specified selection policy.
1256      */
ice_preferSecure(bool b)1257     ::std::shared_ptr<Prx> ice_preferSecure(bool b) const
1258     {
1259         return ::std::dynamic_pointer_cast<Prx>(ObjectPrx::ice_preferSecure(b));
1260     }
1261 
1262     /**
1263      * Obtains a proxy that is identical to this proxy, except for the router.
1264      * @param router The router for the new proxy.
1265      * @return A proxy with the specified router.
1266      */
ice_router(const::std::shared_ptr<::Ice::RouterPrx> & router)1267     ::std::shared_ptr<Prx> ice_router(const ::std::shared_ptr<::Ice::RouterPrx>& router) const
1268     {
1269         return ::std::dynamic_pointer_cast<Prx>(ObjectPrx::ice_router(router));
1270     }
1271 
1272     /**
1273      * Obtains a proxy that is identical to this proxy, except for the locator.
1274      * @param locator The locator for the new proxy.
1275      * @return A proxy with the specified locator.
1276      */
ice_locator(const::std::shared_ptr<::Ice::LocatorPrx> & locator)1277     ::std::shared_ptr<Prx> ice_locator(const ::std::shared_ptr<::Ice::LocatorPrx>& locator) const
1278     {
1279         return ::std::dynamic_pointer_cast<Prx>(ObjectPrx::ice_locator(locator));
1280     }
1281 
1282     /**
1283      * Obtains a proxy that is identical to this proxy, except for collocation optimization.
1284      * @param b True if the new proxy enables collocation optimization, false otherwise.
1285      * @return A proxy with the specified collocation optimization.
1286      */
ice_collocationOptimized(bool b)1287     ::std::shared_ptr<Prx> ice_collocationOptimized(bool b) const
1288     {
1289         return ::std::dynamic_pointer_cast<Prx>(ObjectPrx::ice_collocationOptimized(b));
1290     }
1291 
1292     /**
1293      * Obtains a proxy that is identical to this proxy, except for the invocation timeout.
1294      * @param timeout The new invocation timeout (in milliseconds).
1295      * @return A proxy with the new timeout.
1296      */
ice_invocationTimeout(int timeout)1297     ::std::shared_ptr<Prx> ice_invocationTimeout(int timeout) const
1298     {
1299         return ::std::dynamic_pointer_cast<Prx>(ObjectPrx::ice_invocationTimeout(timeout));
1300     }
1301 
1302     /**
1303      * Obtains a proxy that is identical to this proxy, but uses twoway invocations.
1304      * @return A proxy that uses twoway invocations.
1305      */
ice_twoway()1306     ::std::shared_ptr<Prx> ice_twoway() const
1307     {
1308         return ::std::dynamic_pointer_cast<Prx>(ObjectPrx::ice_twoway());
1309     }
1310 
1311     /**
1312      * Obtains a proxy that is identical to this proxy, but uses oneway invocations.
1313      * @return A proxy that uses oneway invocations.
1314      */
ice_oneway()1315     ::std::shared_ptr<Prx> ice_oneway() const
1316     {
1317         return ::std::dynamic_pointer_cast<Prx>(ObjectPrx::ice_oneway());
1318     }
1319 
1320     /**
1321      * Obtains a proxy that is identical to this proxy, but uses batch oneway invocations.
1322      * @return A proxy that uses batch oneway invocations.
1323      */
ice_batchOneway()1324     ::std::shared_ptr<Prx> ice_batchOneway() const
1325     {
1326         return ::std::dynamic_pointer_cast<Prx>(ObjectPrx::ice_batchOneway());
1327     }
1328 
1329     /**
1330      * Obtains a proxy that is identical to this proxy, but uses datagram invocations.
1331      * @return A proxy that uses datagram invocations.
1332      */
ice_datagram()1333     ::std::shared_ptr<Prx> ice_datagram() const
1334     {
1335         return ::std::dynamic_pointer_cast<Prx>(ObjectPrx::ice_datagram());
1336     }
1337 
1338     /**
1339      * Obtains a proxy that is identical to this proxy, but uses batch datagram invocations.
1340      * @return A proxy that uses batch datagram invocations.
1341      */
ice_batchDatagram()1342     ::std::shared_ptr<Prx> ice_batchDatagram() const
1343     {
1344         return ::std::dynamic_pointer_cast<Prx>(ObjectPrx::ice_batchDatagram());
1345     }
1346 
1347     /**
1348      * Obtains a proxy that is identical to this proxy, except for its compression setting which
1349      * overrides the compression setting from the proxy endpoints.
1350      * @param b True enables compression for the new proxy, false disables compression.
1351      * @return A proxy with the specified compression override setting.
1352      */
ice_compress(bool b)1353     ::std::shared_ptr<Prx> ice_compress(bool b) const
1354     {
1355         return ::std::dynamic_pointer_cast<Prx>(ObjectPrx::ice_compress(b));
1356     }
1357 
1358     /**
1359      * Obtains a proxy that is identical to this proxy, except for its connection timeout setting
1360      * which overrides the timeot setting from the proxy endpoints.
1361      * @param timeout The connection timeout override for the proxy (in milliseconds).
1362      * @return A proxy with the specified timeout override.
1363      */
ice_timeout(int timeout)1364     ::std::shared_ptr<Prx> ice_timeout(int timeout) const
1365     {
1366         return ::std::dynamic_pointer_cast<Prx>(ObjectPrx::ice_timeout(timeout));
1367     }
1368 
1369     /**
1370      * Obtains a proxy that is identical to this proxy, except for its connection ID.
1371      * @param id The connection ID for the new proxy. An empty string removes the
1372      * connection ID.
1373      * @return A proxy with the specified connection ID.
1374      */
ice_connectionId(const::std::string & id)1375     ::std::shared_ptr<Prx> ice_connectionId(const ::std::string& id) const
1376     {
1377         return ::std::dynamic_pointer_cast<Prx>(ObjectPrx::ice_connectionId(id));
1378     }
1379 
1380     /**
1381      * Obtains a proxy that is identical to this proxy, except it's a fixed proxy bound
1382      * the given connection.
1383      * @param connection The fixed proxy connection.
1384      * @return A fixed proxy bound to the given connection.
1385      */
ice_fixed(const::std::shared_ptr<::Ice::Connection> & connection)1386     ::std::shared_ptr<Prx> ice_fixed(const ::std::shared_ptr<::Ice::Connection>& connection) const
1387     {
1388         return ::std::dynamic_pointer_cast<Prx>(ObjectPrx::ice_fixed(connection));
1389     }
1390 
1391     /**
1392      * Obtains a proxy that is identical to this proxy, except for the encoding used to marshal
1393      * parameters.
1394      * @param version The encoding version to use to marshal request parameters.
1395      * @return A proxy with the specified encoding version.
1396      */
ice_encodingVersion(const::Ice::EncodingVersion & version)1397     ::std::shared_ptr<Prx> ice_encodingVersion(const ::Ice::EncodingVersion& version) const
1398     {
1399         return ::std::dynamic_pointer_cast<Prx>(ObjectPrx::ice_encodingVersion(version));
1400     }
1401 
1402 protected:
1403 
1404     /// \cond INTERNAL
1405     virtual ::std::shared_ptr<ObjectPrx> _newInstance() const = 0;
1406     /// \endcond
1407 };
1408 
1409 ICE_API ::std::ostream& operator<<(::std::ostream&, const ::Ice::ObjectPrx&);
1410 
1411 /**
1412  * Compares the object identities of two proxies.
1413  * @param lhs A proxy.
1414  * @param rhs A proxy.
1415  * @return True if the identity in lhs compares less than the identity in rhs, false otherwise.
1416  */
1417 ICE_API bool proxyIdentityLess(const ::std::shared_ptr<ObjectPrx>& lhs, const ::std::shared_ptr<ObjectPrx>& rhs);
1418 
1419 /**
1420  * Compares the object identities of two proxies.
1421  * @param lhs A proxy.
1422  * @param rhs A proxy.
1423  * @return True if the identity in lhs compares equal to the identity in rhs, false otherwise.
1424  */
1425 ICE_API bool proxyIdentityEqual(const ::std::shared_ptr<ObjectPrx>& lhs, const ::std::shared_ptr<ObjectPrx>& rhs);
1426 
1427 /**
1428  * Compares the object identities and facets of two proxies.
1429  * @param lhs A proxy.
1430  * @param rhs A proxy.
1431  * @return True if the identity and facet in lhs compare less than the identity and facet
1432  * in rhs, false otherwise.
1433  */
1434 ICE_API bool proxyIdentityAndFacetLess(const ::std::shared_ptr<ObjectPrx>& lhs,
1435                                        const ::std::shared_ptr<ObjectPrx>& rhs);
1436 
1437 /**
1438  * Compares the object identities and facets of two proxies.
1439  * @param lhs A proxy.
1440  * @param rhs A proxy.
1441  * @return True if the identity and facet in lhs compare equal to the identity and facet
1442  * in rhs, false otherwise.
1443  */
1444 ICE_API bool proxyIdentityAndFacetEqual(const ::std::shared_ptr<ObjectPrx>& lhs,
1445                                         const ::std::shared_ptr<ObjectPrx>& rhs);
1446 
1447 /**
1448  * A functor that compares the object identities of two proxies. Evaluates true if the identity in lhs
1449  * compares less than the identity in rhs, false otherwise.
1450  * \headerfile Ice/Ice.h
1451  */
1452 #if (ICE_CPLUSPLUS >= 201703L)
1453 struct ProxyIdentityLess
1454 #else
1455 struct ProxyIdentityLess : std::binary_function<bool, ::std::shared_ptr<ObjectPrx>&, ::std::shared_ptr<ObjectPrx>&>
1456 #endif
1457 {
operatorProxyIdentityLess1458     bool operator()(const ::std::shared_ptr<ObjectPrx>& lhs, const ::std::shared_ptr<ObjectPrx>& rhs) const
1459     {
1460         return proxyIdentityLess(lhs, rhs);
1461     }
1462 };
1463 
1464 /**
1465  * A functor that compares the object identities of two proxies. Evaluates true if the identity in lhs
1466  * compares equal to the identity in rhs, false otherwise.
1467  * \headerfile Ice/Ice.h
1468  */
1469 #if (ICE_CPLUSPLUS >= 201703L)
1470 struct ProxyIdentityEqual
1471 #else
1472 struct ProxyIdentityEqual : std::binary_function<bool, ::std::shared_ptr<ObjectPrx>&, ::std::shared_ptr<ObjectPrx>&>
1473 #endif
1474 {
operatorProxyIdentityEqual1475     bool operator()(const ::std::shared_ptr<ObjectPrx>& lhs, const ::std::shared_ptr<ObjectPrx>& rhs) const
1476     {
1477         return proxyIdentityEqual(lhs, rhs);
1478     }
1479 };
1480 
1481 /**
1482  * A functor that compares the object identities and facets of two proxies. Evaluates true if the identity
1483  * and facet in lhs compare less than the identity and facet in rhs, false otherwise.
1484  * \headerfile Ice/Ice.h
1485  */
1486 #if (ICE_CPLUSPLUS >= 201703L)
1487 struct ProxyIdentityAndFacetLess
1488 #else
1489 struct ProxyIdentityAndFacetLess : std::binary_function<bool, ::std::shared_ptr<ObjectPrx>&, ::std::shared_ptr<ObjectPrx>&>
1490 #endif
1491 {
operatorProxyIdentityAndFacetLess1492     bool operator()(const ::std::shared_ptr<ObjectPrx>& lhs, const ::std::shared_ptr<ObjectPrx>& rhs) const
1493     {
1494         return proxyIdentityAndFacetLess(lhs, rhs);
1495     }
1496 };
1497 
1498 /**
1499  * A functor that compares the object identities and facets of two proxies. Evaluates true if the identity
1500  * and facet in lhs compare equal to the identity and facet in rhs, false otherwise.
1501  * \headerfile Ice/Ice.h
1502  */
1503 #if (ICE_CPLUSPLUS >= 201703L)
1504 struct ProxyIdentityAndFacetEqual
1505 #else
1506 struct ProxyIdentityAndFacetEqual : std::binary_function<bool, ::std::shared_ptr<ObjectPrx>&, ::std::shared_ptr<ObjectPrx>&>
1507 #endif
1508 {
operatorProxyIdentityAndFacetEqual1509     bool operator()(const ::std::shared_ptr<ObjectPrx>& lhs, const ::std::shared_ptr<ObjectPrx>& rhs) const
1510     {
1511         return proxyIdentityAndFacetEqual(lhs, rhs);
1512     }
1513 };
1514 
1515 /**
1516  * Downcasts a proxy without confirming the target object's type via a remote invocation.
1517  * @param b The target proxy.
1518  * @return A proxy with the requested type.
1519  */
1520 template<typename P,
1521          typename T,
1522          typename ::std::enable_if<::std::is_base_of<::Ice::ObjectPrx, P>::value>::type* = nullptr,
1523          typename ::std::enable_if<::std::is_base_of<::Ice::ObjectPrx, T>::value>::type* = nullptr> ::std::shared_ptr<P>
uncheckedCast(const::std::shared_ptr<T> & b)1524 uncheckedCast(const ::std::shared_ptr<T>& b)
1525 {
1526     ::std::shared_ptr<P> r;
1527     if(b)
1528     {
1529         r = ::std::dynamic_pointer_cast<P>(b);
1530         if(!r)
1531         {
1532             r = IceInternal::createProxy<P>();
1533             r->_copyFrom(b);
1534         }
1535     }
1536     return r;
1537 }
1538 
1539 /**
1540  * Downcasts a proxy without confirming the target object's type via a remote invocation.
1541  * @param b The target proxy.
1542  * @param f A facet name.
1543  * @return A proxy with the requested type and facet.
1544  */
1545 template<typename P,
1546          typename T,
1547          typename ::std::enable_if<::std::is_base_of<::Ice::ObjectPrx, P>::value>::type* = nullptr,
1548          typename ::std::enable_if<::std::is_base_of<::Ice::ObjectPrx, T>::value>::type* = nullptr> ::std::shared_ptr<P>
uncheckedCast(const::std::shared_ptr<T> & b,const std::string & f)1549 uncheckedCast(const ::std::shared_ptr<T>& b, const std::string& f)
1550 {
1551     ::std::shared_ptr<P> r;
1552     if(b)
1553     {
1554         r = IceInternal::createProxy<P>();
1555         r->_copyFrom(b->ice_facet(f));
1556     }
1557     return r;
1558 }
1559 
1560 /**
1561  * Downcasts a proxy after confirming the target object's type via a remote invocation.
1562  * @param b The target proxy.
1563  * @param context The context map for the invocation.
1564  * @return A proxy with the requested type, or nil if the target proxy is nil or the target
1565  * object does not support the requested type.
1566  */
1567 template<typename P,
1568          typename T,
1569          typename ::std::enable_if<::std::is_base_of<::Ice::ObjectPrx, P>::value>::type* = nullptr,
1570          typename ::std::enable_if<::std::is_base_of<::Ice::ObjectPrx, T>::value>::type* = nullptr> ::std::shared_ptr<P>
1571 checkedCast(const ::std::shared_ptr<T>& b, const ::Ice::Context& context = Ice::noExplicitContext)
1572 {
1573     ::std::shared_ptr<P> r;
1574     if(b)
1575     {
1576         if(b->ice_isA(P::ice_staticId(), context))
1577         {
1578             r = IceInternal::createProxy<P>();
1579             r->_copyFrom(b);
1580         }
1581     }
1582     return r;
1583 }
1584 
1585 /**
1586  * Downcasts a proxy after confirming the target object's type via a remote invocation.
1587  * @param b The target proxy.
1588  * @param f A facet name.
1589  * @param context The context map for the invocation.
1590  * @return A proxy with the requested type and facet, or nil if the target proxy is nil or the target
1591  * object does not support the requested type.
1592  */
1593 template<typename P,
1594          typename T,
1595          typename ::std::enable_if<::std::is_base_of<::Ice::ObjectPrx, P>::value>::type* = nullptr,
1596          typename ::std::enable_if<::std::is_base_of<::Ice::ObjectPrx, T>::value>::type* = nullptr> ::std::shared_ptr<P>
1597 checkedCast(const ::std::shared_ptr<T>& b, const std::string& f, const ::Ice::Context& context = Ice::noExplicitContext)
1598 {
1599     ::std::shared_ptr<P> r;
1600     if(b)
1601     {
1602         try
1603         {
1604             ::std::shared_ptr<::Ice::ObjectPrx> bb = b->ice_facet(f);
1605             if(bb->ice_isA(P::ice_staticId(), context))
1606             {
1607                 r = IceInternal::createProxy<P>();
1608                 r->_copyFrom(bb);
1609             }
1610         }
catch(const Ice::FacetNotExistException &)1611         catch(const Ice::FacetNotExistException&)
1612         {
1613         }
1614     }
1615     return r;
1616 }
1617 
1618 }
1619 
1620 #else // C++98 mapping
1621 
1622 namespace IceProxy
1623 {
1624 
1625 namespace Ice
1626 {
1627 
1628 /// \cond INTERNAL
1629 class Locator;
1630 ICE_API ::IceProxy::Ice::Object* upCast(::IceProxy::Ice::Locator*);
1631 
1632 class Router;
1633 ICE_API ::IceProxy::Ice::Object* upCast(::IceProxy::Ice::Router*);
1634 /// \endcond
1635 
1636 }
1637 
1638 }
1639 
1640 namespace Ice
1641 {
1642 
1643 typedef ::IceInternal::ProxyHandle< ::IceProxy::Ice::Router> RouterPrx;
1644 typedef RouterPrx RouterPrxPtr;
1645 typedef ::IceInternal::ProxyHandle< ::IceProxy::Ice::Locator> LocatorPrx;
1646 typedef LocatorPrx LocatorPrxPtr;
1647 
1648 class LocalException;
1649 class OutputStream;
1650 
1651 /**
1652  * Base class for asynchronous callback wrapper classes used for calls to
1653  * IceProxy::Ice::Object::begin_ice_isA.
1654  * Create a wrapper instance by calling ::Ice::newCallback_Object_ice_isA.
1655  * \headerfile Ice/Ice.h
1656  */
1657 class Callback_Object_ice_isA_Base : public virtual ::IceInternal::CallbackBase { };
1658 typedef ::IceUtil::Handle< Callback_Object_ice_isA_Base> Callback_Object_ice_isAPtr;
1659 
1660 /**
1661  * Base class for asynchronous callback wrapper classes used for calls to
1662  * IceProxy::Ice::Object::begin_ice_ping.
1663  * Create a wrapper instance by calling ::Ice::newCallback_Object_ice_ping.
1664  * \headerfile Ice/Ice.h
1665  */
1666 class Callback_Object_ice_ping_Base : public virtual ::IceInternal::CallbackBase { };
1667 typedef ::IceUtil::Handle< Callback_Object_ice_ping_Base> Callback_Object_ice_pingPtr;
1668 
1669 /**
1670  * Base class for asynchronous callback wrapper classes used for calls to
1671  * IceProxy::Ice::Object::begin_ice_ids.
1672  * Create a wrapper instance by calling ::Ice::newCallback_Object_ice_ids.
1673  * \headerfile Ice/Ice.h
1674  */
1675 class Callback_Object_ice_ids_Base : public virtual ::IceInternal::CallbackBase { };
1676 typedef ::IceUtil::Handle< Callback_Object_ice_ids_Base> Callback_Object_ice_idsPtr;
1677 
1678 /**
1679  * Base class for asynchronous callback wrapper classes used for calls to
1680  * IceProxy::Ice::Object::begin_ice_id.
1681  * Create a wrapper instance by calling ::Ice::newCallback_Object_ice_id.
1682  * \headerfile Ice/Ice.h
1683  */
1684 class Callback_Object_ice_id_Base : public virtual ::IceInternal::CallbackBase { };
1685 typedef ::IceUtil::Handle< Callback_Object_ice_id_Base> Callback_Object_ice_idPtr;
1686 
1687 /**
1688  * Base class for asynchronous callback wrapper classes used for calls to
1689  * IceProxy::Ice::Object::begin_ice_invoke.
1690  * Create a wrapper instance by calling ::Ice::newCallback_Object_ice_invoke.
1691  * \headerfile Ice/Ice.h
1692  */
1693 class Callback_Object_ice_invoke_Base : public virtual ::IceInternal::CallbackBase { };
1694 typedef ::IceUtil::Handle< Callback_Object_ice_invoke_Base> Callback_Object_ice_invokePtr;
1695 
1696 /**
1697  * Base class for asynchronous callback wrapper classes used for calls to
1698  * IceProxy::Ice::Object::begin_ice_flushBatchRequests.
1699  * Create a wrapper instance by calling ::Ice::newCallback_Object_ice_flushBatchRequests.
1700  * \headerfile Ice/Ice.h
1701  */
1702 class Callback_Object_ice_flushBatchRequests_Base : public virtual ::IceInternal::CallbackBase { };
1703 typedef ::IceUtil::Handle< Callback_Object_ice_flushBatchRequests_Base> Callback_Object_ice_flushBatchRequestsPtr;
1704 
1705 /**
1706  * Base class for asynchronous callback wrapper classes used for calls to
1707  * IceProxy::Ice::Object::begin_ice_getConnection.
1708  * Create a wrapper instance by calling ::Ice::newCallback_Object_ice_getConnection.
1709  * \headerfile Ice/Ice.h
1710  */
1711 class Callback_Object_ice_getConnection_Base : public virtual ::IceInternal::CallbackBase { };
1712 typedef ::IceUtil::Handle< Callback_Object_ice_getConnection_Base> Callback_Object_ice_getConnectionPtr;
1713 
1714 }
1715 
1716 namespace IceProxy { namespace Ice
1717 {
1718 
1719 /**
1720  * Base class of all object proxies.
1721  * \headerfile Ice/Ice.h
1722  */
1723 class ICE_API Object : public ::IceUtil::Shared
1724 {
1725 public:
1726 
1727     bool operator==(const Object&) const;
1728     bool operator<(const Object&) const;
1729 
1730     /**
1731      * Obtains the communicator that created this proxy.
1732      * @return The communicator that created this proxy.
1733      */
1734     ::Ice::CommunicatorPtr ice_getCommunicator() const;
1735 
1736     /**
1737      * Obtains a stringified version of this proxy.
1738      * @return A stringified proxy.
1739      */
1740     ::std::string ice_toString() const;
1741 
1742     /**
1743      * Tests whether this object supports a specific Slice interface.
1744      * @param typeId The type ID of the Slice interface to test against.
1745      * @param context The context map for the invocation.
1746      * @return True if the target object has the interface
1747      * specified by id or derives from the interface specified by id.
1748      */
1749     bool ice_isA(const ::std::string& typeId, const ::Ice::Context& context = ::Ice::noExplicitContext)
1750     {
1751         return end_ice_isA(_iceI_begin_ice_isA(typeId, context, ::IceInternal::dummyCallback, 0, true));
1752     }
1753 
1754     /**
1755      * Tests whether this object supports a specific Slice interface.
1756      * @param typeId The type ID of the Slice interface to test against.
1757      * @param context The context map for the invocation.
1758      * @return The asynchronous result object for the invocation.
1759      */
1760     ::Ice::AsyncResultPtr begin_ice_isA(const ::std::string& typeId,
1761                                         const ::Ice::Context& context = ::Ice::noExplicitContext)
1762     {
1763         return _iceI_begin_ice_isA(typeId, context, ::IceInternal::dummyCallback, 0);
1764     }
1765 
1766     /**
1767      * Tests whether this object supports a specific Slice interface.
1768      * @param typeId The type ID of the Slice interface to test against.
1769      * @param cb Asynchronous callback object.
1770      * @param cookie User-defined data to associate with the invocation.
1771      * @return The asynchronous result object for the invocation.
1772      */
1773     ::Ice::AsyncResultPtr begin_ice_isA(const ::std::string& typeId,
1774                                         const ::Ice::CallbackPtr& cb,
1775                                         const ::Ice::LocalObjectPtr& cookie = 0)
1776     {
1777         return _iceI_begin_ice_isA(typeId, ::Ice::noExplicitContext, cb, cookie);
1778     }
1779 
1780     /**
1781      * Tests whether this object supports a specific Slice interface.
1782      * @param typeId The type ID of the Slice interface to test against.
1783      * @param context The context map for the invocation.
1784      * @param cb Asynchronous callback object.
1785      * @param cookie User-defined data to associate with the invocation.
1786      * @return The asynchronous result object for the invocation.
1787      */
1788     ::Ice::AsyncResultPtr begin_ice_isA(const ::std::string& typeId,
1789                                         const ::Ice::Context& context,
1790                                         const ::Ice::CallbackPtr& cb,
1791                                         const ::Ice::LocalObjectPtr& cookie = 0)
1792     {
1793         return _iceI_begin_ice_isA(typeId, context, cb, cookie);
1794     }
1795 
1796     /**
1797      * Tests whether this object supports a specific Slice interface.
1798      * @param typeId The type ID of the Slice interface to test against.
1799      * @param cb Asynchronous callback object.
1800      * @param cookie User-defined data to associate with the invocation.
1801      * @return The asynchronous result object for the invocation.
1802      */
1803     ::Ice::AsyncResultPtr begin_ice_isA(const ::std::string& typeId,
1804                                         const ::Ice::Callback_Object_ice_isAPtr& cb,
1805                                         const ::Ice::LocalObjectPtr& cookie = 0)
1806     {
1807         return _iceI_begin_ice_isA(typeId, ::Ice::noExplicitContext, cb, cookie);
1808     }
1809 
1810     /**
1811      * Tests whether this object supports a specific Slice interface.
1812      * @param typeId The type ID of the Slice interface to test against.
1813      * @param context The context map for the invocation.
1814      * @param cb Asynchronous callback object.
1815      * @param cookie User-defined data to associate with the invocation.
1816      * @return The asynchronous result object for the invocation.
1817      */
1818     ::Ice::AsyncResultPtr begin_ice_isA(const ::std::string& typeId,
1819                                         const ::Ice::Context& context,
1820                                         const ::Ice::Callback_Object_ice_isAPtr& cb,
1821                                         const ::Ice::LocalObjectPtr& cookie = 0)
1822     {
1823         return _iceI_begin_ice_isA(typeId, context, cb, cookie);
1824     }
1825 
1826     /**
1827      * Completes an invocation of begin_ice_isA.
1828      * @param result The asynchronous result object for the invocation.
1829      * @return True if the target object has the interface
1830      * specified by id or derives from the interface specified by id.
1831      */
1832     bool end_ice_isA(const ::Ice::AsyncResultPtr& result);
1833 
1834     /**
1835      * Tests whether the target object of this proxy can be reached.
1836      * @param context The context map for the invocation.
1837      */
1838     void ice_ping(const ::Ice::Context& context = ::Ice::noExplicitContext)
1839     {
1840         end_ice_ping(_iceI_begin_ice_ping(context, ::IceInternal::dummyCallback, 0, true));
1841     }
1842 
1843     /**
1844      * Tests whether the target object of this proxy can be reached.
1845      * @param context The context map for the invocation.
1846      * @return The asynchronous result object for the invocation.
1847      */
1848     ::Ice::AsyncResultPtr begin_ice_ping(const ::Ice::Context& context = ::Ice::noExplicitContext)
1849     {
1850         return _iceI_begin_ice_ping(context, ::IceInternal::dummyCallback, 0);
1851     }
1852 
1853     /**
1854      * Tests whether the target object of this proxy can be reached.
1855      * @param cb Asynchronous callback object.
1856      * @param cookie User-defined data to associate with the invocation.
1857      * @return The asynchronous result object for the invocation.
1858      */
1859     ::Ice::AsyncResultPtr begin_ice_ping(const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
1860     {
1861         return _iceI_begin_ice_ping(::Ice::noExplicitContext, cb, cookie);
1862     }
1863 
1864     /**
1865      * Tests whether the target object of this proxy can be reached.
1866      * @param context The context map for the invocation.
1867      * @param cb Asynchronous callback object.
1868      * @param cookie User-defined data to associate with the invocation.
1869      * @return The asynchronous result object for the invocation.
1870      */
1871     ::Ice::AsyncResultPtr begin_ice_ping(const ::Ice::Context& context, const ::Ice::CallbackPtr& cb,
1872                                          const ::Ice::LocalObjectPtr& cookie = 0)
1873     {
1874         return _iceI_begin_ice_ping(context, cb, cookie);
1875     }
1876 
1877     /**
1878      * Tests whether the target object of this proxy can be reached.
1879      * @param cb Asynchronous callback object.
1880      * @param cookie User-defined data to associate with the invocation.
1881      * @return The asynchronous result object for the invocation.
1882      */
1883     ::Ice::AsyncResultPtr begin_ice_ping(const ::Ice::Callback_Object_ice_pingPtr& cb,
1884                                          const ::Ice::LocalObjectPtr& cookie = 0)
1885     {
1886         return _iceI_begin_ice_ping(::Ice::noExplicitContext, cb, cookie);
1887     }
1888 
1889     /**
1890      * Tests whether the target object of this proxy can be reached.
1891      * @param context The context map for the invocation.
1892      * @param cb Asynchronous callback object.
1893      * @param cookie User-defined data to associate with the invocation.
1894      * @return The asynchronous result object for the invocation.
1895      */
1896     ::Ice::AsyncResultPtr begin_ice_ping(const ::Ice::Context& context, const ::Ice::Callback_Object_ice_pingPtr& cb,
1897                                          const ::Ice::LocalObjectPtr& cookie = 0)
1898     {
1899         return _iceI_begin_ice_ping(context, cb, cookie);
1900     }
1901 
1902     /**
1903      * Completes an invocation of begin_ice_ping.
1904      * @param result The asynchronous result object for the invocation.
1905      */
1906     void end_ice_ping(const ::Ice::AsyncResultPtr& result);
1907 
1908     /**
1909      * Returns the Slice type IDs of the interfaces supported by the target object of this proxy.
1910      * @param context The context map for the invocation.
1911      * @return The Slice type IDs of the interfaces supported by the target object, in base-to-derived
1912      * order. The first element of the returned array is always "::Ice::Object".
1913      */
1914     ::std::vector< ::std::string> ice_ids(const ::Ice::Context& context = ::Ice::noExplicitContext)
1915     {
1916         return end_ice_ids(_iceI_begin_ice_ids(context, ::IceInternal::dummyCallback, 0, true));
1917     }
1918 
1919     /**
1920      * Returns the Slice type IDs of the interfaces supported by the target object of this proxy.
1921      * @param context The context map for the invocation.
1922      * @return The asynchronous result object for the invocation.
1923      */
1924     ::Ice::AsyncResultPtr begin_ice_ids(const ::Ice::Context& context = ::Ice::noExplicitContext)
1925     {
1926         return _iceI_begin_ice_ids(context, ::IceInternal::dummyCallback, 0);
1927     }
1928 
1929     /**
1930      * Returns the Slice type IDs of the interfaces supported by the target object of this proxy.
1931      * @param cb Asynchronous callback object.
1932      * @param cookie User-defined data to associate with the invocation.
1933      * @return The asynchronous result object for the invocation.
1934      */
1935     ::Ice::AsyncResultPtr begin_ice_ids(const ::Ice::CallbackPtr& cb,
1936                                         const ::Ice::LocalObjectPtr& cookie = 0)
1937     {
1938         return _iceI_begin_ice_ids(::Ice::noExplicitContext, cb, cookie);
1939     }
1940 
1941     /**
1942      * Returns the Slice type IDs of the interfaces supported by the target object of this proxy.
1943      * @param context The context map for the invocation.
1944      * @param cb Asynchronous callback object.
1945      * @param cookie User-defined data to associate with the invocation.
1946      * @return The asynchronous result object for the invocation.
1947      */
1948     ::Ice::AsyncResultPtr begin_ice_ids(const ::Ice::Context& context,
1949                                         const ::Ice::CallbackPtr& cb,
1950                                         const ::Ice::LocalObjectPtr& cookie = 0)
1951     {
1952         return _iceI_begin_ice_ids(context, cb, cookie);
1953     }
1954 
1955     /**
1956      * Returns the Slice type IDs of the interfaces supported by the target object of this proxy.
1957      * @param cb Asynchronous callback object.
1958      * @param cookie User-defined data to associate with the invocation.
1959      * @return The asynchronous result object for the invocation.
1960      */
1961     ::Ice::AsyncResultPtr begin_ice_ids(const ::Ice::Callback_Object_ice_idsPtr& cb,
1962                                         const ::Ice::LocalObjectPtr& cookie = 0)
1963     {
1964         return _iceI_begin_ice_ids(::Ice::noExplicitContext, cb, cookie);
1965     }
1966 
1967     /**
1968      * Returns the Slice type IDs of the interfaces supported by the target object of this proxy.
1969      * @param context The context map for the invocation.
1970      * @param cb Asynchronous callback object.
1971      * @param cookie User-defined data to associate with the invocation.
1972      * @return The asynchronous result object for the invocation.
1973      */
1974     ::Ice::AsyncResultPtr begin_ice_ids(const ::Ice::Context& context,
1975                                         const ::Ice::Callback_Object_ice_idsPtr& cb,
1976                                         const ::Ice::LocalObjectPtr& cookie = 0)
1977     {
1978         return _iceI_begin_ice_ids(context, cb, cookie);
1979     }
1980 
1981     /**
1982      * Completes an invocation of begin_ice_ids.
1983      * @param result The asynchronous result object for the invocation.
1984      * @return The Slice type IDs of the interfaces supported by the target object, in base-to-derived
1985      * order. The first element of the returned array is always "::Ice::Object".
1986      */
1987     ::std::vector< ::std::string> end_ice_ids(const ::Ice::AsyncResultPtr& result);
1988 
1989     /**
1990      * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy.
1991      * @param context The context map for the invocation.
1992      * @return The Slice type ID of the most-derived interface.
1993      */
1994     ::std::string ice_id(const ::Ice::Context& context = ::Ice::noExplicitContext)
1995     {
1996         return end_ice_id(_iceI_begin_ice_id(context, ::IceInternal::dummyCallback, 0, true));
1997     }
1998 
1999     /**
2000      * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy.
2001      * @param context The context map for the invocation.
2002      * @return The asynchronous result object for the invocation.
2003      */
2004     ::Ice::AsyncResultPtr begin_ice_id(const ::Ice::Context& context = ::Ice::noExplicitContext)
2005     {
2006         return _iceI_begin_ice_id(context, ::IceInternal::dummyCallback, 0);
2007     }
2008 
2009     /**
2010      * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy.
2011      * @param cb Asynchronous callback object.
2012      * @param cookie User-defined data to associate with the invocation.
2013      * @return The asynchronous result object for the invocation.
2014      */
2015     ::Ice::AsyncResultPtr begin_ice_id(const ::Ice::CallbackPtr& cb,
2016                                        const ::Ice::LocalObjectPtr& cookie = 0)
2017     {
2018         return _iceI_begin_ice_id(::Ice::noExplicitContext, cb, cookie);
2019     }
2020 
2021     /**
2022      * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy.
2023      * @param context The context map for the invocation.
2024      * @param cb Asynchronous callback object.
2025      * @param cookie User-defined data to associate with the invocation.
2026      * @return The asynchronous result object for the invocation.
2027      */
2028     ::Ice::AsyncResultPtr begin_ice_id(const ::Ice::Context& context,
2029                                        const ::Ice::CallbackPtr& cb,
2030                                        const ::Ice::LocalObjectPtr& cookie = 0)
2031     {
2032         return _iceI_begin_ice_id(context, cb, cookie);
2033     }
2034 
2035     /**
2036      * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy.
2037      * @param cb Asynchronous callback object.
2038      * @param cookie User-defined data to associate with the invocation.
2039      * @return The asynchronous result object for the invocation.
2040      */
2041     ::Ice::AsyncResultPtr begin_ice_id(const ::Ice::Callback_Object_ice_idPtr& cb,
2042                                        const ::Ice::LocalObjectPtr& cookie = 0)
2043     {
2044         return _iceI_begin_ice_id(::Ice::noExplicitContext, cb, cookie);
2045     }
2046 
2047     /**
2048      * Returns the Slice type ID of the most-derived interface supported by the target object of this proxy.
2049      * @param context The context map for the invocation.
2050      * @param cb Asynchronous callback object.
2051      * @param cookie User-defined data to associate with the invocation.
2052      * @return The asynchronous result object for the invocation.
2053      */
2054     ::Ice::AsyncResultPtr begin_ice_id(const ::Ice::Context& context,
2055                                        const ::Ice::Callback_Object_ice_idPtr& cb,
2056                                        const ::Ice::LocalObjectPtr& cookie = 0)
2057     {
2058         return _iceI_begin_ice_id(context, cb, cookie);
2059     }
2060 
2061     /**
2062      * Completes an invocation of begin_ice_id.
2063      * @param result The asynchronous result object for the invocation.
2064      * @return The Slice type ID of the most-derived interface.
2065      */
2066     ::std::string end_ice_id(const ::Ice::AsyncResultPtr& result);
2067 
2068     /**
2069      * Returns the Slice type ID associated with this type.
2070      * @return The Slice type ID.
2071      */
ice_staticId()2072     static const ::std::string& ice_staticId()
2073     {
2074         return ::Ice::Object::ice_staticId();
2075     }
2076 
2077     /**
2078      * Invokes an operation dynamically.
2079      * @param operation The name of the operation to invoke.
2080      * @param mode The operation mode (normal or idempotent).
2081      * @param inParams An encapsulation containing the encoded in-parameters for the operation.
2082      * @param outParams An encapsulation containing the encoded results.
2083      * @param context The context map for the invocation.
2084      * @return True if the operation completed successfully, in which case outParams contains
2085      * the encoded out parameters. False if the operation raised a user exception, in which
2086      * case outParams contains the encoded user exception. If the operation raises a run-time
2087      * exception, it throws it directly.
2088      */
2089     bool ice_invoke(const ::std::string& operation,
2090                     ::Ice::OperationMode mode,
2091                     const ::std::vector< ::Ice::Byte>& inParams,
2092                     ::std::vector< ::Ice::Byte>& outParams,
2093                     const ::Ice::Context& context = ::Ice::noExplicitContext);
2094 
2095     /**
2096      * Invokes an operation dynamically.
2097      * @param operation The name of the operation to invoke.
2098      * @param mode The operation mode (normal or idempotent).
2099      * @param inParams An encapsulation containing the encoded in-parameters for the operation.
2100      * @return The asynchronous result object for the invocation.
2101      */
begin_ice_invoke(const::std::string & operation,::Ice::OperationMode mode,const::std::vector<::Ice::Byte> & inParams)2102     ::Ice::AsyncResultPtr begin_ice_invoke(const ::std::string& operation,
2103                                            ::Ice::OperationMode mode,
2104                                            const ::std::vector< ::Ice::Byte>& inParams)
2105     {
2106         return _iceI_begin_ice_invoke(operation, mode, inParams, ::Ice::noExplicitContext,
2107                                       ::IceInternal::dummyCallback, 0);
2108     }
2109 
2110     /**
2111      * Invokes an operation dynamically.
2112      * @param operation The name of the operation to invoke.
2113      * @param mode The operation mode (normal or idempotent).
2114      * @param inParams An encapsulation containing the encoded in-parameters for the operation.
2115      * @param context The context map for the invocation.
2116      * @return The asynchronous result object for the invocation.
2117      */
begin_ice_invoke(const::std::string & operation,::Ice::OperationMode mode,const::std::vector<::Ice::Byte> & inParams,const::Ice::Context & context)2118     ::Ice::AsyncResultPtr begin_ice_invoke(const ::std::string& operation,
2119                                            ::Ice::OperationMode mode,
2120                                            const ::std::vector< ::Ice::Byte>& inParams,
2121                                            const ::Ice::Context& context)
2122     {
2123         return _iceI_begin_ice_invoke(operation, mode, inParams, context, ::IceInternal::dummyCallback, 0);
2124     }
2125 
2126     /**
2127      * Invokes an operation dynamically.
2128      * @param operation The name of the operation to invoke.
2129      * @param mode The operation mode (normal or idempotent).
2130      * @param inParams An encapsulation containing the encoded in-parameters for the operation.
2131      * @param cb Asynchronous callback object.
2132      * @param cookie User-defined data to associate with the invocation.
2133      * @return The asynchronous result object for the invocation.
2134      */
2135     ::Ice::AsyncResultPtr begin_ice_invoke(const ::std::string& operation,
2136                                            ::Ice::OperationMode mode,
2137                                            const ::std::vector< ::Ice::Byte>& inParams,
2138                                            const ::Ice::CallbackPtr& cb,
2139                                            const ::Ice::LocalObjectPtr& cookie = 0)
2140     {
2141         return _iceI_begin_ice_invoke(operation, mode, inParams, ::Ice::noExplicitContext, cb, cookie);
2142     }
2143 
2144     /**
2145      * Invokes an operation dynamically.
2146      * @param operation The name of the operation to invoke.
2147      * @param mode The operation mode (normal or idempotent).
2148      * @param inParams An encapsulation containing the encoded in-parameters for the operation.
2149      * @param context The context map for the invocation.
2150      * @param cb Asynchronous callback object.
2151      * @param cookie User-defined data to associate with the invocation.
2152      * @return The asynchronous result object for the invocation.
2153      */
2154     ::Ice::AsyncResultPtr begin_ice_invoke(const ::std::string& operation,
2155                                            ::Ice::OperationMode mode,
2156                                            const ::std::vector< ::Ice::Byte>& inParams,
2157                                            const ::Ice::Context& context,
2158                                            const ::Ice::CallbackPtr& cb,
2159                                            const ::Ice::LocalObjectPtr& cookie = 0)
2160     {
2161         return _iceI_begin_ice_invoke(operation, mode, inParams, context, cb, cookie);
2162     }
2163 
2164     /**
2165      * Invokes an operation dynamically.
2166      * @param operation The name of the operation to invoke.
2167      * @param mode The operation mode (normal or idempotent).
2168      * @param inParams An encapsulation containing the encoded in-parameters for the operation.
2169      * @param cb Asynchronous callback object.
2170      * @param cookie User-defined data to associate with the invocation.
2171      * @return The asynchronous result object for the invocation.
2172      */
2173     ::Ice::AsyncResultPtr begin_ice_invoke(const ::std::string& operation,
2174                                            ::Ice::OperationMode mode,
2175                                            const ::std::vector< ::Ice::Byte>& inParams,
2176                                            const ::Ice::Callback_Object_ice_invokePtr& cb,
2177                                            const ::Ice::LocalObjectPtr& cookie = 0)
2178     {
2179         return _iceI_begin_ice_invoke(operation, mode, inParams, ::Ice::noExplicitContext, cb, cookie);
2180     }
2181 
2182     /**
2183      * Invokes an operation dynamically.
2184      * @param operation The name of the operation to invoke.
2185      * @param mode The operation mode (normal or idempotent).
2186      * @param inParams An encapsulation containing the encoded in-parameters for the operation.
2187      * @param context The context map for the invocation.
2188      * @param cb Asynchronous callback object.
2189      * @param cookie User-defined data to associate with the invocation.
2190      * @return The asynchronous result object for the invocation.
2191      */
2192     ::Ice::AsyncResultPtr begin_ice_invoke(const ::std::string& operation,
2193                                            ::Ice::OperationMode mode,
2194                                            const ::std::vector< ::Ice::Byte>& inParams,
2195                                            const ::Ice::Context& context,
2196                                            const ::Ice::Callback_Object_ice_invokePtr& cb,
2197                                            const ::Ice::LocalObjectPtr& cookie = 0)
2198     {
2199         return _iceI_begin_ice_invoke(operation, mode, inParams, context, cb, cookie);
2200     }
2201 
2202     /**
2203      * Invokes an operation dynamically.
2204      * @param outParams An encapsulation containing the encoded results.
2205      * @param result The asynchronous result object for the invocation.
2206      * @return True if the operation completed successfully, in which case outParams contains
2207      * the encoded out parameters. False if the operation raised a user exception, in which
2208      * case outParams contains the encoded user exception. If the operation raises a run-time
2209      * exception, it throws it directly.
2210      */
2211     bool end_ice_invoke(::std::vector< ::Ice::Byte>& outParams, const ::Ice::AsyncResultPtr& result);
2212 
2213     /**
2214      * Invokes an operation dynamically.
2215      * @param operation The name of the operation to invoke.
2216      * @param mode The operation mode (normal or idempotent).
2217      * @param inParams An encapsulation containing the encoded in-parameters for the operation.
2218      * @param outParams An encapsulation containing the encoded results.
2219      * @param context The context map for the invocation.
2220      * @return True if the operation completed successfully, in which case outParams contains
2221      * the encoded out parameters. False if the operation raised a user exception, in which
2222      * case outParams contains the encoded user exception. If the operation raises a run-time
2223      * exception, it throws it directly.
2224      */
2225     bool ice_invoke(const ::std::string& operation,
2226                     ::Ice::OperationMode mode,
2227                     const ::std::pair<const ::Ice::Byte*, const ::Ice::Byte*>& inParams,
2228                     ::std::vector< ::Ice::Byte>& outParams,
2229                     const ::Ice::Context& context = ::Ice::noExplicitContext)
2230     {
2231         return end_ice_invoke(outParams, _iceI_begin_ice_invoke(operation, mode, inParams, context,
2232                                                                 ::IceInternal::dummyCallback, 0, true));
2233     }
2234 
2235     /**
2236      * Invokes an operation dynamically.
2237      * @param operation The name of the operation to invoke.
2238      * @param mode The operation mode (normal or idempotent).
2239      * @param inParams An encapsulation containing the encoded in-parameters for the operation.
2240      * @return The asynchronous result object for the invocation.
2241      */
begin_ice_invoke(const::std::string & operation,::Ice::OperationMode mode,const::std::pair<const::Ice::Byte *,const::Ice::Byte * > & inParams)2242     ::Ice::AsyncResultPtr begin_ice_invoke(const ::std::string& operation,
2243                                            ::Ice::OperationMode mode,
2244                                            const ::std::pair<const ::Ice::Byte*, const ::Ice::Byte*>& inParams)
2245     {
2246         return _iceI_begin_ice_invoke(operation, mode, inParams, ::Ice::noExplicitContext,
2247                                       ::IceInternal::dummyCallback, 0);
2248     }
2249 
2250     /**
2251      * Invokes an operation dynamically.
2252      * @param operation The name of the operation to invoke.
2253      * @param mode The operation mode (normal or idempotent).
2254      * @param inParams An encapsulation containing the encoded in-parameters for the operation.
2255      * @param context The context map for the invocation.
2256      * @param cookie User-defined data to associate with the invocation.
2257      * @return The asynchronous result object for the invocation.
2258      */
2259     ::Ice::AsyncResultPtr begin_ice_invoke(const ::std::string& operation,
2260                                            ::Ice::OperationMode mode,
2261                                            const ::std::pair<const ::Ice::Byte*, const ::Ice::Byte*>& inParams,
2262                                            const ::Ice::Context& context,
2263                                            const ::Ice::LocalObjectPtr& cookie = 0)
2264     {
2265         return _iceI_begin_ice_invoke(operation, mode, inParams, context, ::IceInternal::dummyCallback, cookie);
2266     }
2267 
2268     /**
2269      * Invokes an operation dynamically.
2270      * @param operation The name of the operation to invoke.
2271      * @param mode The operation mode (normal or idempotent).
2272      * @param inParams An encapsulation containing the encoded in-parameters for the operation.
2273      * @param cb Asynchronous callback object.
2274      * @param cookie User-defined data to associate with the invocation.
2275      * @return The asynchronous result object for the invocation.
2276      */
2277     ::Ice::AsyncResultPtr begin_ice_invoke(const ::std::string& operation,
2278                                            ::Ice::OperationMode mode,
2279                                            const ::std::pair<const ::Ice::Byte*, const ::Ice::Byte*>& inParams,
2280                                            const ::Ice::CallbackPtr& cb,
2281                                            const ::Ice::LocalObjectPtr& cookie = 0)
2282     {
2283         return _iceI_begin_ice_invoke(operation, mode, inParams, ::Ice::noExplicitContext, cb, cookie);
2284     }
2285 
2286     /**
2287      * Invokes an operation dynamically.
2288      * @param operation The name of the operation to invoke.
2289      * @param mode The operation mode (normal or idempotent).
2290      * @param inParams An encapsulation containing the encoded in-parameters for the operation.
2291      * @param context The context map for the invocation.
2292      * @param cb Asynchronous callback object.
2293      * @param cookie User-defined data to associate with the invocation.
2294      * @return The asynchronous result object for the invocation.
2295      */
2296     ::Ice::AsyncResultPtr begin_ice_invoke(const ::std::string& operation,
2297                                            ::Ice::OperationMode mode,
2298                                            const ::std::pair<const ::Ice::Byte*, const ::Ice::Byte*>& inParams,
2299                                            const ::Ice::Context& context,
2300                                            const ::Ice::CallbackPtr& cb,
2301                                            const ::Ice::LocalObjectPtr& cookie = 0)
2302     {
2303         return _iceI_begin_ice_invoke(operation, mode, inParams, context, cb, cookie);
2304     }
2305 
2306     /**
2307      * Invokes an operation dynamically.
2308      * @param operation The name of the operation to invoke.
2309      * @param mode The operation mode (normal or idempotent).
2310      * @param inParams An encapsulation containing the encoded in-parameters for the operation.
2311      * @param cb Asynchronous callback object.
2312      * @param cookie User-defined data to associate with the invocation.
2313      * @return The asynchronous result object for the invocation.
2314      */
2315     ::Ice::AsyncResultPtr begin_ice_invoke(const ::std::string& operation,
2316                                            ::Ice::OperationMode mode,
2317                                            const ::std::pair<const ::Ice::Byte*, const ::Ice::Byte*>& inParams,
2318                                            const ::Ice::Callback_Object_ice_invokePtr& cb,
2319                                            const ::Ice::LocalObjectPtr& cookie = 0)
2320     {
2321         return _iceI_begin_ice_invoke(operation, mode, inParams, ::Ice::noExplicitContext, cb, cookie);
2322     }
2323 
2324     /**
2325      * Invokes an operation dynamically.
2326      * @param operation The name of the operation to invoke.
2327      * @param mode The operation mode (normal or idempotent).
2328      * @param inParams An encapsulation containing the encoded in-parameters for the operation.
2329      * @param context The context map for the invocation.
2330      * @param cb Asynchronous callback object.
2331      * @param cookie User-defined data to associate with the invocation.
2332      * @return The asynchronous result object for the invocation.
2333      */
2334     ::Ice::AsyncResultPtr begin_ice_invoke(const ::std::string& operation,
2335                                            ::Ice::OperationMode mode,
2336                                            const ::std::pair<const ::Ice::Byte*, const ::Ice::Byte*>& inParams,
2337                                            const ::Ice::Context& context,
2338                                            const ::Ice::Callback_Object_ice_invokePtr& cb,
2339                                            const ::Ice::LocalObjectPtr& cookie = 0)
2340     {
2341         return _iceI_begin_ice_invoke(operation, mode, inParams, context, cb, cookie);
2342     }
2343 
2344     /// \cond INTERNAL
2345     bool _iceI_end_ice_invoke(::std::pair<const ::Ice::Byte*, const ::Ice::Byte*>&, const ::Ice::AsyncResultPtr&);
2346     /// \endcond
2347 
2348     /**
2349      * Obtains the identity embedded in this proxy.
2350      * @return The identity of the target object.
2351      */
2352     ::Ice::Identity ice_getIdentity() const;
2353 
2354     /**
2355      * Obtains a proxy that is identical to this proxy, except for the identity.
2356      * @param id The identity for the new proxy.
2357      * @return A proxy with the new identity.
2358      */
2359     ::Ice::ObjectPrx ice_identity(const ::Ice::Identity& id) const;
2360 
2361     /**
2362      * Obtains the per-proxy context for this proxy.
2363      * @return The per-proxy context.
2364      */
2365     ::Ice::Context ice_getContext() const;
2366 
2367     /**
2368      * Obtains a proxy that is identical to this proxy, except for the per-proxy context.
2369      * @param context The context for the new proxy.
2370      * @return A proxy with the new per-proxy context.
2371      */
2372     ::Ice::ObjectPrx ice_context(const ::Ice::Context& context) const;
2373 
2374     /**
2375      * Obtains the facet for this proxy.
2376      * @return The facet for this proxy. If the proxy uses the default facet, the return value is the empty string.
2377      */
2378     const ::std::string& ice_getFacet() const;
2379 
2380     /**
2381      * Obtains a proxy that is identical to this proxy, except for the facet.
2382      * @param facet The facet for the new proxy.
2383      * @return A proxy with the new facet.
2384      */
2385     ::Ice::ObjectPrx ice_facet(const ::std::string& facet) const;
2386 
2387     /**
2388      * Obtains the adapter ID for this proxy.
2389      * @return The adapter ID. If the proxy does not have an adapter ID, the return value is the empty string.
2390      */
2391     ::std::string ice_getAdapterId() const;
2392 
2393     /**
2394      * Obtains a proxy that is identical to this proxy, except for the adapter ID.
2395      * @param id The adapter ID for the new proxy.
2396      * @return A proxy with the new adapter ID.
2397      */
2398     ::Ice::ObjectPrx ice_adapterId(const ::std::string& id) const;
2399 
2400     /**
2401      * Obtains the endpoints used by this proxy.
2402      * @return The endpoints used by this proxy.
2403      */
2404     ::Ice::EndpointSeq ice_getEndpoints() const;
2405 
2406     /**
2407      * Obtains a proxy that is identical to this proxy, except for the endpoints.
2408      * @param endpoints The endpoints for the new proxy.
2409      * @return A proxy with the new endpoints.
2410      */
2411     ::Ice::ObjectPrx ice_endpoints(const ::Ice::EndpointSeq& endpoints) const;
2412 
2413     /**
2414      * Obtains the locator cache timeout of this proxy.
2415      * @return The locator cache timeout value (in seconds).
2416      */
2417     ::Ice::Int ice_getLocatorCacheTimeout() const;
2418 
2419     /**
2420      * Obtains a proxy that is identical to this proxy, except for the locator cache timeout.
2421      * @param timeout The new locator cache timeout (in seconds).
2422      * @return A proxy with the new timeout.
2423      */
2424     ::Ice::ObjectPrx ice_locatorCacheTimeout(::Ice::Int timeout) const;
2425 
2426     /**
2427      * Determines whether this proxy caches connections.
2428      * @return True if this proxy caches connections, false otherwise.
2429      */
2430     bool ice_isConnectionCached() const;
2431 
2432     /**
2433      * Obtains a proxy that is identical to this proxy, except for connection caching.
2434      * @param b True if the new proxy should cache connections, false otherwise.
2435      * @return A proxy with the specified caching policy.
2436      */
2437     ::Ice::ObjectPrx ice_connectionCached(bool b) const;
2438 
2439     /**
2440      * Obtains the endpoint selection policy for this proxy (randomly or ordered).
2441      * @return The endpoint selection policy.
2442      */
2443     ::Ice::EndpointSelectionType ice_getEndpointSelection() const;
2444 
2445     /**
2446      * Obtains a proxy that is identical to this proxy, except for the endpoint selection policy.
2447      * @param type The new endpoint selection policy.
2448      * @return A proxy with the specified endpoint selection policy.
2449      */
2450     ::Ice::ObjectPrx ice_endpointSelection(::Ice::EndpointSelectionType type) const;
2451 
2452     /**
2453      * Determines whether this proxy uses only secure endpoints.
2454      * @return True if this proxy communicates only via secure endpoints, false otherwise.
2455      */
2456     bool ice_isSecure() const;
2457 
2458     /**
2459      * Obtains a proxy that is identical to this proxy, except for how it selects endpoints.
2460      * @param b If true, only endpoints that use a secure transport are used by the new proxy.
2461      * If false, the returned proxy uses both secure and insecure endpoints.
2462      * @return A proxy with the specified security policy.
2463      */
2464     ::Ice::ObjectPrx ice_secure(bool b) const;
2465 
2466     /**
2467      * Obtains the encoding version used to marshal request parameters.
2468      * @return The encoding version.
2469      */
2470     ::Ice::EncodingVersion ice_getEncodingVersion() const;
2471 
2472     /**
2473      * Obtains a proxy that is identical to this proxy, except for the encoding used to marshal
2474      * parameters.
2475      * @param version The encoding version to use to marshal request parameters.
2476      * @return A proxy with the specified encoding version.
2477      */
2478     ::Ice::ObjectPrx ice_encodingVersion(const ::Ice::EncodingVersion& version) const;
2479 
2480     /**
2481      * Determines whether this proxy prefers secure endpoints.
2482      * @return True if the proxy always attempts to invoke via secure endpoints before it
2483      * attempts to use insecure endpoints, false otherwise.
2484      */
2485     bool ice_isPreferSecure() const;
2486 
2487     /**
2488      * Obtains a proxy that is identical to this proxy, except for its endpoint selection policy.
2489      * @param b If true, the new proxy will use secure endpoints for invocations and only use
2490      * insecure endpoints if an invocation cannot be made via secure endpoints. If false, the
2491      * proxy prefers insecure endpoints to secure ones.
2492      * @return A proxy with the specified selection policy.
2493      */
2494     ::Ice::ObjectPrx ice_preferSecure(bool b) const;
2495 
2496     /**
2497      * Obtains the router for this proxy.
2498      * @return The router for the proxy. If no router is configured for the proxy, the return value
2499      * is nil.
2500      */
2501     ::Ice::RouterPrx ice_getRouter() const;
2502 
2503     /**
2504      * Obtains a proxy that is identical to this proxy, except for the router.
2505      * @param router The router for the new proxy.
2506      * @return A proxy with the specified router.
2507      */
2508     ::Ice::ObjectPrx ice_router(const ::Ice::RouterPrx& router) const;
2509 
2510     /**
2511      * Obtains the locator for this proxy.
2512      * @return The locator for this proxy. If no locator is configured, the return value is nil.
2513      */
2514     ::Ice::LocatorPrx ice_getLocator() const;
2515 
2516     /**
2517      * Obtains a proxy that is identical to this proxy, except for the locator.
2518      * @param locator The locator for the new proxy.
2519      * @return A proxy with the specified locator.
2520      */
2521     ::Ice::ObjectPrx ice_locator(const ::Ice::LocatorPrx& locator) const;
2522 
2523     /**
2524      * Determines whether this proxy uses collocation optimization.
2525      * @return True if the proxy uses collocation optimization, false otherwise.
2526      */
2527     bool ice_isCollocationOptimized() const;
2528 
2529     /**
2530      * Obtains a proxy that is identical to this proxy, except for collocation optimization.
2531      * @param b True if the new proxy enables collocation optimization, false otherwise.
2532      * @return A proxy with the specified collocation optimization.
2533      */
2534     ::Ice::ObjectPrx ice_collocationOptimized(bool b) const;
2535 
2536     /**
2537      * Obtains the invocation timeout of this proxy.
2538      * @return The invocation timeout value (in milliseconds).
2539      */
2540     ::Ice::Int ice_getInvocationTimeout() const;
2541 
2542     /**
2543      * Obtains a proxy that is identical to this proxy, except for the invocation timeout.
2544      * @param timeout The new invocation timeout (in milliseconds).
2545      * @return A proxy with the new timeout.
2546      */
2547     ::Ice::ObjectPrx ice_invocationTimeout(::Ice::Int timeout) const;
2548 
2549     /**
2550      * Obtains a proxy that is identical to this proxy, but uses twoway invocations.
2551      * @return A proxy that uses twoway invocations.
2552      */
2553     ::Ice::ObjectPrx ice_twoway() const;
2554 
2555     /**
2556      * Determines whether this proxy uses twoway invocations.
2557      * @return True if this proxy uses twoway invocations, false otherwise.
2558      */
2559     bool ice_isTwoway() const;
2560 
2561     /**
2562      * Obtains a proxy that is identical to this proxy, but uses oneway invocations.
2563      * @return A proxy that uses oneway invocations.
2564      */
2565     ::Ice::ObjectPrx ice_oneway() const;
2566 
2567     /**
2568      * Determines whether this proxy uses oneway invocations.
2569      * @return True if this proxy uses oneway invocations, false otherwise.
2570      */
2571     bool ice_isOneway() const;
2572 
2573     /**
2574      * Obtains a proxy that is identical to this proxy, but uses batch oneway invocations.
2575      * @return A proxy that uses batch oneway invocations.
2576      */
2577     ::Ice::ObjectPrx ice_batchOneway() const;
2578 
2579     /**
2580      * Determines whether this proxy uses batch oneway invocations.
2581      * @return True if this proxy uses batch oneway invocations, false otherwise.
2582      */
2583     bool ice_isBatchOneway() const;
2584 
2585     /**
2586      * Obtains a proxy that is identical to this proxy, but uses datagram invocations.
2587      * @return A proxy that uses datagram invocations.
2588      */
2589     ::Ice::ObjectPrx ice_datagram() const;
2590 
2591     /**
2592      * Determines whether this proxy uses datagram invocations.
2593      * @return True if this proxy uses datagram invocations, false otherwise.
2594      */
2595     bool ice_isDatagram() const;
2596 
2597     /**
2598      * Obtains a proxy that is identical to this proxy, but uses batch datagram invocations.
2599      * @return A proxy that uses batch datagram invocations.
2600      */
2601     ::Ice::ObjectPrx ice_batchDatagram() const;
2602 
2603     /**
2604      * Determines whether this proxy uses batch datagram invocations.
2605      * @return True if this proxy uses batch datagram invocations, false otherwise.
2606      */
2607     bool ice_isBatchDatagram() const;
2608 
2609     /**
2610      * Obtains a proxy that is identical to this proxy, except for its compression setting which
2611      * overrides the compression setting from the proxy endpoints.
2612      * @param b True enables compression for the new proxy, false disables compression.
2613      * @return A proxy with the specified compression override setting.
2614      */
2615     ::Ice::ObjectPrx ice_compress(bool b) const;
2616 
2617     /**
2618      * Obtains the compression override setting of this proxy.
2619      * @return The compression override setting. If nullopt is returned, no override is set. Otherwise, true
2620      * if compression is enabled, false otherwise.
2621      */
2622     ::IceUtil::Optional<bool> ice_getCompress() const;
2623 
2624     /**
2625      * Obtains a proxy that is identical to this proxy, except for its connection timeout setting
2626      * which overrides the timeot setting from the proxy endpoints.
2627      * @param timeout The connection timeout override for the proxy (in milliseconds).
2628      * @return A proxy with the specified timeout override.
2629      */
2630     ::Ice::ObjectPrx ice_timeout(int timeout) const;
2631 
2632     /**
2633      * Obtains the timeout override of this proxy.
2634      * @return The timeout override. If nullopt is returned, no override is set. Otherwise, returns
2635      * the timeout override value.
2636      */
2637     ::IceUtil::Optional<int> ice_getTimeout() const;
2638 
2639     /**
2640      * Obtains a proxy that is identical to this proxy, except for its connection ID.
2641      * @param id The connection ID for the new proxy. An empty string removes the
2642      * connection ID.
2643      * @return A proxy with the specified connection ID.
2644      */
2645     ::Ice::ObjectPrx ice_connectionId(const ::std::string& id) const;
2646 
2647     /**
2648      * Obtains the connection ID of this proxy.
2649      * @return The connection ID.
2650      */
2651     ::std::string ice_getConnectionId() const;
2652 
2653     /**
2654      * Obtains a proxy that is identical to this proxy, except it's a fixed proxy bound
2655      * the given connection.
2656      * @param connection The fixed proxy connection.
2657      * @return A fixed proxy bound to the given connection.
2658      */
2659     ::Ice::ObjectPrx ice_fixed(const ::Ice::ConnectionPtr& connection) const;
2660 
2661     /**
2662      * Obtains the Connection for this proxy. If the proxy does not yet have an established connection,
2663      * it first attempts to create a connection.
2664      * @return The connection for this proxy.
2665      */
ice_getConnection()2666     ::Ice::ConnectionPtr ice_getConnection()
2667     {
2668         return end_ice_getConnection(begin_ice_getConnection());
2669     }
2670 
2671     /**
2672      * Obtains the Connection for this proxy. If the proxy does not yet have an established connection,
2673      * it first attempts to create a connection.
2674      * @return The asynchronous result object for the invocation.
2675      */
begin_ice_getConnection()2676     ::Ice::AsyncResultPtr begin_ice_getConnection()
2677     {
2678         return _iceI_begin_ice_getConnection(::IceInternal::dummyCallback, 0);
2679     }
2680 
2681     /**
2682      * Obtains the Connection for this proxy. If the proxy does not yet have an established connection,
2683      * it first attempts to create a connection.
2684      * @param cb Asynchronous callback object.
2685      * @param cookie User-defined data to associate with the invocation.
2686      * @return The asynchronous result object for the invocation.
2687      */
2688     ::Ice::AsyncResultPtr begin_ice_getConnection(const ::Ice::CallbackPtr& cb,
2689                                                   const ::Ice::LocalObjectPtr& cookie = 0)
2690     {
2691         return _iceI_begin_ice_getConnection(cb, cookie);
2692     }
2693 
2694     /**
2695      * Obtains the Connection for this proxy. If the proxy does not yet have an established connection,
2696      * it first attempts to create a connection.
2697      * @param cb Asynchronous callback object.
2698      * @param cookie User-defined data to associate with the invocation.
2699      * @return The asynchronous result object for the invocation.
2700      */
2701     ::Ice::AsyncResultPtr begin_ice_getConnection(const ::Ice::Callback_Object_ice_getConnectionPtr& cb,
2702                                                   const ::Ice::LocalObjectPtr& cookie = 0)
2703     {
2704         return _iceI_begin_ice_getConnection(cb, cookie);
2705     }
2706 
2707     /**
2708      * Completes an invocation of begin_ice_getConnection.
2709      * @param result The asynchronous result object for the invocation.
2710      * @return The connection for this proxy.
2711      */
2712     ::Ice::ConnectionPtr end_ice_getConnection(const ::Ice::AsyncResultPtr& result);
2713 
2714     /**
2715      * Returns the cached connection for this proxy. If the proxy does not yet have an established
2716      * connection, it does not attempt to create a connection.
2717      *
2718      * @return The cached connection for this proxy, or nil if the proxy does not have
2719      * an established connection.
2720      */
2721     ::Ice::ConnectionPtr ice_getCachedConnection() const;
2722 
2723     /**
2724      * Flushes any pending batched requests for this proxy. The call blocks until the flush is complete.
2725      */
ice_flushBatchRequests()2726     void ice_flushBatchRequests()
2727     {
2728         return end_ice_flushBatchRequests(begin_ice_flushBatchRequests());
2729     }
2730 
2731     /**
2732      * Flushes any pending batched requests for this proxy. The call blocks until the flush is complete.
2733      * @return The asynchronous result object for the invocation.
2734      */
begin_ice_flushBatchRequests()2735     ::Ice::AsyncResultPtr begin_ice_flushBatchRequests()
2736     {
2737         return _iceI_begin_ice_flushBatchRequests(::IceInternal::dummyCallback, 0);
2738     }
2739 
2740     /**
2741      * Flushes any pending batched requests for this proxy. The call blocks until the flush is complete.
2742      * @param cb Asynchronous callback object.
2743      * @param cookie User-defined data to associate with the invocation.
2744      * @return The asynchronous result object for the invocation.
2745      */
2746     ::Ice::AsyncResultPtr begin_ice_flushBatchRequests(const ::Ice::CallbackPtr& cb,
2747                                                        const ::Ice::LocalObjectPtr& cookie = 0)
2748     {
2749         return _iceI_begin_ice_flushBatchRequests(cb, cookie);
2750     }
2751 
2752     /**
2753      * Flushes any pending batched requests for this proxy. The call blocks until the flush is complete.
2754      * @param cb Asynchronous callback object.
2755      * @param cookie User-defined data to associate with the invocation.
2756      * @return The asynchronous result object for the invocation.
2757      */
2758     ::Ice::AsyncResultPtr begin_ice_flushBatchRequests(const ::Ice::Callback_Object_ice_flushBatchRequestsPtr& cb,
2759                                                        const ::Ice::LocalObjectPtr& cookie = 0)
2760     {
2761         return _iceI_begin_ice_flushBatchRequests(cb, cookie);
2762     }
2763 
2764     /**
2765      * Completes an invocation of begin_ice_flushBatchRequests.
2766      * @param result The asynchronous result object for the invocation.
2767      */
2768     void end_ice_flushBatchRequests(const ::Ice::AsyncResultPtr& result);
2769 
2770     /// \cond INTERNAL
_getReference()2771     const ::IceInternal::ReferencePtr& _getReference() const { return _reference; }
2772 
2773     ::Ice::Int _hash() const;
2774 
2775     void _copyFrom(const ::Ice::ObjectPrx&);
2776 
2777     int _handleException(const ::Ice::Exception&, const ::IceInternal::RequestHandlerPtr&, ::Ice::OperationMode,
2778                           bool, int&);
2779 
2780     void _checkTwowayOnly(const ::std::string&, bool) const;
2781 
2782     void _end(const ::Ice::AsyncResultPtr&, const std::string&) const;
2783 
2784     ::IceInternal::RequestHandlerPtr _getRequestHandler();
2785     ::IceInternal::BatchRequestQueuePtr _getBatchRequestQueue();
2786     ::IceInternal::RequestHandlerPtr _setRequestHandler(const ::IceInternal::RequestHandlerPtr&);
2787     void _updateRequestHandler(const ::IceInternal::RequestHandlerPtr&, const ::IceInternal::RequestHandlerPtr&);
2788 
2789     void _write(::Ice::OutputStream&) const;
2790     /// \endcond
2791 
2792 protected:
2793 
2794     /// \cond INTERNAL
2795     virtual Object* _newInstance() const;
2796     /// \endcond
2797 
2798 private:
2799 
2800     ::Ice::AsyncResultPtr _iceI_begin_ice_isA(const ::std::string&,
2801                                           const ::Ice::Context&,
2802                                           const ::IceInternal::CallbackBasePtr&,
2803                                           const ::Ice::LocalObjectPtr&,
2804                                           bool = false);
2805 
2806     ::Ice::AsyncResultPtr _iceI_begin_ice_ping(const ::Ice::Context&,
2807                                            const ::IceInternal::CallbackBasePtr&,
2808                                            const ::Ice::LocalObjectPtr&,
2809                                            bool = false);
2810 
2811     ::Ice::AsyncResultPtr _iceI_begin_ice_ids(const ::Ice::Context&,
2812                                           const ::IceInternal::CallbackBasePtr&,
2813                                           const ::Ice::LocalObjectPtr&,
2814                                           bool = false);
2815 
2816     ::Ice::AsyncResultPtr _iceI_begin_ice_id(const ::Ice::Context&,
2817                                          const ::IceInternal::CallbackBasePtr&,
2818                                          const ::Ice::LocalObjectPtr&,
2819                                          bool = false);
2820 
2821     ::Ice::AsyncResultPtr _iceI_begin_ice_invoke(const ::std::string&,
2822                                              ::Ice::OperationMode,
2823                                              const ::std::vector< ::Ice::Byte>&,
2824                                              const ::Ice::Context&,
2825                                              const ::IceInternal::CallbackBasePtr&,
2826                                              const ::Ice::LocalObjectPtr&,
2827                                              bool = false);
2828 
2829     ::Ice::AsyncResultPtr _iceI_begin_ice_invoke(const ::std::string&,
2830                                              ::Ice::OperationMode,
2831                                              const ::std::pair<const ::Ice::Byte*, const ::Ice::Byte*>&,
2832                                              const ::Ice::Context&,
2833                                              const ::IceInternal::CallbackBasePtr&,
2834                                              const ::Ice::LocalObjectPtr&,
2835                                              bool = false);
2836 
2837     ::Ice::AsyncResultPtr _iceI_begin_ice_getConnection(const ::IceInternal::CallbackBasePtr&,
2838                                                     const ::Ice::LocalObjectPtr&);
2839 
2840     ::Ice::AsyncResultPtr _iceI_begin_ice_flushBatchRequests(const ::IceInternal::CallbackBasePtr&,
2841                                                          const ::Ice::LocalObjectPtr&);
2842 
2843     void setup(const ::IceInternal::ReferencePtr&);
2844     friend class ::IceInternal::ProxyFactory;
2845 
2846     ::IceInternal::ReferencePtr _reference;
2847     ::IceInternal::RequestHandlerPtr _requestHandler;
2848     ::IceInternal::BatchRequestQueuePtr _batchRequestQueue;
2849     IceUtil::Mutex _mutex;
2850 };
2851 
2852 } }
2853 
2854 ICE_API ::std::ostream& operator<<(::std::ostream&, const ::IceProxy::Ice::Object&);
2855 
2856 namespace Ice
2857 {
2858 
2859 /**
2860  * Helper template that supplies proxy factory functions.
2861  * \headerfile Ice/Ice.h
2862  */
2863 template<typename Prx, typename Base>
2864 class Proxy : public virtual Base
2865 {
2866 public:
2867 
2868     /**
2869      * Obtains a proxy that is identical to this proxy, except for the per-proxy context.
2870      * @param context The context for the new proxy.
2871      * @return A proxy with the new per-proxy context.
2872      */
ice_context(const::Ice::Context & context)2873     IceInternal::ProxyHandle<Prx> ice_context(const ::Ice::Context& context) const
2874     {
2875         return dynamic_cast<Prx*>(::IceProxy::Ice::Object::ice_context(context).get());
2876     }
2877 
2878     /**
2879      * Obtains a proxy that is identical to this proxy, except for the adapter ID.
2880      * @param id The adapter ID for the new proxy.
2881      * @return A proxy with the new adapter ID.
2882      */
ice_adapterId(const::std::string & id)2883     IceInternal::ProxyHandle<Prx> ice_adapterId(const ::std::string& id) const
2884     {
2885         return dynamic_cast<Prx*>(::IceProxy::Ice::Object::ice_adapterId(id).get());
2886     }
2887 
2888     /**
2889      * Obtains a proxy that is identical to this proxy, except for the endpoints.
2890      * @param endpoints The endpoints for the new proxy.
2891      * @return A proxy with the new endpoints.
2892      */
ice_endpoints(const::Ice::EndpointSeq & endpoints)2893     IceInternal::ProxyHandle<Prx> ice_endpoints(const ::Ice::EndpointSeq& endpoints) const
2894     {
2895         return dynamic_cast<Prx*>(::IceProxy::Ice::Object::ice_endpoints(endpoints).get());
2896     }
2897 
2898     /**
2899      * Obtains a proxy that is identical to this proxy, except for the locator cache timeout.
2900      * @param timeout The new locator cache timeout (in seconds).
2901      * @return A proxy with the new timeout.
2902      */
ice_locatorCacheTimeout(int timeout)2903     IceInternal::ProxyHandle<Prx> ice_locatorCacheTimeout(int timeout) const
2904     {
2905         return dynamic_cast<Prx*>(::IceProxy::Ice::Object::ice_locatorCacheTimeout(timeout).get());
2906     }
2907 
2908     /**
2909      * Obtains a proxy that is identical to this proxy, except for connection caching.
2910      * @param b True if the new proxy should cache connections, false otherwise.
2911      * @return A proxy with the specified caching policy.
2912      */
ice_connectionCached(bool b)2913     IceInternal::ProxyHandle<Prx> ice_connectionCached(bool b) const
2914     {
2915         return dynamic_cast<Prx*>(::IceProxy::Ice::Object::ice_connectionCached(b).get());
2916     }
2917 
2918     /**
2919      * Obtains a proxy that is identical to this proxy, except for the endpoint selection policy.
2920      * @param type The new endpoint selection policy.
2921      * @return A proxy with the specified endpoint selection policy.
2922      */
ice_endpointSelection(::Ice::EndpointSelectionType type)2923     IceInternal::ProxyHandle<Prx> ice_endpointSelection(::Ice::EndpointSelectionType type) const
2924     {
2925         return dynamic_cast<Prx*>(::IceProxy::Ice::Object::ice_endpointSelection(type).get());
2926     }
2927 
2928     /**
2929      * Obtains a proxy that is identical to this proxy, except for how it selects endpoints.
2930      * @param b If true, only endpoints that use a secure transport are used by the new proxy.
2931      * If false, the returned proxy uses both secure and insecure endpoints.
2932      * @return A proxy with the specified security policy.
2933      */
ice_secure(bool b)2934     IceInternal::ProxyHandle<Prx> ice_secure(bool b) const
2935     {
2936         return dynamic_cast<Prx*>(::IceProxy::Ice::Object::ice_secure(b).get());
2937     }
2938 
2939     /**
2940      * Obtains a proxy that is identical to this proxy, except for its endpoint selection policy.
2941      * @param b If true, the new proxy will use secure endpoints for invocations and only use
2942      * insecure endpoints if an invocation cannot be made via secure endpoints. If false, the
2943      * proxy prefers insecure endpoints to secure ones.
2944      * @return A proxy with the specified selection policy.
2945      */
ice_preferSecure(bool b)2946     IceInternal::ProxyHandle<Prx> ice_preferSecure(bool b) const
2947     {
2948         return dynamic_cast<Prx*>(::IceProxy::Ice::Object::ice_preferSecure(b).get());
2949     }
2950 
2951     /**
2952      * Obtains a proxy that is identical to this proxy, except for the router.
2953      * @param router The router for the new proxy.
2954      * @return A proxy with the specified router.
2955      */
ice_router(const::Ice::RouterPrx & router)2956     IceInternal::ProxyHandle<Prx> ice_router(const ::Ice::RouterPrx& router) const
2957     {
2958         return dynamic_cast<Prx*>(::IceProxy::Ice::Object::ice_router(router).get());
2959     }
2960 
2961     /**
2962      * Obtains a proxy that is identical to this proxy, except for the locator.
2963      * @param locator The locator for the new proxy.
2964      * @return A proxy with the specified locator.
2965      */
ice_locator(const::Ice::LocatorPrx & locator)2966     IceInternal::ProxyHandle<Prx> ice_locator(const ::Ice::LocatorPrx& locator) const
2967     {
2968         return dynamic_cast<Prx*>(::IceProxy::Ice::Object::ice_locator(locator).get());
2969     }
2970 
2971     /**
2972      * Obtains a proxy that is identical to this proxy, except for collocation optimization.
2973      * @param b True if the new proxy enables collocation optimization, false otherwise.
2974      * @return A proxy with the specified collocation optimization.
2975      */
ice_collocationOptimized(bool b)2976     IceInternal::ProxyHandle<Prx> ice_collocationOptimized(bool b) const
2977     {
2978         return dynamic_cast<Prx*>(::IceProxy::Ice::Object::ice_collocationOptimized(b).get());
2979     }
2980 
2981     /**
2982      * Obtains a proxy that is identical to this proxy, except for the invocation timeout.
2983      * @param timeout The new invocation timeout (in milliseconds).
2984      * @return A proxy with the new timeout.
2985      */
ice_invocationTimeout(int timeout)2986     IceInternal::ProxyHandle<Prx> ice_invocationTimeout(int timeout) const
2987     {
2988         return dynamic_cast<Prx*>(::IceProxy::Ice::Object::ice_invocationTimeout(timeout).get());
2989     }
2990 
2991     /**
2992      * Obtains a proxy that is identical to this proxy, but uses twoway invocations.
2993      * @return A proxy that uses twoway invocations.
2994      */
ice_twoway()2995     IceInternal::ProxyHandle<Prx> ice_twoway() const
2996     {
2997         return dynamic_cast<Prx*>(::IceProxy::Ice::Object::ice_twoway().get());
2998     }
2999 
3000     /**
3001      * Obtains a proxy that is identical to this proxy, but uses oneway invocations.
3002      * @return A proxy that uses oneway invocations.
3003      */
ice_oneway()3004     IceInternal::ProxyHandle<Prx> ice_oneway() const
3005     {
3006         return dynamic_cast<Prx*>(::IceProxy::Ice::Object::ice_oneway().get());
3007     }
3008 
3009     /**
3010      * Obtains a proxy that is identical to this proxy, but uses batch oneway invocations.
3011      * @return A proxy that uses batch oneway invocations.
3012      */
ice_batchOneway()3013     IceInternal::ProxyHandle<Prx> ice_batchOneway() const
3014     {
3015         return dynamic_cast<Prx*>(::IceProxy::Ice::Object::ice_batchOneway().get());
3016     }
3017 
3018     /**
3019      * Obtains a proxy that is identical to this proxy, but uses datagram invocations.
3020      * @return A proxy that uses datagram invocations.
3021      */
ice_datagram()3022     IceInternal::ProxyHandle<Prx> ice_datagram() const
3023     {
3024         return dynamic_cast<Prx*>(::IceProxy::Ice::Object::ice_datagram().get());
3025     }
3026 
3027     /**
3028      * Obtains a proxy that is identical to this proxy, but uses batch datagram invocations.
3029      * @return A proxy that uses batch datagram invocations.
3030      */
ice_batchDatagram()3031     IceInternal::ProxyHandle<Prx> ice_batchDatagram() const
3032     {
3033         return dynamic_cast<Prx*>(::IceProxy::Ice::Object::ice_batchDatagram().get());
3034     }
3035 
3036     /**
3037      * Obtains a proxy that is identical to this proxy, except for its compression setting which
3038      * overrides the compression setting from the proxy endpoints.
3039      * @param b True enables compression for the new proxy, false disables compression.
3040      * @return A proxy with the specified compression override setting.
3041      */
ice_compress(bool b)3042     IceInternal::ProxyHandle<Prx> ice_compress(bool b) const
3043     {
3044         return dynamic_cast<Prx*>(::IceProxy::Ice::Object::ice_compress(b).get());
3045     }
3046 
3047     /**
3048      * Obtains a proxy that is identical to this proxy, except for its connection timeout setting
3049      * which overrides the timeot setting from the proxy endpoints.
3050      * @param timeout The connection timeout override for the proxy (in milliseconds).
3051      * @return A proxy with the specified timeout override.
3052      */
ice_timeout(int timeout)3053     IceInternal::ProxyHandle<Prx> ice_timeout(int timeout) const
3054     {
3055         return dynamic_cast<Prx*>(::IceProxy::Ice::Object::ice_timeout(timeout).get());
3056     }
3057 
3058     /**
3059      * Obtains a proxy that is identical to this proxy, except for its connection ID.
3060      * @param id The connection ID for the new proxy. An empty string removes the
3061      * connection ID.
3062      * @return A proxy with the specified connection ID.
3063      */
ice_connectionId(const::std::string & id)3064     IceInternal::ProxyHandle<Prx> ice_connectionId(const ::std::string& id) const
3065     {
3066         return dynamic_cast<Prx*>(::IceProxy::Ice::Object::ice_connectionId(id).get());
3067     }
3068 
3069     /**
3070      * Obtains a proxy that is identical to this proxy, except it's a fixed proxy bound
3071      * the given connection.
3072      * @param connection The fixed proxy connection.
3073      * @return A fixed proxy bound to the given connection.
3074      */
ice_fixed(const::Ice::ConnectionPtr & connection)3075     IceInternal::ProxyHandle<Prx> ice_fixed(const ::Ice::ConnectionPtr& connection) const
3076     {
3077         return dynamic_cast<Prx*>(::IceProxy::Ice::Object::ice_fixed(connection).get());
3078     }
3079 
3080     /**
3081      * Obtains a proxy that is identical to this proxy, except for the encoding used to marshal
3082      * parameters.
3083      * @param version The encoding version to use to marshal request parameters.
3084      * @return A proxy with the specified encoding version.
3085      */
ice_encodingVersion(const::Ice::EncodingVersion & version)3086     IceInternal::ProxyHandle<Prx> ice_encodingVersion(const ::Ice::EncodingVersion& version) const
3087     {
3088         return dynamic_cast<Prx*>(::IceProxy::Ice::Object::ice_encodingVersion(version).get());
3089     }
3090 
3091 protected:
3092 
3093     /// \cond INTERNAL
3094     virtual ::IceProxy::Ice::Object* _newInstance() const = 0;
3095     /// \endcond
3096 };
3097 
3098 /**
3099  * Compares the object identities of two proxies.
3100  * @param lhs A proxy.
3101  * @param rhs A proxy.
3102  * @return True if the identity in lhs compares less than the identity in rhs, false otherwise.
3103  */
3104 ICE_API bool proxyIdentityLess(const ObjectPrx& lhs, const ObjectPrx& rhs);
3105 
3106 /**
3107  * Compares the object identities of two proxies.
3108  * @param lhs A proxy.
3109  * @param rhs A proxy.
3110  * @return True if the identity in lhs compares equal to the identity in rhs, false otherwise.
3111  */
3112 ICE_API bool proxyIdentityEqual(const ObjectPrx& lhs, const ObjectPrx& rhs);
3113 
3114 /**
3115  * Compares the object identities and facets of two proxies.
3116  * @param lhs A proxy.
3117  * @param rhs A proxy.
3118  * @return True if the identity and facet in lhs compare less than the identity and facet
3119  * in rhs, false otherwise.
3120  */
3121 ICE_API bool proxyIdentityAndFacetLess(const ObjectPrx& lhs, const ObjectPrx& rhs);
3122 
3123 /**
3124  * Compares the object identities and facets of two proxies.
3125  * @param lhs A proxy.
3126  * @param rhs A proxy.
3127  * @return True if the identity and facet in lhs compare equal to the identity and facet
3128  * in rhs, false otherwise.
3129  */
3130 ICE_API bool proxyIdentityAndFacetEqual(const ObjectPrx& lhs, const ObjectPrx& rhs);
3131 
3132 /**
3133  * A functor that compares the object identities of two proxies. Evaluates true if the identity in lhs
3134  * compares less than the identity in rhs, false otherwise.
3135  * \headerfile Ice/Ice.h
3136  */
3137 struct ProxyIdentityLess : std::binary_function<bool, ObjectPrx&, ObjectPrx&>
3138 {
operatorProxyIdentityLess3139     bool operator()(const ObjectPrx& lhs, const ObjectPrx& rhs) const
3140     {
3141         return proxyIdentityLess(lhs, rhs);
3142     }
3143 };
3144 
3145 /**
3146  * A functor that compares the object identities of two proxies. Evaluates true if the identity in lhs
3147  * compares equal to the identity in rhs, false otherwise.
3148  * \headerfile Ice/Ice.h
3149  */
3150 struct ProxyIdentityEqual : std::binary_function<bool, ObjectPrx&, ObjectPrx&>
3151 {
operatorProxyIdentityEqual3152     bool operator()(const ObjectPrx& lhs, const ObjectPrx& rhs) const
3153     {
3154         return proxyIdentityEqual(lhs, rhs);
3155     }
3156 };
3157 
3158 /**
3159  * A functor that compares the object identities and facets of two proxies. Evaluates true if the identity
3160  * and facet in lhs compare less than the identity and facet in rhs, false otherwise.
3161  * \headerfile Ice/Ice.h
3162  */
3163 struct ProxyIdentityAndFacetLess : std::binary_function<bool, ObjectPrx&, ObjectPrx&>
3164 {
operatorProxyIdentityAndFacetLess3165     bool operator()(const ObjectPrx& lhs, const ObjectPrx& rhs) const
3166     {
3167         return proxyIdentityAndFacetLess(lhs, rhs);
3168     }
3169 };
3170 
3171 /**
3172  * A functor that compares the object identities and facets of two proxies. Evaluates true if the identity
3173  * and facet in lhs compare equal to the identity and facet in rhs, false otherwise.
3174  * \headerfile Ice/Ice.h
3175  */
3176 struct ProxyIdentityAndFacetEqual : std::binary_function<bool, ObjectPrx&, ObjectPrx&>
3177 {
operatorProxyIdentityAndFacetEqual3178     bool operator()(const ObjectPrx& lhs, const ObjectPrx& rhs) const
3179     {
3180         return proxyIdentityAndFacetEqual(lhs, rhs);
3181     }
3182 };
3183 
3184 }
3185 
3186 namespace IceInternal
3187 {
3188 
3189 //
3190 // Inline comparison functions for proxies
3191 //
3192 template<typename T, typename U>
3193 inline bool operator==(const ProxyHandle<T>& lhs, const ProxyHandle<U>& rhs)
3194 {
3195     ::IceProxy::Ice::Object* l = lhs._upCast();
3196     ::IceProxy::Ice::Object* r = rhs._upCast();
3197     if(l && r)
3198     {
3199         return *l == *r;
3200     }
3201     else
3202     {
3203         return !l && !r;
3204     }
3205 }
3206 
3207 template<typename T, typename U>
3208 inline bool operator!=(const ProxyHandle<T>& lhs, const ProxyHandle<U>& rhs)
3209 {
3210     return !operator==(lhs, rhs);
3211 }
3212 
3213 template<typename T, typename U>
3214 inline bool operator<(const ProxyHandle<T>& lhs, const ProxyHandle<U>& rhs)
3215 {
3216     ::IceProxy::Ice::Object* l = lhs._upCast();
3217     ::IceProxy::Ice::Object* r = rhs._upCast();
3218     if(l && r)
3219     {
3220         return *l < *r;
3221     }
3222     else
3223     {
3224         return !l && r;
3225     }
3226 }
3227 
3228 template<typename T, typename U>
3229 inline bool operator<=(const ProxyHandle<T>& lhs, const ProxyHandle<U>& rhs)
3230 {
3231     return lhs < rhs || lhs == rhs;
3232 }
3233 
3234 template<typename T, typename U>
3235 inline bool operator>(const ProxyHandle<T>& lhs, const ProxyHandle<U>& rhs)
3236 {
3237     return !(lhs < rhs || lhs == rhs);
3238 }
3239 
3240 template<typename T, typename U>
3241 inline bool operator>=(const ProxyHandle<T>& lhs, const ProxyHandle<U>& rhs)
3242 {
3243     return !(lhs < rhs);
3244 }
3245 
3246 //
3247 // checkedCast and uncheckedCast functions without facet:
3248 //
3249 template<typename P> P
checkedCastImpl(const::Ice::ObjectPrx & b,const::Ice::Context & context)3250 checkedCastImpl(const ::Ice::ObjectPrx& b, const ::Ice::Context& context)
3251 {
3252     P d = 0;
3253     if(b.get())
3254     {
3255         typedef typename P::element_type T;
3256 
3257         if(b->ice_isA(T::ice_staticId(), context))
3258         {
3259             d = new T;
3260             d->_copyFrom(b);
3261         }
3262     }
3263     return d;
3264 }
3265 
3266 template<typename P> P
uncheckedCastImpl(const::Ice::ObjectPrx & b)3267 uncheckedCastImpl(const ::Ice::ObjectPrx& b)
3268 {
3269     P d = 0;
3270     if(b)
3271     {
3272         typedef typename P::element_type T;
3273 
3274         d = dynamic_cast<T*>(b.get());
3275         if(!d)
3276         {
3277             d = new T;
3278             d->_copyFrom(b);
3279         }
3280     }
3281     return d;
3282 }
3283 
3284 //
3285 // checkedCast and uncheckedCast with facet:
3286 //
3287 
3288 //
3289 // Helper with type ID.
3290 //
3291 ICE_API ::Ice::ObjectPrx checkedCastImpl(const ::Ice::ObjectPrx&, const std::string&, const std::string&,
3292                                             const ::Ice::Context&);
3293 
3294 //
3295 // Specializations for P = ::Ice::ObjectPrx
3296 // We have to use inline functions for broken compilers such as VC7.
3297 //
3298 
3299 template<> inline ::Ice::ObjectPrx
3300 checkedCastImpl< ::Ice::ObjectPrx>(const ::Ice::ObjectPrx& b, const std::string& f, const ::Ice::Context& context)
3301 {
3302     return checkedCastImpl(b, f, "::Ice::Object", context);
3303 }
3304 
3305 template<> inline ::Ice::ObjectPrx
3306 uncheckedCastImpl< ::Ice::ObjectPrx>(const ::Ice::ObjectPrx& b, const std::string& f)
3307 {
3308     ::Ice::ObjectPrx d = 0;
3309     if(b)
3310     {
3311         d = b->ice_facet(f);
3312     }
3313     return d;
3314 }
3315 
3316 template<typename P> P
checkedCastImpl(const::Ice::ObjectPrx & b,const std::string & f,const::Ice::Context & context)3317 checkedCastImpl(const ::Ice::ObjectPrx& b, const std::string& f, const ::Ice::Context& context)
3318 {
3319     P d = 0;
3320 
3321     typedef typename P::element_type T;
3322     ::Ice::ObjectPrx bb = checkedCastImpl(b, f, T::ice_staticId(), context);
3323 
3324     if(bb)
3325     {
3326         d = new T;
3327         d->_copyFrom(bb);
3328     }
3329     return d;
3330 }
3331 
3332 template<typename P> P
uncheckedCastImpl(const::Ice::ObjectPrx & b,const std::string & f)3333 uncheckedCastImpl(const ::Ice::ObjectPrx& b, const std::string& f)
3334 {
3335     P d = 0;
3336     if(b)
3337     {
3338         typedef typename P::element_type T;
3339 
3340         ::Ice::ObjectPrx bb = b->ice_facet(f);
3341         d = new T;
3342         d->_copyFrom(bb);
3343     }
3344     return d;
3345 }
3346 }
3347 
3348 //
3349 // checkedCast and uncheckedCast functions provided in the Ice namespace
3350 //
3351 namespace Ice
3352 {
3353 
3354 /**
3355  * Downcasts a proxy after confirming the target object's type via a remote invocation.
3356  * @param b The target proxy.
3357  * @param context The context map for the invocation.
3358  * @return A proxy with the requested type, or nil if the target proxy is nil or the target
3359  * object does not support the requested type.
3360  */
3361 template<typename P, typename Y> inline P
3362 checkedCast(const ::IceInternal::ProxyHandle<Y>& b, const ::Ice::Context& context = ::Ice::noExplicitContext)
3363 {
3364     Y* tag = 0;
3365     return ::IceInternal::checkedCastHelper<typename P::element_type>(b, tag, context);
3366 }
3367 
3368 /**
3369  * Downcasts a proxy without confirming the target object's type via a remote invocation.
3370  * @param b The target proxy.
3371  * @return A proxy with the requested type.
3372  */
3373 template<typename P, typename Y> inline P
uncheckedCast(const::IceInternal::ProxyHandle<Y> & b)3374 uncheckedCast(const ::IceInternal::ProxyHandle<Y>& b)
3375 {
3376     Y* tag = 0;
3377     return ::IceInternal::uncheckedCastHelper<typename P::element_type>(b, tag);
3378 }
3379 
3380 /**
3381  * Downcasts a proxy after confirming the target object's type via a remote invocation.
3382  * @param b The target proxy.
3383  * @param f A facet name.
3384  * @param context The context map for the invocation.
3385  * @return A proxy with the requested type and facet, or nil if the target proxy is nil or the target
3386  * object does not support the requested type.
3387  */
3388 template<typename P> inline P
3389 checkedCast(const ::Ice::ObjectPrx& b, const std::string& f, const ::Ice::Context& context = ::Ice::noExplicitContext)
3390 {
3391     return ::IceInternal::checkedCastImpl<P>(b, f, context);
3392 }
3393 
3394 /**
3395  * Downcasts a proxy without confirming the target object's type via a remote invocation.
3396  * @param b The target proxy.
3397  * @param f A facet name.
3398  * @return A proxy with the requested type and facet.
3399  */
3400 template<typename P> inline P
uncheckedCast(const::Ice::ObjectPrx & b,const std::string & f)3401 uncheckedCast(const ::Ice::ObjectPrx& b, const std::string& f)
3402 {
3403     return ::IceInternal::uncheckedCastImpl<P>(b, f);
3404 }
3405 
3406 }
3407 
3408 namespace IceInternal
3409 {
3410 
3411 //
3412 // Base template for operation callbacks.
3413 //
3414 template<class T>
3415 class CallbackNC : public virtual CallbackBase
3416 {
3417 public:
3418 
3419     typedef T callback_type;
3420 
3421     typedef IceUtil::Handle<T> TPtr;
3422 
3423     typedef void (T::*Exception)(const ::Ice::Exception&);
3424     typedef void (T::*Sent)(bool);
3425 
CallbackNC(const TPtr & instance,Exception excb,Sent sentcb)3426     CallbackNC(const TPtr& instance, Exception excb, Sent sentcb) : _callback(instance), _exception(excb), _sent(sentcb)
3427     {
3428     }
3429 
verify(const::Ice::LocalObjectPtr & cookie)3430     virtual CallbackBasePtr verify(const ::Ice::LocalObjectPtr& cookie)
3431     {
3432         if(cookie != 0) // Makes sure begin_ was called without a cookie
3433         {
3434             throw IceUtil::IllegalArgumentException(__FILE__, __LINE__, "cookie specified for callback without cookie");
3435         }
3436         return this;
3437     }
3438 
sent(const::Ice::AsyncResultPtr & result)3439     virtual void sent(const ::Ice::AsyncResultPtr& result) const
3440     {
3441         if(_sent)
3442         {
3443             (_callback.get()->*_sent)(result->sentSynchronously());
3444         }
3445     }
3446 
hasSentCallback()3447     virtual bool hasSentCallback() const
3448     {
3449         return _sent != 0;
3450     }
3451 
3452 protected:
3453 
exception(const::Ice::AsyncResultPtr &,const::Ice::Exception & ex)3454     void exception(const ::Ice::AsyncResultPtr&, const ::Ice::Exception& ex) const
3455     {
3456         if(_exception)
3457         {
3458             (_callback.get()->*_exception)(ex);
3459         }
3460     }
3461 
3462     TPtr _callback;
3463 
3464 private:
3465 
3466     Exception _exception;
3467     Sent _sent;
3468 };
3469 
3470 template<class T, typename CT>
3471 class Callback : public virtual CallbackBase
3472 {
3473 public:
3474 
3475     typedef T callback_type;
3476     typedef CT cookie_type;
3477 
3478     typedef IceUtil::Handle<T> TPtr;
3479 
3480     typedef void (T::*Exception)(const ::Ice::Exception&, const CT&);
3481     typedef void (T::*Sent)(bool, const CT&);
3482 
Callback(const TPtr & instance,Exception excb,Sent sentcb)3483     Callback(const TPtr& instance, Exception excb, Sent sentcb) : _callback(instance), _exception(excb), _sent(sentcb)
3484     {
3485     }
3486 
verify(const::Ice::LocalObjectPtr & cookie)3487     virtual CallbackBasePtr verify(const ::Ice::LocalObjectPtr& cookie)
3488     {
3489         if(cookie && !CT::dynamicCast(cookie))
3490         {
3491             throw IceUtil::IllegalArgumentException(__FILE__, __LINE__, "unexpected cookie type");
3492         }
3493         return this;
3494     }
3495 
sent(const::Ice::AsyncResultPtr & result)3496     virtual void sent(const ::Ice::AsyncResultPtr& result) const
3497     {
3498         if(_sent)
3499         {
3500             (_callback.get()->*_sent)(result->sentSynchronously(), CT::dynamicCast(result->getCookie()));
3501         }
3502     }
3503 
hasSentCallback()3504     virtual bool hasSentCallback() const
3505     {
3506         return _sent != 0;
3507     }
3508 
3509 protected:
3510 
exception(const::Ice::AsyncResultPtr & result,const::Ice::Exception & ex)3511     void exception(const ::Ice::AsyncResultPtr& result, const ::Ice::Exception& ex) const
3512     {
3513         if(_exception)
3514         {
3515             (_callback.get()->*_exception)(ex, CT::dynamicCast(result->getCookie()));
3516         }
3517     }
3518 
3519     TPtr _callback;
3520 
3521 private:
3522 
3523     Exception _exception;
3524     Sent _sent;
3525 };
3526 
3527 //
3528 // Base class for twoway operation callbacks.
3529 //
3530 template<class T>
3531 class TwowayCallbackNC : public CallbackNC<T>
3532 {
3533 public:
3534 
3535     typedef IceUtil::Handle<T> TPtr;
3536 
3537     typedef void (T::*Exception)(const ::Ice::Exception&);
3538     typedef void (T::*Sent)(bool);
3539 
TwowayCallbackNC(const TPtr & instance,bool cb,Exception excb,Sent sentcb)3540     TwowayCallbackNC(const TPtr& instance, bool cb, Exception excb, Sent sentcb) : CallbackNC<T>(instance, excb, sentcb)
3541     {
3542         CallbackBase::checkCallback(instance, cb || excb != 0);
3543     }
3544 };
3545 
3546 template<class T, typename CT>
3547 class TwowayCallback : public Callback<T, CT>
3548 {
3549 public:
3550 
3551     typedef IceUtil::Handle<T> TPtr;
3552 
3553     typedef void (T::*Exception)(const ::Ice::Exception&, const CT&);
3554     typedef void (T::*Sent)(bool, const CT&);
3555 
TwowayCallback(const TPtr & instance,bool cb,Exception excb,Sent sentcb)3556     TwowayCallback(const TPtr& instance, bool cb, Exception excb, Sent sentcb) : Callback<T, CT>(instance, excb, sentcb)
3557     {
3558         CallbackBase::checkCallback(instance, cb || excb != 0);
3559     }
3560 };
3561 
3562 //
3563 // Base template class for oneway operations callbacks.
3564 //
3565 template<class T>
3566 class OnewayCallbackNC : public CallbackNC<T>
3567 {
3568 public:
3569 
3570     typedef IceUtil::Handle<T> TPtr;
3571 
3572     typedef void (T::*Exception)(const ::Ice::Exception&);
3573     typedef void (T::*Sent)(bool);
3574     typedef void (T::*Response)();
3575 
OnewayCallbackNC(const TPtr & instance,Response cb,Exception excb,Sent sentcb)3576     OnewayCallbackNC(const TPtr& instance, Response cb, Exception excb, Sent sentcb) :
3577         CallbackNC<T>(instance, excb, sentcb), _response(cb)
3578     {
3579         CallbackBase::checkCallback(instance, cb != 0 || excb != 0);
3580     }
3581 
completed(const::Ice::AsyncResultPtr & result)3582     virtual void completed(const ::Ice::AsyncResultPtr& result) const
3583     {
3584         try
3585         {
3586             result->getProxy()->_end(result, result->getOperation());
3587         }
3588         catch(const ::Ice::Exception& ex)
3589         {
3590             CallbackNC<T>::exception(result, ex);
3591             return;
3592         }
3593         if(_response)
3594         {
3595             (CallbackNC<T>::_callback.get()->*_response)();
3596         }
3597     }
3598 
3599 private:
3600 
3601     Response _response;
3602 };
3603 
3604 template<class T, typename CT>
3605 class OnewayCallback : public Callback<T, CT>
3606 {
3607 public:
3608 
3609     typedef IceUtil::Handle<T> TPtr;
3610 
3611     typedef void (T::*Exception)(const ::Ice::Exception&, const CT&);
3612     typedef void (T::*Sent)(bool, const CT&);
3613     typedef void (T::*Response)(const CT&);
3614 
OnewayCallback(const TPtr & instance,Response cb,Exception excb,Sent sentcb)3615     OnewayCallback(const TPtr& instance, Response cb, Exception excb, Sent sentcb) :
3616         Callback<T, CT>(instance, excb, sentcb), _response(cb)
3617     {
3618         CallbackBase::checkCallback(instance, cb != 0 || excb != 0);
3619     }
3620 
completed(const::Ice::AsyncResultPtr & result)3621     virtual void completed(const ::Ice::AsyncResultPtr& result) const
3622     {
3623         try
3624         {
3625             result->getProxy()->_end(result, result->getOperation());
3626         }
3627         catch(const ::Ice::Exception& ex)
3628         {
3629             Callback<T, CT>::exception(result, ex);
3630             return;
3631         }
3632         if(_response)
3633         {
3634             (Callback<T, CT>::_callback.get()->*_response)(CT::dynamicCast(result->getCookie()));
3635         }
3636     }
3637 
3638 private:
3639 
3640     Response _response;
3641 };
3642 
3643 }
3644 
3645 namespace Ice
3646 {
3647 
3648 /**
3649  * Type-safe asynchronous callback wrapper class used for calls to
3650  * IceProxy::Ice::Object::begin_ice_isA.
3651  * Create a wrapper instance by calling ::Ice::newCallback_Object_ice_isA.
3652  * \headerfile Ice/Ice.h
3653  */
3654 template<class T>
3655 class CallbackNC_Object_ice_isA : public Callback_Object_ice_isA_Base, public ::IceInternal::TwowayCallbackNC<T>
3656 {
3657 public:
3658 
3659     typedef IceUtil::Handle<T> TPtr;
3660 
3661     typedef void (T::*Exception)(const ::Ice::Exception&);
3662     typedef void (T::*Sent)(bool);
3663     typedef void (T::*Response)(bool);
3664 
CallbackNC_Object_ice_isA(const TPtr & instance,Response cb,Exception excb,Sent sentcb)3665     CallbackNC_Object_ice_isA(const TPtr& instance, Response cb, Exception excb, Sent sentcb) :
3666         ::IceInternal::TwowayCallbackNC<T>(instance, cb != 0, excb, sentcb), _response(cb)
3667     {
3668     }
3669 
3670     /// \cond INTERNAL
completed(const::Ice::AsyncResultPtr & result)3671     virtual void completed(const ::Ice::AsyncResultPtr& result) const
3672     {
3673         bool ret;
3674         try
3675         {
3676             ret = result->getProxy()->end_ice_isA(result);
3677         }
3678         catch(const ::Ice::Exception& ex)
3679         {
3680             ::IceInternal::CallbackNC<T>::exception(result, ex);
3681             return;
3682         }
3683         if(_response)
3684         {
3685             (::IceInternal::CallbackNC<T>::_callback.get()->*_response)(ret);
3686         }
3687     }
3688     /// \endcond
3689 
3690 private:
3691 
3692     Response _response;
3693 };
3694 
3695 /**
3696  * Type-safe asynchronous callback wrapper class with cookie support used for calls to
3697  * IceProxy::Ice::Object::begin_ice_isA.
3698  * Create a wrapper instance by calling ::Ice::newCallback_Object_ice_isA.
3699  * \headerfile Ice/Ice.h
3700  */
3701 template<class T, typename CT>
3702 class Callback_Object_ice_isA : public Callback_Object_ice_isA_Base, public ::IceInternal::TwowayCallback<T, CT>
3703 {
3704 public:
3705 
3706     typedef IceUtil::Handle<T> TPtr;
3707 
3708     typedef void (T::*Exception)(const ::Ice::Exception&, const CT&);
3709     typedef void (T::*Sent)(bool, const CT&);
3710     typedef void (T::*Response)(bool, const CT&);
3711 
Callback_Object_ice_isA(const TPtr & instance,Response cb,Exception excb,Sent sentcb)3712     Callback_Object_ice_isA(const TPtr& instance, Response cb, Exception excb, Sent sentcb) :
3713         ::IceInternal::TwowayCallback<T, CT>(instance, cb != 0, excb, sentcb), _response(cb)
3714     {
3715     }
3716 
3717     /// \cond INTERNAL
completed(const::Ice::AsyncResultPtr & result)3718     virtual void completed(const ::Ice::AsyncResultPtr& result) const
3719     {
3720         bool ret;
3721         try
3722         {
3723             ret = result->getProxy()->end_ice_isA(result);
3724         }
3725         catch(const ::Ice::Exception& ex)
3726         {
3727             ::IceInternal::Callback<T, CT>::exception(result, ex);
3728             return;
3729         }
3730         if(_response)
3731         {
3732             (::IceInternal::Callback<T, CT>::_callback.get()->*_response)(ret,
3733                                                                           CT::dynamicCast(result->getCookie()));
3734         }
3735     }
3736     /// \endcond
3737 
3738 private:
3739 
3740     Response _response;
3741 };
3742 
3743 /**
3744  * Type-safe asynchronous callback wrapper class used for calls to
3745  * IceProxy::Ice::Object::begin_ice_ping.
3746  * Create a wrapper instance by calling ::Ice::newCallback_Object_ice_ping.
3747  * \headerfile Ice/Ice.h
3748  */
3749 template<class T>
3750 class CallbackNC_Object_ice_ping : public Callback_Object_ice_ping_Base, public ::IceInternal::OnewayCallbackNC<T>
3751 {
3752 public:
3753 
3754     typedef IceUtil::Handle<T> TPtr;
3755 
3756     typedef void (T::*Exception)(const ::Ice::Exception&);
3757     typedef void (T::*Sent)(bool);
3758     typedef void (T::*Response)();
3759 
CallbackNC_Object_ice_ping(const TPtr & instance,Response cb,Exception excb,Sent sentcb)3760     CallbackNC_Object_ice_ping(const TPtr& instance, Response cb, Exception excb, Sent sentcb) :
3761         ::IceInternal::OnewayCallbackNC<T>(instance, cb, excb, sentcb)
3762     {
3763     }
3764 };
3765 
3766 /**
3767  * Type-safe asynchronous callback wrapper class with cookie support used for calls to
3768  * IceProxy::Ice::Object::begin_ice_ping.
3769  * Create a wrapper instance by calling ::Ice::newCallback_Object_ice_ping.
3770  * \headerfile Ice/Ice.h
3771  */
3772 template<class T, typename CT>
3773 class Callback_Object_ice_ping : public Callback_Object_ice_ping_Base, public ::IceInternal::OnewayCallback<T, CT>
3774 {
3775 public:
3776 
3777     typedef IceUtil::Handle<T> TPtr;
3778 
3779     typedef void (T::*Exception)(const ::Ice::Exception&, const CT&);
3780     typedef void (T::*Sent)(bool, const CT&);
3781     typedef void (T::*Response)(const CT&);
3782 
Callback_Object_ice_ping(const TPtr & instance,Response cb,Exception excb,Sent sentcb)3783     Callback_Object_ice_ping(const TPtr& instance, Response cb, Exception excb, Sent sentcb) :
3784         ::IceInternal::OnewayCallback<T, CT>(instance, cb, excb, sentcb)
3785     {
3786     }
3787 };
3788 
3789 /**
3790  * Type-safe asynchronous callback wrapper class used for calls to
3791  * IceProxy::Ice::Object::begin_ice_ids.
3792  * Create a wrapper instance by calling ::Ice::newCallback_Object_ice_ids.
3793  * \headerfile Ice/Ice.h
3794  */
3795 template<class T>
3796 class CallbackNC_Object_ice_ids : public Callback_Object_ice_ids_Base, public ::IceInternal::TwowayCallbackNC<T>
3797 {
3798 public:
3799 
3800     typedef IceUtil::Handle<T> TPtr;
3801 
3802     typedef void (T::*Exception)(const ::Ice::Exception&);
3803     typedef void (T::*Sent)(bool);
3804     typedef void (T::*Response)(const ::std::vector< ::std::string>&);
3805 
CallbackNC_Object_ice_ids(const TPtr & instance,Response cb,Exception excb,Sent sentcb)3806     CallbackNC_Object_ice_ids(const TPtr& instance, Response cb, Exception excb, Sent sentcb) :
3807         ::IceInternal::TwowayCallbackNC<T>(instance, cb != 0, excb, sentcb), _response(cb)
3808     {
3809     }
3810 
3811     /// \cond INTERNAL
completed(const::Ice::AsyncResultPtr & result)3812     virtual void completed(const ::Ice::AsyncResultPtr& result) const
3813     {
3814         ::std::vector< ::std::string> ret;
3815         try
3816         {
3817             ret = result->getProxy()->end_ice_ids(result);
3818         }
3819         catch(const ::Ice::Exception& ex)
3820         {
3821             ::IceInternal::CallbackNC<T>::exception(result, ex);
3822             return;
3823         }
3824         if(_response)
3825         {
3826             (::IceInternal::CallbackNC<T>::_callback.get()->*_response)(ret);
3827         }
3828     }
3829     /// \endcond
3830 
3831 private:
3832 
3833     Response _response;
3834 };
3835 
3836 /**
3837  * Type-safe asynchronous callback wrapper class with cookie support used for calls to
3838  * IceProxy::Ice::Object::begin_ice_ids.
3839  * Create a wrapper instance by calling ::Ice::newCallback_Object_ice_ids.
3840  * \headerfile Ice/Ice.h
3841  */
3842 template<class T, typename CT>
3843 class Callback_Object_ice_ids : public Callback_Object_ice_ids_Base, public ::IceInternal::TwowayCallback<T, CT>
3844 {
3845 public:
3846 
3847     typedef IceUtil::Handle<T> TPtr;
3848 
3849     typedef void (T::*Exception)(const ::Ice::Exception&, const CT&);
3850     typedef void (T::*Sent)(bool, const CT&);
3851     typedef void (T::*Response)(const ::std::vector< ::std::string>&, const CT&);
3852 
Callback_Object_ice_ids(const TPtr & instance,Response cb,Exception excb,Sent sentcb)3853     Callback_Object_ice_ids(const TPtr& instance, Response cb, Exception excb, Sent sentcb) :
3854         ::IceInternal::TwowayCallback<T, CT>(instance, cb != 0, excb, sentcb), _response(cb)
3855     {
3856     }
3857 
3858     /// \cond INTERNAL
completed(const::Ice::AsyncResultPtr & result)3859     virtual void completed(const ::Ice::AsyncResultPtr& result) const
3860     {
3861         ::std::vector< ::std::string> ret;
3862         try
3863         {
3864             ret = result->getProxy()->end_ice_ids(result);
3865         }
3866         catch(const ::Ice::Exception& ex)
3867         {
3868             ::IceInternal::Callback<T, CT>::exception(result, ex);
3869             return;
3870         }
3871         if(_response)
3872         {
3873             (::IceInternal::Callback<T, CT>::_callback.get()->*_response)(ret,
3874                                                                           CT::dynamicCast(result->getCookie()));
3875         }
3876     }
3877     /// \endcond
3878 
3879 private:
3880 
3881     Response _response;
3882 };
3883 
3884 /**
3885  * Type-safe asynchronous callback wrapper class used for calls to
3886  * IceProxy::Ice::Object::begin_ice_id.
3887  * Create a wrapper instance by calling ::Ice::newCallback_Object_ice_id.
3888  * \headerfile Ice/Ice.h
3889  */
3890 template<class T>
3891 class CallbackNC_Object_ice_id : public Callback_Object_ice_id_Base, public ::IceInternal::TwowayCallbackNC<T>
3892 {
3893 public:
3894 
3895     typedef IceUtil::Handle<T> TPtr;
3896 
3897     typedef void (T::*Exception)(const ::Ice::Exception&);
3898     typedef void (T::*Sent)(bool);
3899     typedef void (T::*Response)(const ::std::string&);
3900 
CallbackNC_Object_ice_id(const TPtr & instance,Response cb,Exception excb,Sent sentcb)3901     CallbackNC_Object_ice_id(const TPtr& instance, Response cb, Exception excb, Sent sentcb) :
3902         ::IceInternal::TwowayCallbackNC<T>(instance, cb != 0, excb, sentcb), _response(cb)
3903     {
3904     }
3905 
3906     /// \cond INTERNAL
completed(const::Ice::AsyncResultPtr & result)3907     virtual void completed(const ::Ice::AsyncResultPtr& result) const
3908     {
3909         ::std::string ret;
3910         try
3911         {
3912             ret = result->getProxy()->end_ice_id(result);
3913         }
3914         catch(const ::Ice::Exception& ex)
3915         {
3916             ::IceInternal::CallbackNC<T>::exception(result, ex);
3917             return;
3918         }
3919         if(_response)
3920         {
3921             (::IceInternal::CallbackNC<T>::_callback.get()->*_response)(ret);
3922         }
3923     }
3924     /// \endcond
3925 
3926 private:
3927 
3928     Response _response;
3929 };
3930 
3931 /**
3932  * Type-safe asynchronous callback wrapper class with cookie support used for calls to
3933  * IceProxy::Ice::Object::begin_ice_id.
3934  * Create a wrapper instance by calling ::Ice::newCallback_Object_ice_id.
3935  * \headerfile Ice/Ice.h
3936  */
3937 template<class T, typename CT>
3938 class Callback_Object_ice_id : public Callback_Object_ice_id_Base, public ::IceInternal::TwowayCallback<T, CT>
3939 {
3940 public:
3941 
3942     typedef IceUtil::Handle<T> TPtr;
3943 
3944     typedef void (T::*Exception)(const ::Ice::Exception&, const CT&);
3945     typedef void (T::*Sent)(bool, const CT&);
3946     typedef void (T::*Response)(const ::std::string&, const CT&);
3947 
Callback_Object_ice_id(const TPtr & instance,Response cb,Exception excb,Sent sentcb)3948     Callback_Object_ice_id(const TPtr& instance, Response cb, Exception excb, Sent sentcb) :
3949         ::IceInternal::TwowayCallback<T, CT>(instance, cb != 0, excb, sentcb), _response(cb)
3950     {
3951     }
3952 
3953     /// \cond INTERNAL
completed(const::Ice::AsyncResultPtr & result)3954     virtual void completed(const ::Ice::AsyncResultPtr& result) const
3955     {
3956         ::std::string ret;
3957         try
3958         {
3959             ret = result->getProxy()->end_ice_id(result);
3960         }
3961         catch(const ::Ice::Exception& ex)
3962         {
3963             ::IceInternal::Callback<T, CT>::exception(result, ex);
3964             return;
3965         }
3966         if(_response)
3967         {
3968             (::IceInternal::Callback<T, CT>::_callback.get()->*_response)(ret,
3969                                                                           CT::dynamicCast(result->getCookie()));
3970         }
3971     }
3972     /// \endcond
3973 
3974 private:
3975 
3976     Response _response;
3977 };
3978 
3979 /**
3980  * Type-safe asynchronous callback wrapper class used for calls to
3981  * IceProxy::Ice::Object::begin_ice_invoke.
3982  * Create a wrapper instance by calling ::Ice::newCallback_Object_ice_invoke.
3983  * \headerfile Ice/Ice.h
3984  */
3985 template<class T>
3986 class CallbackNC_Object_ice_invoke : public Callback_Object_ice_invoke_Base, public ::IceInternal::TwowayCallbackNC<T>
3987 {
3988 public:
3989 
3990     typedef IceUtil::Handle<T> TPtr;
3991 
3992     typedef void (T::*Exception)(const ::Ice::Exception&);
3993     typedef void (T::*Sent)(bool);
3994     typedef void (T::*Response)(bool, const std::vector< ::Ice::Byte>&);
3995     typedef void (T::*ResponseArray)(bool, const std::pair<const ::Ice::Byte*, const ::Ice::Byte*>&);
3996 
CallbackNC_Object_ice_invoke(const TPtr & instance,Response cb,Exception excb,Sent sentcb)3997     CallbackNC_Object_ice_invoke(const TPtr& instance, Response cb, Exception excb, Sent sentcb) :
3998         ::IceInternal::TwowayCallbackNC<T>(instance, cb != 0, excb, sentcb), _response(cb), _responseArray(0)
3999     {
4000     }
4001 
CallbackNC_Object_ice_invoke(const TPtr & instance,ResponseArray cb,Exception excb,Sent sentcb)4002     CallbackNC_Object_ice_invoke(const TPtr& instance, ResponseArray cb, Exception excb, Sent sentcb) :
4003         ::IceInternal::TwowayCallbackNC<T>(instance, cb != 0, excb, sentcb), _response(0), _responseArray(cb)
4004     {
4005     }
4006 
4007     /// \cond INTERNAL
completed(const::Ice::AsyncResultPtr & result)4008     virtual void completed(const ::Ice::AsyncResultPtr& result) const
4009     {
4010         if(_response)
4011         {
4012             bool ok;
4013             std::vector< ::Ice::Byte> outParams;
4014             try
4015             {
4016                 ok = result->getProxy()->end_ice_invoke(outParams, result);
4017             }
4018             catch(const ::Ice::Exception& ex)
4019             {
4020                 ::IceInternal::CallbackNC<T>::exception(result, ex);
4021                 return;
4022             }
4023             (::IceInternal::CallbackNC<T>::_callback.get()->*_response)(ok, outParams);
4024         }
4025         else
4026         {
4027             bool ok;
4028             std::pair<const ::Ice::Byte*, const::Ice::Byte*> outParams;
4029             try
4030             {
4031                 ok = result->getProxy()->_iceI_end_ice_invoke(outParams, result);
4032             }
4033             catch(const ::Ice::Exception& ex)
4034             {
4035                 ::IceInternal::CallbackNC<T>::exception(result, ex);
4036                 return;
4037             }
4038             if(_responseArray)
4039             {
4040                 (::IceInternal::CallbackNC<T>::_callback.get()->*_responseArray)(ok, outParams);
4041             }
4042         }
4043     }
4044     /// \endcond
4045 
4046 private:
4047 
4048     Response _response;
4049     ResponseArray _responseArray;
4050 };
4051 
4052 /**
4053  * Type-safe asynchronous callback wrapper class with cookie support used for calls to
4054  * IceProxy::Ice::Object::begin_ice_invoke.
4055  * Create a wrapper instance by calling ::Ice::newCallback_Object_ice_invoke.
4056  * \headerfile Ice/Ice.h
4057  */
4058 template<class T, typename CT>
4059 class Callback_Object_ice_invoke : public Callback_Object_ice_invoke_Base, public ::IceInternal::TwowayCallback<T, CT>
4060 {
4061 public:
4062 
4063     typedef IceUtil::Handle<T> TPtr;
4064 
4065     typedef void (T::*Exception)(const ::Ice::Exception&, const CT&);
4066     typedef void (T::*Sent)(bool, const CT&);
4067     typedef void (T::*Response)(bool, const std::vector< ::Ice::Byte>&, const CT&);
4068     typedef void (T::*ResponseArray)(bool, const std::pair<const ::Ice::Byte*, const ::Ice::Byte*>&, const CT&);
4069 
Callback_Object_ice_invoke(const TPtr & instance,Response cb,Exception excb,Sent sentcb)4070     Callback_Object_ice_invoke(const TPtr& instance, Response cb, Exception excb, Sent sentcb) :
4071         ::IceInternal::TwowayCallback<T, CT>(instance, cb != 0, excb, sentcb), _response(cb), _responseArray(0)
4072     {
4073     }
4074 
Callback_Object_ice_invoke(const TPtr & instance,ResponseArray cb,Exception excb,Sent sentcb)4075     Callback_Object_ice_invoke(const TPtr& instance, ResponseArray cb, Exception excb, Sent sentcb) :
4076         ::IceInternal::TwowayCallback<T, CT>(instance, cb != 0, excb, sentcb), _response(0), _responseArray(cb)
4077     {
4078     }
4079 
4080     /// \cond INTERNAL
completed(const::Ice::AsyncResultPtr & result)4081     virtual void completed(const ::Ice::AsyncResultPtr& result) const
4082     {
4083         if(_response)
4084         {
4085             bool ok;
4086             std::vector< ::Ice::Byte> outParams;
4087             try
4088             {
4089                 ok = result->getProxy()->end_ice_invoke(outParams, result);
4090             }
4091             catch(const ::Ice::Exception& ex)
4092             {
4093                 ::IceInternal::Callback<T, CT>::exception(result, ex);
4094                 return;
4095             }
4096             (::IceInternal::Callback<T, CT>::_callback.get()->*_response)(ok,
4097                                                                           outParams,
4098                                                                           CT::dynamicCast(result->getCookie()));
4099         }
4100         else
4101         {
4102             bool ok;
4103             std::pair<const ::Ice::Byte*, const::Ice::Byte*> outParams;
4104             try
4105             {
4106                 ok = result->getProxy()->_iceI_end_ice_invoke(outParams, result);
4107             }
4108             catch(const ::Ice::Exception& ex)
4109             {
4110                 ::IceInternal::Callback<T, CT>::exception(result, ex);
4111                 return;
4112             }
4113             if(_responseArray)
4114             {
4115                 (::IceInternal::Callback<T, CT>::_callback.get()->*_responseArray)(ok,
4116                                                                                    outParams,
4117                                                                                    CT::dynamicCast(
4118                                                                                        result->getCookie()));
4119             }
4120         }
4121     }
4122     /// \endcond
4123 
4124 private:
4125 
4126     Response _response;
4127     ResponseArray _responseArray;
4128 };
4129 
4130 /**
4131  * Type-safe asynchronous callback wrapper class used for calls to
4132  * IceProxy::Ice::Object::begin_ice_getConnection.
4133  * Create a wrapper instance by calling ::Ice::newCallback_Object_ice_getConnection.
4134  * \headerfile Ice/Ice.h
4135  */
4136 template<class T>
4137 class CallbackNC_Object_ice_getConnection : public Callback_Object_ice_getConnection_Base,
4138                                             public ::IceInternal::CallbackNC<T>
4139 {
4140 public:
4141 
4142     typedef IceUtil::Handle<T> TPtr;
4143 
4144     typedef void (T::*Response)(const ::Ice::ConnectionPtr&);
4145     typedef void (T::*Exception)(const ::Ice::Exception&);
4146     typedef void (T::*Sent)(bool);
4147 
CallbackNC_Object_ice_getConnection(const TPtr & instance,Response cb,Exception excb,Sent sentcb)4148     CallbackNC_Object_ice_getConnection(const TPtr& instance, Response cb, Exception excb, Sent sentcb) :
4149         ::IceInternal::CallbackNC<T>(instance, excb, sentcb), _response(cb)
4150     {
4151     }
4152 
4153     /// \cond INTERNAL
completed(const::Ice::AsyncResultPtr & result)4154     virtual void completed(const ::Ice::AsyncResultPtr& result) const
4155     {
4156         ::Ice::ConnectionPtr ret;
4157         try
4158         {
4159             ret = result->getProxy()->end_ice_getConnection(result);
4160         }
4161         catch(const ::Ice::Exception& ex)
4162         {
4163             ::IceInternal::CallbackNC<T>::exception(result, ex);
4164             return;
4165         }
4166         if(_response)
4167         {
4168             (::IceInternal::CallbackNC<T>::_callback.get()->*_response)(ret);
4169         }
4170     }
4171     /// \endcond
4172 
4173 private:
4174 
4175     Response _response;
4176 };
4177 
4178 /**
4179  * Type-safe asynchronous callback wrapper class with cookie support used for calls to
4180  * IceProxy::Ice::Object::begin_ice_getConnection.
4181  * Create a wrapper instance by calling ::Ice::newCallback_Object_ice_getConnection.
4182  * \headerfile Ice/Ice.h
4183  */
4184 template<class T, typename CT>
4185 class Callback_Object_ice_getConnection : public Callback_Object_ice_getConnection_Base,
4186                                           public ::IceInternal::Callback<T, CT>
4187 {
4188 public:
4189 
4190     typedef IceUtil::Handle<T> TPtr;
4191 
4192     typedef void (T::*Response)(const ::Ice::ConnectionPtr&, const CT&);
4193     typedef void (T::*Exception)(const ::Ice::Exception&, const CT&);
4194     typedef void (T::*Sent)(bool, const CT&);
4195 
Callback_Object_ice_getConnection(const TPtr & instance,Response cb,Exception excb,Sent sentcb)4196     Callback_Object_ice_getConnection(const TPtr& instance, Response cb, Exception excb, Sent sentcb) :
4197         ::IceInternal::Callback<T, CT>(instance, excb, sentcb), _response(cb)
4198     {
4199     }
4200 
4201     /// \cond INTERNAL
completed(const::Ice::AsyncResultPtr & result)4202     virtual void completed(const ::Ice::AsyncResultPtr& result) const
4203     {
4204         ::Ice::ConnectionPtr ret;
4205         try
4206         {
4207             ret = result->getProxy()->end_ice_getConnection(result);
4208         }
4209         catch(const ::Ice::Exception& ex)
4210         {
4211             ::IceInternal::Callback<T, CT>::exception(result, ex);
4212             return;
4213         }
4214         if(_response)
4215         {
4216             (::IceInternal::Callback<T, CT>::_callback.get()->*_response)(ret,
4217                                                                           CT::dynamicCast(result->getCookie()));
4218         }
4219     }
4220     /// \endcond
4221 
4222 private:
4223 
4224     Response _response;
4225 };
4226 
4227 /**
4228  * Type-safe asynchronous callback wrapper class used for calls to
4229  * IceProxy::Ice::Object::begin_ice_flushBatchRequests.
4230  * Create a wrapper instance by calling ::Ice::newCallback_Object_ice_flushBatchRequests.
4231  * \headerfile Ice/Ice.h
4232  */
4233 template<class T>
4234 class CallbackNC_Object_ice_flushBatchRequests : public Callback_Object_ice_flushBatchRequests_Base,
4235                                                  public ::IceInternal::OnewayCallbackNC<T>
4236 {
4237 public:
4238 
4239     typedef IceUtil::Handle<T> TPtr;
4240 
4241     typedef void (T::*Exception)(const ::Ice::Exception&);
4242     typedef void (T::*Sent)(bool);
4243 
CallbackNC_Object_ice_flushBatchRequests(const TPtr & instance,Exception excb,Sent sentcb)4244     CallbackNC_Object_ice_flushBatchRequests(const TPtr& instance, Exception excb, Sent sentcb) :
4245         ::IceInternal::OnewayCallbackNC<T>(instance, 0, excb, sentcb)
4246     {
4247     }
4248 };
4249 
4250 /**
4251  * Type-safe asynchronous callback wrapper class with cookie support used for calls to
4252  * IceProxy::Ice::Object::begin_ice_flushBatchRequests.
4253  * Create a wrapper instance by calling ::Ice::newCallback_Object_ice_flushBatchRequests.
4254  * \headerfile Ice/Ice.h
4255  */
4256 template<class T, typename CT>
4257 class Callback_Object_ice_flushBatchRequests : public Callback_Object_ice_flushBatchRequests_Base,
4258                                                public ::IceInternal::OnewayCallback<T, CT>
4259 {
4260 public:
4261 
4262     typedef IceUtil::Handle<T> TPtr;
4263 
4264     typedef void (T::*Exception)(const ::Ice::Exception&, const CT&);
4265     typedef void (T::*Sent)(bool, const CT&);
4266 
Callback_Object_ice_flushBatchRequests(const TPtr & instance,Exception excb,Sent sentcb)4267     Callback_Object_ice_flushBatchRequests(const TPtr& instance, Exception excb, Sent sentcb) :
4268         ::IceInternal::OnewayCallback<T, CT>(instance, 0, excb, sentcb)
4269     {
4270     }
4271 };
4272 
4273 /**
4274  * Creates a callback wrapper instance that delegates to your object.
4275  * @param instance The callback object.
4276  * @param cb The success method of the callback object.
4277  * @param excb The exception method of the callback object.
4278  * @param sentcb The sent method of the callback object.
4279  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_isA.
4280  */
4281 template<class T> Callback_Object_ice_isAPtr
4282 newCallback_Object_ice_isA(const IceUtil::Handle<T>& instance,
4283                            void (T::*cb)(bool),
4284                            void (T::*excb)(const ::Ice::Exception&),
4285                            void (T::*sentcb)(bool) = 0)
4286 {
4287     return new CallbackNC_Object_ice_isA<T>(instance, cb, excb, sentcb);
4288 }
4289 
4290 /**
4291  * Creates a callback wrapper instance that delegates to your object.
4292  * @param instance The callback object.
4293  * @param cb The success method of the callback object.
4294  * @param excb The exception method of the callback object.
4295  * @param sentcb The sent method of the callback object.
4296  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_isA.
4297  */
4298 template<class T, typename CT> Callback_Object_ice_isAPtr
4299 newCallback_Object_ice_isA(const IceUtil::Handle<T>& instance,
4300                            void (T::*cb)(bool, const CT&),
4301                            void (T::*excb)(const ::Ice::Exception&, const CT&),
4302                            void (T::*sentcb)(bool, const CT&) = 0)
4303 {
4304     return new Callback_Object_ice_isA<T, CT>(instance, cb, excb, sentcb);
4305 }
4306 
4307 /**
4308  * Creates a callback wrapper instance that delegates to your object.
4309  * @param instance The callback object.
4310  * @param excb The exception method of the callback object.
4311  * @param sentcb The sent method of the callback object.
4312  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_isA.
4313  */
4314 template<class T> Callback_Object_ice_isAPtr
4315 newCallback_Object_ice_isA(const IceUtil::Handle<T>& instance,
4316                            void (T::*excb)(const ::Ice::Exception&),
4317                            void (T::*sentcb)(bool) = 0)
4318 {
4319     return new CallbackNC_Object_ice_isA<T>(instance, 0, excb, sentcb);
4320 }
4321 
4322 /**
4323  * Creates a callback wrapper instance that delegates to your object.
4324  * @param instance The callback object.
4325  * @param excb The exception method of the callback object.
4326  * @param sentcb The sent method of the callback object.
4327  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_isA.
4328  */
4329 template<class T, typename CT> Callback_Object_ice_isAPtr
4330 newCallback_Object_ice_isA(const IceUtil::Handle<T>& instance,
4331                            void (T::*excb)(const ::Ice::Exception&, const CT&),
4332                            void (T::*sentcb)(bool, const CT&) = 0)
4333 {
4334     return new Callback_Object_ice_isA<T, CT>(instance, 0, excb, sentcb);
4335 }
4336 
4337 /**
4338  * Creates a callback wrapper instance that delegates to your object.
4339  * @param instance The callback object.
4340  * @param cb The success method of the callback object.
4341  * @param excb The exception method of the callback object.
4342  * @param sentcb The sent method of the callback object.
4343  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_isA.
4344  */
4345 template<class T> Callback_Object_ice_isAPtr
4346 newCallback_Object_ice_isA(T* instance,
4347                            void (T::*cb)(bool),
4348                            void (T::*excb)(const ::Ice::Exception&),
4349                            void (T::*sentcb)(bool) = 0)
4350 {
4351     return new CallbackNC_Object_ice_isA<T>(instance, cb, excb, sentcb);
4352 }
4353 
4354 /**
4355  * Creates a callback wrapper instance that delegates to your object.
4356  * @param instance The callback object.
4357  * @param cb The success method of the callback object.
4358  * @param excb The exception method of the callback object.
4359  * @param sentcb The sent method of the callback object.
4360  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_isA.
4361  */
4362 template<class T, typename CT> Callback_Object_ice_isAPtr
4363 newCallback_Object_ice_isA(T* instance,
4364                            void (T::*cb)(bool, const CT&),
4365                            void (T::*excb)(const ::Ice::Exception&, const CT&),
4366                            void (T::*sentcb)(bool, const CT&) = 0)
4367 {
4368     return new Callback_Object_ice_isA<T, CT>(instance, cb, excb, sentcb);
4369 }
4370 
4371 /**
4372  * Creates a callback wrapper instance that delegates to your object.
4373  * @param instance The callback object.
4374  * @param excb The exception method of the callback object.
4375  * @param sentcb The sent method of the callback object.
4376  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_isA.
4377  */
4378 template<class T> Callback_Object_ice_isAPtr
4379 newCallback_Object_ice_isA(T* instance,
4380                            void (T::*excb)(const ::Ice::Exception&),
4381                            void (T::*sentcb)(bool) = 0)
4382 {
4383     return new CallbackNC_Object_ice_isA<T>(instance, 0, excb, sentcb);
4384 }
4385 
4386 /**
4387  * Creates a callback wrapper instance that delegates to your object.
4388  * @param instance The callback object.
4389  * @param excb The exception method of the callback object.
4390  * @param sentcb The sent method of the callback object.
4391  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_isA.
4392  */
4393 template<class T, typename CT> Callback_Object_ice_isAPtr
4394 newCallback_Object_ice_isA(T* instance,
4395                            void (T::*excb)(const ::Ice::Exception&, const CT&),
4396                            void (T::*sentcb)(bool, const CT&) = 0)
4397 {
4398     return new Callback_Object_ice_isA<T, CT>(instance, 0, excb, sentcb);
4399 }
4400 
4401 /**
4402  * Creates a callback wrapper instance that delegates to your object.
4403  * @param instance The callback object.
4404  * @param cb The success method of the callback object.
4405  * @param excb The exception method of the callback object.
4406  * @param sentcb The sent method of the callback object.
4407  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_ping.
4408  */
4409 template<class T> Callback_Object_ice_pingPtr
4410 newCallback_Object_ice_ping(const IceUtil::Handle<T>& instance,
4411                             void (T::*cb)(),
4412                             void (T::*excb)(const ::Ice::Exception&),
4413                             void (T::*sentcb)(bool) = 0)
4414 {
4415     return new CallbackNC_Object_ice_ping<T>(instance, cb, excb, sentcb);
4416 }
4417 
4418 /**
4419  * Creates a callback wrapper instance that delegates to your object.
4420  * @param instance The callback object.
4421  * @param cb The success method of the callback object.
4422  * @param excb The exception method of the callback object.
4423  * @param sentcb The sent method of the callback object.
4424  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_ping.
4425  */
4426 template<class T, typename CT> Callback_Object_ice_pingPtr
4427 newCallback_Object_ice_ping(const IceUtil::Handle<T>& instance,
4428                             void (T::*cb)(const CT&),
4429                             void (T::*excb)(const ::Ice::Exception&, const CT&),
4430                             void (T::*sentcb)(bool, const CT&) = 0)
4431 {
4432     return new Callback_Object_ice_ping<T, CT>(instance, cb, excb, sentcb);
4433 }
4434 
4435 /**
4436  * Creates a callback wrapper instance that delegates to your object.
4437  * @param instance The callback object.
4438  * @param excb The exception method of the callback object.
4439  * @param sentcb The sent method of the callback object.
4440  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_ping.
4441  */
4442 template<class T> Callback_Object_ice_pingPtr
4443 newCallback_Object_ice_ping(const IceUtil::Handle<T>& instance,
4444                             void (T::*excb)(const ::Ice::Exception&),
4445                             void (T::*sentcb)(bool) = 0)
4446 {
4447     return new CallbackNC_Object_ice_ping<T>(instance, 0, excb, sentcb);
4448 }
4449 
4450 /**
4451  * Creates a callback wrapper instance that delegates to your object.
4452  * @param instance The callback object.
4453  * @param excb The exception method of the callback object.
4454  * @param sentcb The sent method of the callback object.
4455  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_ping.
4456  */
4457 template<class T, typename CT> Callback_Object_ice_pingPtr
4458 newCallback_Object_ice_ping(const IceUtil::Handle<T>& instance,
4459                             void (T::*excb)(const ::Ice::Exception&, const CT&),
4460                             void (T::*sentcb)(bool, const CT&) = 0)
4461 {
4462     return new Callback_Object_ice_ping<T, CT>(instance, 0, excb, sentcb);
4463 }
4464 
4465 /**
4466  * Creates a callback wrapper instance that delegates to your object.
4467  * @param instance The callback object.
4468  * @param cb The success method of the callback object.
4469  * @param excb The exception method of the callback object.
4470  * @param sentcb The sent method of the callback object.
4471  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_ping.
4472  */
4473 template<class T> Callback_Object_ice_pingPtr
4474 newCallback_Object_ice_ping(T* instance,
4475                             void (T::*cb)(),
4476                             void (T::*excb)(const ::Ice::Exception&),
4477                             void (T::*sentcb)(bool) = 0)
4478 {
4479     return new CallbackNC_Object_ice_ping<T>(instance, cb, excb, sentcb);
4480 }
4481 
4482 /**
4483  * Creates a callback wrapper instance that delegates to your object.
4484  * @param instance The callback object.
4485  * @param cb The success method of the callback object.
4486  * @param excb The exception method of the callback object.
4487  * @param sentcb The sent method of the callback object.
4488  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_ping.
4489  */
4490 template<class T, typename CT> Callback_Object_ice_pingPtr
4491 newCallback_Object_ice_ping(T* instance,
4492                             void (T::*cb)(const CT&),
4493                             void (T::*excb)(const ::Ice::Exception&, const CT&),
4494                             void (T::*sentcb)(bool, const CT&) = 0)
4495 {
4496     return new Callback_Object_ice_ping<T, CT>(instance, cb, excb, sentcb);
4497 }
4498 
4499 /**
4500  * Creates a callback wrapper instance that delegates to your object.
4501  * @param instance The callback object.
4502  * @param excb The exception method of the callback object.
4503  * @param sentcb The sent method of the callback object.
4504  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_ping.
4505  */
4506 template<class T> Callback_Object_ice_pingPtr
4507 newCallback_Object_ice_ping(T* instance,
4508                             void (T::*excb)(const ::Ice::Exception&),
4509                             void (T::*sentcb)(bool) = 0)
4510 {
4511     return new CallbackNC_Object_ice_ping<T>(instance, 0, excb, sentcb);
4512 }
4513 
4514 /**
4515  * Creates a callback wrapper instance that delegates to your object.
4516  * @param instance The callback object.
4517  * @param excb The exception method of the callback object.
4518  * @param sentcb The sent method of the callback object.
4519  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_ping.
4520  */
4521 template<class T, typename CT> Callback_Object_ice_pingPtr
4522 newCallback_Object_ice_ping(T* instance,
4523                             void (T::*excb)(const ::Ice::Exception&, const CT&),
4524                             void (T::*sentcb)(bool, const CT&) = 0)
4525 {
4526     return new Callback_Object_ice_ping<T, CT>(instance, 0, excb, sentcb);
4527 }
4528 
4529 /**
4530  * Creates a callback wrapper instance that delegates to your object.
4531  * @param instance The callback object.
4532  * @param cb The success method of the callback object.
4533  * @param excb The exception method of the callback object.
4534  * @param sentcb The sent method of the callback object.
4535  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_ids.
4536  */
4537 template<class T> Callback_Object_ice_idsPtr
4538 newCallback_Object_ice_ids(const IceUtil::Handle<T>& instance,
4539                            void (T::*cb)(const ::std::vector< ::std::string>&),
4540                            void (T::*excb)(const ::Ice::Exception&),
4541                            void (T::*sentcb)(bool) = 0)
4542 {
4543     return new CallbackNC_Object_ice_ids<T>(instance, cb, excb, sentcb);
4544 }
4545 
4546 /**
4547  * Creates a callback wrapper instance that delegates to your object.
4548  * @param instance The callback object.
4549  * @param cb The success method of the callback object.
4550  * @param excb The exception method of the callback object.
4551  * @param sentcb The sent method of the callback object.
4552  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_ids.
4553  */
4554 template<class T, typename CT> Callback_Object_ice_idsPtr
4555 newCallback_Object_ice_ids(const IceUtil::Handle<T>& instance,
4556                            void (T::*cb)(const ::std::vector< ::std::string>&, const CT&),
4557                            void (T::*excb)(const ::Ice::Exception&, const CT&),
4558                            void (T::*sentcb)(bool, const CT&) = 0)
4559 {
4560     return new Callback_Object_ice_ids<T, CT>(instance, cb, excb, sentcb);
4561 }
4562 
4563 /**
4564  * Creates a callback wrapper instance that delegates to your object.
4565  * @param instance The callback object.
4566  * @param excb The exception method of the callback object.
4567  * @param sentcb The sent method of the callback object.
4568  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_ids.
4569  */
4570 template<class T> Callback_Object_ice_idsPtr
4571 newCallback_Object_ice_ids(const IceUtil::Handle<T>& instance,
4572                            void (T::*excb)(const ::Ice::Exception&),
4573                            void (T::*sentcb)(bool) = 0)
4574 {
4575     return new CallbackNC_Object_ice_ids<T>(instance, 0, excb, sentcb);
4576 }
4577 
4578 /**
4579  * Creates a callback wrapper instance that delegates to your object.
4580  * @param instance The callback object.
4581  * @param excb The exception method of the callback object.
4582  * @param sentcb The sent method of the callback object.
4583  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_ids.
4584  */
4585 template<class T, typename CT> Callback_Object_ice_idsPtr
4586 newCallback_Object_ice_ids(const IceUtil::Handle<T>& instance,
4587                            void (T::*excb)(const ::Ice::Exception&, const CT&),
4588                            void (T::*sentcb)(bool, const CT&) = 0)
4589 {
4590     return new Callback_Object_ice_ids<T, CT>(instance, 0, excb, sentcb);
4591 }
4592 
4593 /**
4594  * Creates a callback wrapper instance that delegates to your object.
4595  * @param instance The callback object.
4596  * @param cb The success method of the callback object.
4597  * @param excb The exception method of the callback object.
4598  * @param sentcb The sent method of the callback object.
4599  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_ids.
4600  */
4601 template<class T> Callback_Object_ice_idsPtr
4602 newCallback_Object_ice_ids(T* instance,
4603                            void (T::*cb)(const ::std::vector< ::std::string>&),
4604                            void (T::*excb)(const ::Ice::Exception&),
4605                            void (T::*sentcb)(bool) = 0)
4606 {
4607     return new CallbackNC_Object_ice_ids<T>(instance, cb, excb, sentcb);
4608 }
4609 
4610 /**
4611  * Creates a callback wrapper instance that delegates to your object.
4612  * @param instance The callback object.
4613  * @param cb The success method of the callback object.
4614  * @param excb The exception method of the callback object.
4615  * @param sentcb The sent method of the callback object.
4616  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_ids.
4617  */
4618 template<class T, typename CT> Callback_Object_ice_idsPtr
4619 newCallback_Object_ice_ids(T* instance,
4620                            void (T::*cb)(const ::std::vector< ::std::string>&, const CT&),
4621                            void (T::*excb)(const ::Ice::Exception&, const CT&),
4622                            void (T::*sentcb)(bool, const CT&) = 0)
4623 {
4624     return new Callback_Object_ice_ids<T, CT>(instance, cb, excb, sentcb);
4625 }
4626 
4627 /**
4628  * Creates a callback wrapper instance that delegates to your object.
4629  * @param instance The callback object.
4630  * @param excb The exception method of the callback object.
4631  * @param sentcb The sent method of the callback object.
4632  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_ids.
4633  */
4634 template<class T> Callback_Object_ice_idsPtr
4635 newCallback_Object_ice_ids(T* instance,
4636                            void (T::*excb)(const ::Ice::Exception&),
4637                            void (T::*sentcb)(bool) = 0)
4638 {
4639     return new CallbackNC_Object_ice_ids<T>(instance, 0, excb, sentcb);
4640 }
4641 
4642 /**
4643  * Creates a callback wrapper instance that delegates to your object.
4644  * @param instance The callback object.
4645  * @param excb The exception method of the callback object.
4646  * @param sentcb The sent method of the callback object.
4647  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_ids.
4648  */
4649 template<class T, typename CT> Callback_Object_ice_idsPtr
4650 newCallback_Object_ice_ids(T* instance,
4651                            void (T::*excb)(const ::Ice::Exception&, const CT&),
4652                            void (T::*sentcb)(bool, const CT&) = 0)
4653 {
4654     return new Callback_Object_ice_ids<T, CT>(instance, 0, excb, sentcb);
4655 }
4656 
4657 /**
4658  * Creates a callback wrapper instance that delegates to your object.
4659  * @param instance The callback object.
4660  * @param cb The success method of the callback object.
4661  * @param excb The exception method of the callback object.
4662  * @param sentcb The sent method of the callback object.
4663  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_id.
4664  */
4665 template<class T> Callback_Object_ice_idPtr
4666 newCallback_Object_ice_id(const IceUtil::Handle<T>& instance,
4667                           void (T::*cb)(const ::std::string&),
4668                           void (T::*excb)(const ::Ice::Exception&),
4669                           void (T::*sentcb)(bool) = 0)
4670 {
4671     return new CallbackNC_Object_ice_id<T>(instance, cb, excb, sentcb);
4672 }
4673 
4674 /**
4675  * Creates a callback wrapper instance that delegates to your object.
4676  * @param instance The callback object.
4677  * @param cb The success method of the callback object.
4678  * @param excb The exception method of the callback object.
4679  * @param sentcb The sent method of the callback object.
4680  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_id.
4681  */
4682 template<class T, typename CT> Callback_Object_ice_idPtr
4683 newCallback_Object_ice_id(const IceUtil::Handle<T>& instance,
4684                           void (T::*cb)(const ::std::string&, const CT&),
4685                           void (T::*excb)(const ::Ice::Exception&, const CT&),
4686                           void (T::*sentcb)(bool, const CT&) = 0)
4687 {
4688     return new Callback_Object_ice_id<T, CT>(instance, cb, excb, sentcb);
4689 }
4690 
4691 /**
4692  * Creates a callback wrapper instance that delegates to your object.
4693  * @param instance The callback object.
4694  * @param excb The exception method of the callback object.
4695  * @param sentcb The sent method of the callback object.
4696  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_id.
4697  */
4698 template<class T> Callback_Object_ice_idPtr
4699 newCallback_Object_ice_id(const IceUtil::Handle<T>& instance,
4700                           void (T::*excb)(const ::Ice::Exception&),
4701                           void (T::*sentcb)(bool) = 0)
4702 {
4703     return new CallbackNC_Object_ice_id<T>(instance, 0, excb, sentcb);
4704 }
4705 
4706 /**
4707  * Creates a callback wrapper instance that delegates to your object.
4708  * @param instance The callback object.
4709  * @param excb The exception method of the callback object.
4710  * @param sentcb The sent method of the callback object.
4711  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_id.
4712  */
4713 template<class T, typename CT> Callback_Object_ice_idPtr
4714 newCallback_Object_ice_id(const IceUtil::Handle<T>& instance,
4715                           void (T::*excb)(const ::Ice::Exception&, const CT&),
4716                           void (T::*sentcb)(bool, const CT&) = 0)
4717 {
4718     return new Callback_Object_ice_id<T, CT>(instance, 0, excb, sentcb);
4719 }
4720 
4721 /**
4722  * Creates a callback wrapper instance that delegates to your object.
4723  * @param instance The callback object.
4724  * @param cb The success method of the callback object.
4725  * @param excb The exception method of the callback object.
4726  * @param sentcb The sent method of the callback object.
4727  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_id.
4728  */
4729 template<class T> Callback_Object_ice_idPtr
4730 newCallback_Object_ice_id(T* instance,
4731                           void (T::*cb)(const ::std::string&),
4732                           void (T::*excb)(const ::Ice::Exception&),
4733                           void (T::*sentcb)(bool) = 0)
4734 {
4735     return new CallbackNC_Object_ice_id<T>(instance, cb, excb, sentcb);
4736 }
4737 
4738 /**
4739  * Creates a callback wrapper instance that delegates to your object.
4740  * @param instance The callback object.
4741  * @param cb The success method of the callback object.
4742  * @param excb The exception method of the callback object.
4743  * @param sentcb The sent method of the callback object.
4744  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_id.
4745  */
4746 template<class T, typename CT> Callback_Object_ice_idPtr
4747 newCallback_Object_ice_id(T* instance,
4748                           void (T::*cb)(const ::std::string&, const CT&),
4749                           void (T::*excb)(const ::Ice::Exception&, const CT&),
4750                           void (T::*sentcb)(bool, const CT&) = 0)
4751 {
4752     return new Callback_Object_ice_id<T, CT>(instance, cb, excb, sentcb);
4753 }
4754 
4755 /**
4756  * Creates a callback wrapper instance that delegates to your object.
4757  * @param instance The callback object.
4758  * @param excb The exception method of the callback object.
4759  * @param sentcb The sent method of the callback object.
4760  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_id.
4761  */
4762 template<class T> Callback_Object_ice_idPtr
4763 newCallback_Object_ice_id(T* instance,
4764                           void (T::*excb)(const ::Ice::Exception&),
4765                           void (T::*sentcb)(bool) = 0)
4766 {
4767     return new CallbackNC_Object_ice_id<T>(instance, 0, excb, sentcb);
4768 }
4769 
4770 /**
4771  * Creates a callback wrapper instance that delegates to your object.
4772  * @param instance The callback object.
4773  * @param excb The exception method of the callback object.
4774  * @param sentcb The sent method of the callback object.
4775  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_id.
4776  */
4777 template<class T, typename CT> Callback_Object_ice_idPtr
4778 newCallback_Object_ice_id(T* instance,
4779                           void (T::*excb)(const ::Ice::Exception&, const CT&),
4780                           void (T::*sentcb)(bool, const CT&) = 0)
4781 {
4782     return new Callback_Object_ice_id<T, CT>(instance, 0, excb, sentcb);
4783 }
4784 
4785 /**
4786  * Creates a callback wrapper instance that delegates to your object.
4787  * @param instance The callback object.
4788  * @param cb The success method of the callback object.
4789  * @param excb The exception method of the callback object.
4790  * @param sentcb The sent method of the callback object.
4791  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_invoke.
4792  */
4793 template<class T> Callback_Object_ice_invokePtr
4794 newCallback_Object_ice_invoke(const IceUtil::Handle<T>& instance,
4795                               void (T::*cb)(bool, const std::vector<Ice::Byte>&),
4796                               void (T::*excb)(const ::Ice::Exception&),
4797                               void (T::*sentcb)(bool) = 0)
4798 {
4799     return new CallbackNC_Object_ice_invoke<T>(instance, cb, excb, sentcb);
4800 }
4801 
4802 /**
4803  * Creates a callback wrapper instance that delegates to your object.
4804  * @param instance The callback object.
4805  * @param cb The success method of the callback object.
4806  * @param excb The exception method of the callback object.
4807  * @param sentcb The sent method of the callback object.
4808  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_invoke.
4809  */
4810 template<class T> Callback_Object_ice_invokePtr
4811 newCallback_Object_ice_invoke(const IceUtil::Handle<T>& instance,
4812                               void (T::*cb)(bool, const std::pair<const Byte*, const Byte*>&),
4813                               void (T::*excb)(const ::Ice::Exception&),
4814                               void (T::*sentcb)(bool) = 0)
4815 {
4816     return new CallbackNC_Object_ice_invoke<T>(instance, cb, excb, sentcb);
4817 }
4818 
4819 /**
4820  * Creates a callback wrapper instance that delegates to your object.
4821  * @param instance The callback object.
4822  * @param cb The success method of the callback object.
4823  * @param excb The exception method of the callback object.
4824  * @param sentcb The sent method of the callback object.
4825  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_invoke.
4826  */
4827 template<class T, typename CT> Callback_Object_ice_invokePtr
4828 newCallback_Object_ice_invoke(const IceUtil::Handle<T>& instance,
4829                               void (T::*cb)(bool, const std::vector<Ice::Byte>&, const CT&),
4830                               void (T::*excb)(const ::Ice::Exception&, const CT&),
4831                               void (T::*sentcb)(bool, const CT&) = 0)
4832 {
4833     return new Callback_Object_ice_invoke<T, CT>(instance, cb, excb, sentcb);
4834 }
4835 
4836 /**
4837  * Creates a callback wrapper instance that delegates to your object.
4838  * @param instance The callback object.
4839  * @param cb The success method of the callback object.
4840  * @param excb The exception method of the callback object.
4841  * @param sentcb The sent method of the callback object.
4842  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_invoke.
4843  */
4844 template<class T, typename CT> Callback_Object_ice_invokePtr
4845 newCallback_Object_ice_invoke(const IceUtil::Handle<T>& instance,
4846                               void (T::*cb)(bool, const std::pair<const Byte*, const Byte*>&,
4847                                             const CT&),
4848                               void (T::*excb)(const ::Ice::Exception&, const CT&),
4849                               void (T::*sentcb)(bool, const CT&) = 0)
4850 {
4851     return new Callback_Object_ice_invoke<T, CT>(instance, cb, excb, sentcb);
4852 }
4853 
4854 /**
4855  * Creates a callback wrapper instance that delegates to your object.
4856  * @param instance The callback object.
4857  * @param excb The exception method of the callback object.
4858  * @param sentcb The sent method of the callback object.
4859  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_invoke.
4860  */
4861 template<class T> Callback_Object_ice_invokePtr
4862 newCallback_Object_ice_invoke(const IceUtil::Handle<T>& instance,
4863                               void (T::*excb)(const ::Ice::Exception&),
4864                               void (T::*sentcb)(bool) = 0)
4865 {
4866     return new CallbackNC_Object_ice_invoke<T>(instance, 0, excb, sentcb);
4867 }
4868 
4869 /**
4870  * Creates a callback wrapper instance that delegates to your object.
4871  * @param instance The callback object.
4872  * @param excb The exception method of the callback object.
4873  * @param sentcb The sent method of the callback object.
4874  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_invoke.
4875  */
4876 template<class T, typename CT> Callback_Object_ice_invokePtr
4877 newCallback_Object_ice_invoke(const IceUtil::Handle<T>& instance,
4878                               void (T::*excb)(const ::Ice::Exception&, const CT&),
4879                               void (T::*sentcb)(bool, const CT&) = 0)
4880 {
4881     return new Callback_Object_ice_invoke<T, CT>(instance, 0, excb, sentcb);
4882 }
4883 
4884 /**
4885  * Creates a callback wrapper instance that delegates to your object.
4886  * @param instance The callback object.
4887  * @param cb The success method of the callback object.
4888  * @param excb The exception method of the callback object.
4889  * @param sentcb The sent method of the callback object.
4890  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_invoke.
4891  */
4892 template<class T> Callback_Object_ice_invokePtr
4893 newCallback_Object_ice_invoke(T* instance,
4894                               void (T::*cb)(bool, const std::vector<Ice::Byte>&),
4895                               void (T::*excb)(const ::Ice::Exception&),
4896                               void (T::*sentcb)(bool) = 0)
4897 {
4898     return new CallbackNC_Object_ice_invoke<T>(instance, cb, excb, sentcb);
4899 }
4900 
4901 /**
4902  * Creates a callback wrapper instance that delegates to your object.
4903  * @param instance The callback object.
4904  * @param cb The success method of the callback object.
4905  * @param excb The exception method of the callback object.
4906  * @param sentcb The sent method of the callback object.
4907  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_invoke.
4908  */
4909 template<class T> Callback_Object_ice_invokePtr
4910 newCallback_Object_ice_invoke(T* instance,
4911                               void (T::*cb)(bool, const std::pair<const Byte*, const Byte*>&),
4912                               void (T::*excb)(const ::Ice::Exception&),
4913                               void (T::*sentcb)(bool) = 0)
4914 {
4915     return new CallbackNC_Object_ice_invoke<T>(instance, cb, excb, sentcb);
4916 }
4917 
4918 /**
4919  * Creates a callback wrapper instance that delegates to your object.
4920  * @param instance The callback object.
4921  * @param cb The success method of the callback object.
4922  * @param excb The exception method of the callback object.
4923  * @param sentcb The sent method of the callback object.
4924  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_invoke.
4925  */
4926 template<class T, typename CT> Callback_Object_ice_invokePtr
4927 newCallback_Object_ice_invoke(T* instance,
4928                               void (T::*cb)(bool, const std::vector<Ice::Byte>&, const CT&),
4929                               void (T::*excb)(const ::Ice::Exception&, const CT&),
4930                               void (T::*sentcb)(bool, const CT&) = 0)
4931 {
4932     return new Callback_Object_ice_invoke<T, CT>(instance, cb, excb, sentcb);
4933 }
4934 
4935 /**
4936  * Creates a callback wrapper instance that delegates to your object.
4937  * @param instance The callback object.
4938  * @param cb The success method of the callback object.
4939  * @param excb The exception method of the callback object.
4940  * @param sentcb The sent method of the callback object.
4941  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_invoke.
4942  */
4943 template<class T, typename CT> Callback_Object_ice_invokePtr
4944 newCallback_Object_ice_invoke(T* instance,
4945                               void (T::*cb)(bool, const std::pair<const Byte*, const Byte*>&, const CT&),
4946                               void (T::*excb)(const ::Ice::Exception&, const CT&),
4947                               void (T::*sentcb)(bool, const CT&) = 0)
4948 {
4949     return new Callback_Object_ice_invoke<T, CT>(instance, cb, excb, sentcb);
4950 }
4951 
4952 /**
4953  * Creates a callback wrapper instance that delegates to your object.
4954  * @param instance The callback object.
4955  * @param excb The exception method of the callback object.
4956  * @param sentcb The sent method of the callback object.
4957  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_invoke.
4958  */
4959 template<class T> Callback_Object_ice_invokePtr
4960 newCallback_Object_ice_invoke(T* instance,
4961                               void (T::*excb)(const ::Ice::Exception&),
4962                               void (T::*sentcb)(bool) = 0)
4963 {
4964     return new CallbackNC_Object_ice_invoke<T>(
4965         instance, static_cast<void (T::*)(bool, const std::vector<Ice::Byte>&)>(0), excb, sentcb);
4966 }
4967 
4968 /**
4969  * Creates a callback wrapper instance that delegates to your object.
4970  * @param instance The callback object.
4971  * @param excb The exception method of the callback object.
4972  * @param sentcb The sent method of the callback object.
4973  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_invoke.
4974  */
4975 template<class T, typename CT> Callback_Object_ice_invokePtr
4976 newCallback_Object_ice_invoke(T* instance,
4977                               void (T::*excb)(const ::Ice::Exception&, const CT&),
4978                               void (T::*sentcb)(bool, const CT&) = 0)
4979 {
4980     return new Callback_Object_ice_invoke<T, CT>(
4981         instance, static_cast<void (T::*)(bool, const std::vector<Ice::Byte>&, const CT&)>(0), excb, sentcb);
4982 }
4983 
4984 /**
4985  * Creates a callback wrapper instance that delegates to your object.
4986  * @param instance The callback object.
4987  * @param cb The success method of the callback object.
4988  * @param excb The exception method of the callback object.
4989  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_getConnection.
4990  */
4991 template<class T> Callback_Object_ice_getConnectionPtr
newCallback_Object_ice_getConnection(const IceUtil::Handle<T> & instance,void (T::* cb)(const::Ice::ConnectionPtr &),void (T::* excb)(const::Ice::Exception &))4992 newCallback_Object_ice_getConnection(const IceUtil::Handle<T>& instance,
4993                                      void (T::*cb)(const ::Ice::ConnectionPtr&),
4994                                      void (T::*excb)(const ::Ice::Exception&))
4995 {
4996     return new CallbackNC_Object_ice_getConnection<T>(instance, cb, excb, 0);
4997 }
4998 
4999 /**
5000  * Creates a callback wrapper instance that delegates to your object.
5001  * @param instance The callback object.
5002  * @param cb The success method of the callback object.
5003  * @param excb The exception method of the callback object.
5004  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_getConnection.
5005  */
5006 template<class T, typename CT> Callback_Object_ice_getConnectionPtr
newCallback_Object_ice_getConnection(const IceUtil::Handle<T> & instance,void (T::* cb)(const::Ice::ConnectionPtr &,const CT &),void (T::* excb)(const::Ice::Exception &,const CT &))5007 newCallback_Object_ice_getConnection(const IceUtil::Handle<T>& instance,
5008                                      void (T::*cb)(const ::Ice::ConnectionPtr&, const CT&),
5009                                      void (T::*excb)(const ::Ice::Exception&, const CT&))
5010 {
5011     return new Callback_Object_ice_getConnection<T, CT>(instance, cb, excb, 0);
5012 }
5013 
5014 /**
5015  * Creates a callback wrapper instance that delegates to your object.
5016  * @param instance The callback object.
5017  * @param cb The success method of the callback object.
5018  * @param excb The exception method of the callback object.
5019  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_getConnection.
5020  */
5021 template<class T> Callback_Object_ice_getConnectionPtr
newCallback_Object_ice_getConnection(T * instance,void (T::* cb)(const::Ice::ConnectionPtr &),void (T::* excb)(const::Ice::Exception &))5022 newCallback_Object_ice_getConnection(T* instance,
5023                                      void (T::*cb)(const ::Ice::ConnectionPtr&),
5024                                      void (T::*excb)(const ::Ice::Exception&))
5025 {
5026     return new CallbackNC_Object_ice_getConnection<T>(instance, cb, excb, 0);
5027 }
5028 
5029 /**
5030  * Creates a callback wrapper instance that delegates to your object.
5031  * @param instance The callback object.
5032  * @param cb The success method of the callback object.
5033  * @param excb The exception method of the callback object.
5034  * @return An object that can be passed to an asynchronous invocation of IceProxy::Ice::Object::begin_ice_getConnection.
5035  */
5036 template<class T, typename CT> Callback_Object_ice_getConnectionPtr
newCallback_Object_ice_getConnection(T * instance,void (T::* cb)(const::Ice::ConnectionPtr &,const CT &),void (T::* excb)(const::Ice::Exception &,const CT &))5037 newCallback_Object_ice_getConnection(T* instance,
5038                                      void (T::*cb)(const ::Ice::ConnectionPtr&, const CT&),
5039                                      void (T::*excb)(const ::Ice::Exception&, const CT&))
5040 {
5041     return new Callback_Object_ice_getConnection<T, CT>(instance, cb, excb, 0);
5042 }
5043 
5044 /**
5045  * Creates a callback wrapper instance that delegates to your object.
5046  * @param instance The callback object.
5047  * @param excb The exception method of the callback object.
5048  * @param sentcb The sent method of the callback object.
5049  * @return An object that can be passed to an asynchronous invocation of
5050  * IceProxy::Ice::Object::begin_ice_flushBatchRequests.
5051  */
5052 template<class T> Callback_Object_ice_flushBatchRequestsPtr
5053 newCallback_Object_ice_flushBatchRequests(const IceUtil::Handle<T>& instance,
5054                                           void (T::*excb)(const ::Ice::Exception&),
5055                                           void (T::*sentcb)(bool) = 0)
5056 {
5057     return new CallbackNC_Object_ice_flushBatchRequests<T>(instance, excb, sentcb);
5058 }
5059 
5060 /**
5061  * Creates a callback wrapper instance that delegates to your object.
5062  * @param instance The callback object.
5063  * @param excb The exception method of the callback object.
5064  * @param sentcb The sent method of the callback object.
5065  * @return An object that can be passed to an asynchronous invocation of
5066  * IceProxy::Ice::Object::begin_ice_flushBatchRequests.
5067  */
5068 template<class T, typename CT> Callback_Object_ice_flushBatchRequestsPtr
5069 newCallback_Object_ice_flushBatchRequests(const IceUtil::Handle<T>& instance,
5070                                           void (T::*excb)(const ::Ice::Exception&, const CT&),
5071                                           void (T::*sentcb)(bool, const CT&) = 0)
5072 {
5073     return new Callback_Object_ice_flushBatchRequests<T, CT>(instance, excb, sentcb);
5074 }
5075 
5076 /**
5077  * Creates a callback wrapper instance that delegates to your object.
5078  * @param instance The callback object.
5079  * @param excb The exception method of the callback object.
5080  * @param sentcb The sent method of the callback object.
5081  * @return An object that can be passed to an asynchronous invocation of
5082  * IceProxy::Ice::Object::begin_ice_flushBatchRequests.
5083  */
5084 template<class T> Callback_Object_ice_flushBatchRequestsPtr
5085 newCallback_Object_ice_flushBatchRequests(T* instance,
5086                                           void (T::*excb)(const ::Ice::Exception&),
5087                                           void (T::*sentcb)(bool) = 0)
5088 {
5089     return new CallbackNC_Object_ice_flushBatchRequests<T>(instance, excb, sentcb);
5090 }
5091 
5092 /**
5093  * Creates a callback wrapper instance that delegates to your object.
5094  * @param instance The callback object.
5095  * @param excb The exception method of the callback object.
5096  * @param sentcb The sent method of the callback object.
5097  * @return An object that can be passed to an asynchronous invocation of
5098  * IceProxy::Ice::Object::begin_ice_flushBatchRequests.
5099  */
5100 template<class T, typename CT> Callback_Object_ice_flushBatchRequestsPtr
5101 newCallback_Object_ice_flushBatchRequests(T* instance,
5102                                           void (T::*excb)(const ::Ice::Exception&, const CT&),
5103                                           void (T::*sentcb)(bool, const CT&) = 0)
5104 {
5105     return new Callback_Object_ice_flushBatchRequests<T, CT>(instance, excb, sentcb);
5106 }
5107 
5108 }
5109 #endif
5110 
5111 #endif
5112