16 #ifndef __IceLocatorDiscovery_IceLocatorDiscovery_h__
17 #define __IceLocatorDiscovery_IceLocatorDiscovery_h__
40 #ifndef ICE_IGNORE_VERSION
41 # if ICE_INT_VERSION / 100 != 307
42 # error Ice version mismatch!
44 # if ICE_INT_VERSION % 100 >= 50
45 # error Beta header file detected
47 # if ICE_INT_VERSION % 100 < 10
48 # error Ice patch level mismatch!
52 #ifdef ICE_CPP11_MAPPING // C++11 mapping
86 virtual bool ice_isA(::std::string
id, const ::Ice::Current& current)
const override;
93 virtual ::std::vector<::std::string>
ice_ids(const ::Ice::Current& current)
const override;
100 virtual ::std::string
ice_id(const ::Ice::Current& current)
const override;
114 virtual void foundLocator(::std::shared_ptr<::Ice::LocatorPrx> prx, const ::Ice::Current& current) = 0;
116 bool _iceD_foundLocator(::IceInternal::Incoming&, const ::Ice::Current&);
120 virtual bool _iceDispatch(::IceInternal::Incoming&, const ::Ice::Current&)
override;
147 virtual bool ice_isA(::std::string
id, const ::Ice::Current& current)
const override;
154 virtual ::std::vector<::std::string>
ice_ids(const ::Ice::Current& current)
const override;
161 virtual ::std::string
ice_id(const ::Ice::Current& current)
const override;
177 virtual void findLocator(::std::string instanceName, ::std::shared_ptr<LookupReplyPrx> reply, const ::Ice::Current& current) = 0;
179 bool _iceD_findLocator(::IceInternal::Incoming&, const ::Ice::Current&);
183 virtual bool _iceDispatch(::IceInternal::Incoming&, const ::Ice::Current&)
override;
211 _makePromiseOutgoing<void>(
true,
this, &LookupReplyPrx::_iceI_foundLocator, prx, context).get();
221 template<
template<
typename>
class P = ::std::promise>
223 -> decltype(::std::declval<P<void>>().get_future())
225 return _makePromiseOutgoing<void, P>(
false,
this, &LookupReplyPrx::_iceI_foundLocator, prx, context);
238 ::std::function<void()>
240 ::std::function<
void()> response,
241 ::std::function<
void(::std::exception_ptr)> ex =
nullptr,
242 ::std::function<
void(
bool)> sent =
nullptr,
245 return _makeLamdaOutgoing<void>(std::move(response), std::move(ex), std::move(sent),
this, &IceLocatorDiscovery::LookupReplyPrx::_iceI_foundLocator, prx, context);
249 void _iceI_foundLocator(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<void>>&, const ::std::shared_ptr<::Ice::LocatorPrx>&,
const ::Ice::Context&);
262 friend ::std::shared_ptr<LookupReplyPrx> IceInternal::createProxy<LookupReplyPrx>();
264 virtual ::std::shared_ptr<::Ice::ObjectPrx> _newInstance()
const override;
293 _makePromiseOutgoing<void>(
true,
this, &LookupPrx::_iceI_findLocator, instanceName, reply, context).get();
305 template<
template<
typename>
class P = ::std::promise>
307 -> decltype(::std::declval<P<void>>().get_future())
309 return _makePromiseOutgoing<void, P>(
false,
this, &LookupPrx::_iceI_findLocator, instanceName, reply, context);
324 ::std::function<void()>
325 findLocatorAsync(const ::std::string& instanceName, const ::std::shared_ptr<LookupReplyPrx>& reply,
326 ::std::function<
void()> response,
327 ::std::function<
void(::std::exception_ptr)> ex =
nullptr,
328 ::std::function<
void(
bool)> sent =
nullptr,
331 return _makeLamdaOutgoing<void>(std::move(response), std::move(ex), std::move(sent),
this, &IceLocatorDiscovery::LookupPrx::_iceI_findLocator, instanceName, reply, context);
335 void _iceI_findLocator(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<void>>&, const ::std::string&, const ::std::shared_ptr<LookupReplyPrx>&,
const ::Ice::Context&);
348 friend ::std::shared_ptr<LookupPrx> IceInternal::createProxy<LookupPrx>();
350 virtual ::std::shared_ptr<::Ice::ObjectPrx> _newInstance()
const override;
367 using LookupReplyPtr = ::std::shared_ptr<LookupReply>;
368 using LookupReplyPrxPtr = ::std::shared_ptr<LookupReplyPrx>;
370 using LookupPtr = ::std::shared_ptr<Lookup>;
371 using LookupPrxPtr = ::std::shared_ptr<LookupPrx>;
376 #else // C++98 mapping
386 void _readProxy(::
Ice::InputStream*, ::IceInternal::ProxyHandle< LookupReply>&);
387 ::IceProxy::Ice::Object* upCast(LookupReply*);
393 ::IceProxy::Ice::Object* upCast(Lookup*);
407 typedef ::IceInternal::Handle< LookupReply> LookupReplyPtr;
408 typedef ::IceInternal::ProxyHandle< ::IceProxy::IceLocatorDiscovery::LookupReply> LookupReplyPrx;
409 typedef LookupReplyPrx LookupReplyPrxPtr;
411 void _icePatchObjectPtr(LookupReplyPtr&, const ::Ice::ObjectPtr&);
418 typedef ::IceInternal::Handle< Lookup> LookupPtr;
419 typedef ::IceInternal::ProxyHandle< ::IceProxy::IceLocatorDiscovery::Lookup> LookupPrx;
420 typedef LookupPrx LookupPrxPtr;
422 void _icePatchObjectPtr(LookupPtr&, const ::Ice::ObjectPtr&);
442 class Callback_LookupReply_foundLocator_Base :
public virtual ::IceInternal::CallbackBase { };
443 typedef ::IceUtil::Handle< Callback_LookupReply_foundLocator_Base> Callback_LookupReply_foundLocatorPtr;
450 class Callback_Lookup_findLocator_Base :
public virtual ::IceInternal::CallbackBase { };
451 typedef ::IceUtil::Handle< Callback_Lookup_findLocator_Base> Callback_Lookup_findLocatorPtr;
461 class LookupReply :
public virtual ::Ice::Proxy<LookupReply, ::IceProxy::Ice::Object>
473 end_foundLocator(_iceI_begin_foundLocator(prx, context, ::IceInternal::dummyCallback, 0,
true));
485 return _iceI_begin_foundLocator(prx, context, ::IceInternal::dummyCallback, 0);
496 ::Ice::AsyncResultPtr begin_foundLocator(const ::Ice::LocatorPrx& prx, const ::Ice::CallbackPtr& cb,
const ::Ice::LocalObjectPtr& cookie = 0)
512 return _iceI_begin_foundLocator(prx, context, cb, cookie);
523 ::Ice::AsyncResultPtr begin_foundLocator(const ::Ice::LocatorPrx& prx, const ::IceLocatorDiscovery::Callback_LookupReply_foundLocatorPtr& cb,
const ::Ice::LocalObjectPtr& cookie = 0)
539 return _iceI_begin_foundLocator(prx, context, cb, cookie);
546 void end_foundLocator(const ::Ice::AsyncResultPtr& result);
558 static const ::std::string& ice_staticId();
563 virtual ::IceProxy::Ice::Object* _newInstance()
const;
567 class Lookup :
public virtual ::Ice::Proxy<Lookup, ::IceProxy::Ice::Object>
581 end_findLocator(_iceI_begin_findLocator(instanceName, reply, context, ::IceInternal::dummyCallback, 0,
true));
595 return _iceI_begin_findLocator(instanceName, reply, context, ::IceInternal::dummyCallback, 0);
608 ::Ice::AsyncResultPtr begin_findLocator(const ::std::string& instanceName, const ::IceLocatorDiscovery::LookupReplyPrx& reply, const ::Ice::CallbackPtr& cb,
const ::Ice::LocalObjectPtr& cookie = 0)
626 return _iceI_begin_findLocator(instanceName, reply, context, cb, cookie);
639 ::Ice::AsyncResultPtr begin_findLocator(const ::std::string& instanceName, const ::IceLocatorDiscovery::LookupReplyPrx& reply, const ::IceLocatorDiscovery::Callback_Lookup_findLocatorPtr& cb,
const ::Ice::LocalObjectPtr& cookie = 0)
655 ::Ice::AsyncResultPtr begin_findLocator(const ::std::string& instanceName, const ::IceLocatorDiscovery::LookupReplyPrx& reply,
const ::Ice::Context& context, const ::IceLocatorDiscovery::Callback_Lookup_findLocatorPtr& cb,
const ::Ice::LocalObjectPtr& cookie = 0)
657 return _iceI_begin_findLocator(instanceName, reply, context, cb, cookie);
664 void end_findLocator(const ::Ice::AsyncResultPtr& result);
668 ::Ice::AsyncResultPtr _iceI_begin_findLocator(const ::std::string&, const ::IceLocatorDiscovery::LookupReplyPrx&,
const ::Ice::Context&, const ::IceInternal::CallbackBasePtr&,
const ::Ice::LocalObjectPtr& cookie = 0,
bool sync =
false);
676 static const ::std::string& ice_staticId();
681 virtual ::IceProxy::Ice::Object* _newInstance()
const;
704 typedef LookupReplyPtr PointerType;
706 virtual ~LookupReply();
708 #ifdef ICE_CPP11_COMPILER
709 LookupReply() =
default;
710 LookupReply(
const LookupReply&) =
default;
711 LookupReply& operator=(
const LookupReply&) =
default;
750 bool _iceD_foundLocator(::IceInternal::Incoming&, const ::Ice::Current&);
754 virtual bool _iceDispatch(::IceInternal::Incoming&, const ::Ice::Current&);
766 inline bool operator==(
const LookupReply& lhs,
const LookupReply& rhs)
771 inline bool operator<(
const LookupReply& lhs,
const LookupReply& rhs)
793 typedef LookupPtr PointerType;
797 #ifdef ICE_CPP11_COMPILER
799 Lookup(
const Lookup&) =
default;
800 Lookup& operator=(
const Lookup&) =
default;
839 virtual void findLocator(const ::std::string& instanceName,
const LookupReplyPrx& reply, const ::Ice::Current& current = ::
Ice::emptyCurrent) = 0;
841 bool _iceD_findLocator(::IceInternal::Incoming&, const ::Ice::Current&);
845 virtual bool _iceDispatch(::IceInternal::Incoming&, const ::Ice::Current&);
857 inline bool operator==(
const Lookup& lhs,
const Lookup& rhs)
862 inline bool operator<(
const Lookup& lhs,
const Lookup& rhs)
886 class CallbackNC_LookupReply_foundLocator :
public Callback_LookupReply_foundLocator_Base,
public ::IceInternal::OnewayCallbackNC<T>
893 typedef void (T::*Sent)(bool);
894 typedef void (T::*Response)();
896 CallbackNC_LookupReply_foundLocator(
const TPtr& obj, Response cb,
Exception excb, Sent sentcb)
897 : ::IceInternal::OnewayCallbackNC<T>(obj, cb, excb, sentcb)
910 template<
class T> Callback_LookupReply_foundLocatorPtr
913 return new CallbackNC_LookupReply_foundLocator<T>(instance, cb, excb, sentcb);
923 template<
class T> Callback_LookupReply_foundLocatorPtr
926 return new CallbackNC_LookupReply_foundLocator<T>(instance, 0, excb, sentcb);
937 template<
class T> Callback_LookupReply_foundLocatorPtr
938 newCallback_LookupReply_foundLocator(T* instance,
void (T::*cb)(),
void (T::*excb)(
const ::Ice::Exception&),
void (T::*sentcb)(
bool) = 0)
940 return new CallbackNC_LookupReply_foundLocator<T>(instance, cb, excb, sentcb);
950 template<
class T> Callback_LookupReply_foundLocatorPtr
951 newCallback_LookupReply_foundLocator(T* instance,
void (T::*excb)(
const ::Ice::Exception&),
void (T::*sentcb)(
bool) = 0)
953 return new CallbackNC_LookupReply_foundLocator<T>(instance, 0, excb, sentcb);
961 template<
class T,
typename CT>
962 class Callback_LookupReply_foundLocator :
public Callback_LookupReply_foundLocator_Base,
public ::IceInternal::OnewayCallback<T, CT>
969 typedef void (T::*Sent)(bool ,
const CT&);
970 typedef void (T::*Response)(
const CT&);
972 Callback_LookupReply_foundLocator(
const TPtr& obj, Response cb,
Exception excb, Sent sentcb)
973 : ::IceInternal::OnewayCallback<T, CT>(obj, cb, excb, sentcb)
987 template<
class T,
typename CT> Callback_LookupReply_foundLocatorPtr
990 return new Callback_LookupReply_foundLocator<T, CT>(instance, cb, excb, sentcb);
1001 template<
class T,
typename CT> Callback_LookupReply_foundLocatorPtr
1004 return new Callback_LookupReply_foundLocator<T, CT>(instance, 0, excb, sentcb);
1016 template<
class T,
typename CT> Callback_LookupReply_foundLocatorPtr
1017 newCallback_LookupReply_foundLocator(T* instance,
void (T::*cb)(
const CT&),
void (T::*excb)(
const ::Ice::Exception&,
const CT&),
void (T::*sentcb)(
bool,
const CT&) = 0)
1019 return new Callback_LookupReply_foundLocator<T, CT>(instance, cb, excb, sentcb);
1030 template<
class T,
typename CT> Callback_LookupReply_foundLocatorPtr
1031 newCallback_LookupReply_foundLocator(T* instance,
void (T::*excb)(
const ::Ice::Exception&,
const CT&),
void (T::*sentcb)(
bool,
const CT&) = 0)
1033 return new Callback_LookupReply_foundLocator<T, CT>(instance, 0, excb, sentcb);
1042 class CallbackNC_Lookup_findLocator :
public Callback_Lookup_findLocator_Base,
public ::IceInternal::OnewayCallbackNC<T>
1049 typedef void (T::*Sent)(bool);
1050 typedef void (T::*Response)();
1052 CallbackNC_Lookup_findLocator(
const TPtr& obj, Response cb,
Exception excb, Sent sentcb)
1053 : ::IceInternal::OnewayCallbackNC<T>(obj, cb, excb, sentcb)
1066 template<
class T> Callback_Lookup_findLocatorPtr
1069 return new CallbackNC_Lookup_findLocator<T>(instance, cb, excb, sentcb);
1079 template<
class T> Callback_Lookup_findLocatorPtr
1082 return new CallbackNC_Lookup_findLocator<T>(instance, 0, excb, sentcb);
1093 template<
class T> Callback_Lookup_findLocatorPtr
1094 newCallback_Lookup_findLocator(T* instance,
void (T::*cb)(),
void (T::*excb)(
const ::Ice::Exception&),
void (T::*sentcb)(
bool) = 0)
1096 return new CallbackNC_Lookup_findLocator<T>(instance, cb, excb, sentcb);
1106 template<
class T> Callback_Lookup_findLocatorPtr
1107 newCallback_Lookup_findLocator(T* instance,
void (T::*excb)(
const ::Ice::Exception&),
void (T::*sentcb)(
bool) = 0)
1109 return new CallbackNC_Lookup_findLocator<T>(instance, 0, excb, sentcb);
1117 template<
class T,
typename CT>
1118 class Callback_Lookup_findLocator :
public Callback_Lookup_findLocator_Base,
public ::IceInternal::OnewayCallback<T, CT>
1125 typedef void (T::*Sent)(bool ,
const CT&);
1126 typedef void (T::*Response)(
const CT&);
1128 Callback_Lookup_findLocator(
const TPtr& obj, Response cb,
Exception excb, Sent sentcb)
1129 : ::IceInternal::OnewayCallback<T, CT>(obj, cb, excb, sentcb)
1143 template<
class T,
typename CT> Callback_Lookup_findLocatorPtr
1146 return new Callback_Lookup_findLocator<T, CT>(instance, cb, excb, sentcb);
1157 template<
class T,
typename CT> Callback_Lookup_findLocatorPtr
1160 return new Callback_Lookup_findLocator<T, CT>(instance, 0, excb, sentcb);
1172 template<
class T,
typename CT> Callback_Lookup_findLocatorPtr
1173 newCallback_Lookup_findLocator(T* instance,
void (T::*cb)(
const CT&),
void (T::*excb)(
const ::Ice::Exception&,
const CT&),
void (T::*sentcb)(
bool,
const CT&) = 0)
1175 return new Callback_Lookup_findLocator<T, CT>(instance, cb, excb, sentcb);
1186 template<
class T,
typename CT> Callback_Lookup_findLocatorPtr
1187 newCallback_Lookup_findLocator(T* instance,
void (T::*excb)(
const ::Ice::Exception&,
const CT&),
void (T::*sentcb)(
bool,
const CT&) = 0)
1189 return new Callback_Lookup_findLocator<T, CT>(instance, 0, excb, sentcb);