16 #ifndef __Ice_Process_h__
17 #define __Ice_Process_h__
37 #ifndef ICE_IGNORE_VERSION
38 # if ICE_INT_VERSION / 100 != 307
39 # error Ice version mismatch!
41 # if ICE_INT_VERSION % 100 >= 50
42 # error Beta header file detected
44 # if ICE_INT_VERSION % 100 < 10
45 # error Ice patch level mismatch!
50 # if defined(ICE_STATIC_LIBS)
52 # elif defined(ICE_API_EXPORTS)
53 # define ICE_API ICE_DECLSPEC_EXPORT
55 # define ICE_API ICE_DECLSPEC_IMPORT
59 #ifdef ICE_CPP11_MAPPING // C++11 mapping
95 virtual bool ice_isA(::std::string
id,
const Current& current)
const override;
102 virtual ::std::vector<::std::string>
ice_ids(
const Current& current)
const override;
124 bool _iceD_shutdown(::IceInternal::Incoming&,
const Current&);
135 bool _iceD_writeMessage(::IceInternal::Incoming&,
const Current&);
139 virtual bool _iceDispatch(::IceInternal::Incoming&,
const Current&)
override;
170 _makePromiseOutgoing<void>(
true,
this, &ProcessPrx::_iceI_shutdown, context).get();
179 template<
template<
typename>
class P = ::std::promise>
181 -> decltype(::std::declval<P<void>>().get_future())
183 return _makePromiseOutgoing<void, P>(
false,
this, &ProcessPrx::_iceI_shutdown, context);
195 ::std::function<void()>
197 ::std::function<
void(::std::exception_ptr)> ex =
nullptr,
198 ::std::function<
void(
bool)> sent =
nullptr,
201 return _makeLamdaOutgoing<void>(std::move(response), std::move(ex), std::move(sent),
this, &Ice::ProcessPrx::_iceI_shutdown, context);
205 ICE_MEMBER(
ICE_API)
void _iceI_shutdown(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<void>>&,
const Context&);
216 _makePromiseOutgoing<void>(
true,
this, &ProcessPrx::_iceI_writeMessage, message, fd, context).get();
226 template<
template<
typename>
class P = ::std::promise>
228 -> decltype(::std::declval<P<void>>().get_future())
230 return _makePromiseOutgoing<void, P>(
false,
this, &ProcessPrx::_iceI_writeMessage, message, fd, context);
243 ::std::function<void()>
245 ::std::function<
void()> response,
246 ::std::function<
void(::std::exception_ptr)> ex =
nullptr,
247 ::std::function<
void(
bool)> sent =
nullptr,
250 return _makeLamdaOutgoing<void>(std::move(response), std::move(ex), std::move(sent),
this, &Ice::ProcessPrx::_iceI_writeMessage, message, fd, context);
254 ICE_MEMBER(
ICE_API)
void _iceI_writeMessage(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<void>>&, const ::std::string&,
int,
const Context&);
267 friend ::std::shared_ptr<ProcessPrx> IceInternal::createProxy<ProcessPrx>();
269 ICE_MEMBER(
ICE_API) virtual ::std::shared_ptr<ObjectPrx> _newInstance()
const override;
286 using ProcessPtr = ::std::shared_ptr<Process>;
287 using ProcessPrxPtr = ::std::shared_ptr<ProcessPrx>;
292 #else // C++98 mapping
303 ICE_API ::IceProxy::Ice::Object*
upCast(Process*);
317 typedef ::IceInternal::Handle< Process> ProcessPtr;
318 typedef ::IceInternal::ProxyHandle< ::IceProxy::Ice::Process> ProcessPrx;
319 typedef ProcessPrx ProcessPrxPtr;
321 ICE_API void _icePatchObjectPtr(ProcessPtr&,
const ObjectPtr&);
334 class Callback_Process_shutdown_Base :
public virtual ::IceInternal::CallbackBase { };
335 typedef ::IceUtil::Handle< Callback_Process_shutdown_Base> Callback_Process_shutdownPtr;
342 class Callback_Process_writeMessage_Base :
public virtual ::IceInternal::CallbackBase { };
343 typedef ::IceUtil::Handle< Callback_Process_writeMessage_Base> Callback_Process_writeMessagePtr;
353 class ICE_CLASS(ICE_API) Process :
public virtual ::Ice::Proxy<Process, ::IceProxy::Ice::Object>
364 end_shutdown(_iceI_begin_shutdown(context, ::IceInternal::dummyCallback, 0,
true));
375 return _iceI_begin_shutdown(context, ::IceInternal::dummyCallback, 0);
400 return _iceI_begin_shutdown(context, cb, cookie);
425 return _iceI_begin_shutdown(context, cb, cookie);
448 end_writeMessage(_iceI_begin_writeMessage(message, fd, context, ::IceInternal::dummyCallback, 0,
true));
460 return _iceI_begin_writeMessage(message, fd, context, ::IceInternal::dummyCallback, 0);
487 return _iceI_begin_writeMessage(message, fd, context, cb, cookie);
498 ::Ice::AsyncResultPtr begin_writeMessage(const ::std::string& message, ::
Ice::Int fd, const ::Ice::Callback_Process_writeMessagePtr& cb,
const ::Ice::LocalObjectPtr& cookie = 0)
514 return _iceI_begin_writeMessage(message, fd, context, cb, cookie);
560 class ICE_API Process :
public virtual Object
564 typedef ProcessPrx ProxyType;
565 typedef ProcessPtr PointerType;
569 #ifdef ICE_CPP11_COMPILER
571 Process(
const Process&) =
default;
572 Process& operator=(
const Process&) =
default;
581 virtual bool ice_isA(const ::std::string&
id,
const Current& current =
emptyCurrent)
const;
588 virtual ::std::vector< ::std::string> ice_ids(
const Current& current =
emptyCurrent)
const;
595 virtual const ::std::string& ice_id(
const Current& current =
emptyCurrent)
const;
601 static const ::std::string& ice_staticId();
608 virtual void shutdown(
const Current& current =
emptyCurrent) = 0;
610 bool _iceD_shutdown(::IceInternal::Incoming&, const ::Ice::Current&);
619 virtual void writeMessage(const ::std::string& message,
Int fd,
const Current& current =
emptyCurrent) = 0;
621 bool _iceD_writeMessage(::IceInternal::Incoming&, const ::Ice::Current&);
625 virtual bool _iceDispatch(::IceInternal::Incoming&,
const Current&);
631 virtual void _iceWriteImpl(OutputStream*)
const;
632 virtual void _iceReadImpl(InputStream*);
637 inline bool operator==(
const Process& lhs,
const Process& rhs)
639 return static_cast<const Object&
>(lhs) ==
static_cast<const Object&
>(rhs);
642 inline bool operator<(
const Process& lhs,
const Process& rhs)
644 return static_cast<const Object&
>(lhs) <
static_cast<const Object&
>(rhs);
666 class CallbackNC_Process_shutdown :
public Callback_Process_shutdown_Base,
public ::IceInternal::OnewayCallbackNC<T>
673 typedef void (T::*Sent)(bool);
674 typedef void (T::*Response)();
676 CallbackNC_Process_shutdown(
const TPtr& obj, Response cb,
Exception excb, Sent sentcb)
677 : ::IceInternal::OnewayCallbackNC<T>(obj, cb, excb, sentcb)
690 template<
class T> Callback_Process_shutdownPtr
693 return new CallbackNC_Process_shutdown<T>(instance, cb, excb, sentcb);
703 template<
class T> Callback_Process_shutdownPtr
706 return new CallbackNC_Process_shutdown<T>(instance, 0, excb, sentcb);
717 template<
class T> Callback_Process_shutdownPtr
718 newCallback_Process_shutdown(T* instance,
void (T::*cb)(),
void (T::*excb)(
const ::Ice::Exception&),
void (T::*sentcb)(
bool) = 0)
720 return new CallbackNC_Process_shutdown<T>(instance, cb, excb, sentcb);
730 template<
class T> Callback_Process_shutdownPtr
731 newCallback_Process_shutdown(T* instance,
void (T::*excb)(
const ::Ice::Exception&),
void (T::*sentcb)(
bool) = 0)
733 return new CallbackNC_Process_shutdown<T>(instance, 0, excb, sentcb);
741 template<
class T,
typename CT>
742 class Callback_Process_shutdown :
public Callback_Process_shutdown_Base,
public ::IceInternal::OnewayCallback<T, CT>
749 typedef void (T::*Sent)(bool ,
const CT&);
750 typedef void (T::*Response)(
const CT&);
752 Callback_Process_shutdown(
const TPtr& obj, Response cb,
Exception excb, Sent sentcb)
753 : ::IceInternal::OnewayCallback<T, CT>(obj, cb, excb, sentcb)
767 template<
class T,
typename CT> Callback_Process_shutdownPtr
770 return new Callback_Process_shutdown<T, CT>(instance, cb, excb, sentcb);
781 template<
class T,
typename CT> Callback_Process_shutdownPtr
784 return new Callback_Process_shutdown<T, CT>(instance, 0, excb, sentcb);
796 template<
class T,
typename CT> Callback_Process_shutdownPtr
797 newCallback_Process_shutdown(T* instance,
void (T::*cb)(
const CT&),
void (T::*excb)(
const ::Ice::Exception&,
const CT&),
void (T::*sentcb)(
bool,
const CT&) = 0)
799 return new Callback_Process_shutdown<T, CT>(instance, cb, excb, sentcb);
810 template<
class T,
typename CT> Callback_Process_shutdownPtr
811 newCallback_Process_shutdown(T* instance,
void (T::*excb)(
const ::Ice::Exception&,
const CT&),
void (T::*sentcb)(
bool,
const CT&) = 0)
813 return new Callback_Process_shutdown<T, CT>(instance, 0, excb, sentcb);
822 class CallbackNC_Process_writeMessage :
public Callback_Process_writeMessage_Base,
public ::IceInternal::OnewayCallbackNC<T>
829 typedef void (T::*Sent)(bool);
830 typedef void (T::*Response)();
832 CallbackNC_Process_writeMessage(
const TPtr& obj, Response cb,
Exception excb, Sent sentcb)
833 : ::IceInternal::OnewayCallbackNC<T>(obj, cb, excb, sentcb)
846 template<
class T> Callback_Process_writeMessagePtr
849 return new CallbackNC_Process_writeMessage<T>(instance, cb, excb, sentcb);
859 template<
class T> Callback_Process_writeMessagePtr
862 return new CallbackNC_Process_writeMessage<T>(instance, 0, excb, sentcb);
873 template<
class T> Callback_Process_writeMessagePtr
874 newCallback_Process_writeMessage(T* instance,
void (T::*cb)(),
void (T::*excb)(
const ::Ice::Exception&),
void (T::*sentcb)(
bool) = 0)
876 return new CallbackNC_Process_writeMessage<T>(instance, cb, excb, sentcb);
886 template<
class T> Callback_Process_writeMessagePtr
887 newCallback_Process_writeMessage(T* instance,
void (T::*excb)(
const ::Ice::Exception&),
void (T::*sentcb)(
bool) = 0)
889 return new CallbackNC_Process_writeMessage<T>(instance, 0, excb, sentcb);
897 template<
class T,
typename CT>
898 class Callback_Process_writeMessage :
public Callback_Process_writeMessage_Base,
public ::IceInternal::OnewayCallback<T, CT>
905 typedef void (T::*Sent)(bool ,
const CT&);
906 typedef void (T::*Response)(
const CT&);
908 Callback_Process_writeMessage(
const TPtr& obj, Response cb,
Exception excb, Sent sentcb)
909 : ::IceInternal::OnewayCallback<T, CT>(obj, cb, excb, sentcb)
923 template<
class T,
typename CT> Callback_Process_writeMessagePtr
926 return new Callback_Process_writeMessage<T, CT>(instance, cb, excb, sentcb);
937 template<
class T,
typename CT> Callback_Process_writeMessagePtr
940 return new Callback_Process_writeMessage<T, CT>(instance, 0, excb, sentcb);
952 template<
class T,
typename CT> Callback_Process_writeMessagePtr
953 newCallback_Process_writeMessage(T* instance,
void (T::*cb)(
const CT&),
void (T::*excb)(
const ::Ice::Exception&,
const CT&),
void (T::*sentcb)(
bool,
const CT&) = 0)
955 return new Callback_Process_writeMessage<T, CT>(instance, cb, excb, sentcb);
966 template<
class T,
typename CT> Callback_Process_writeMessagePtr
967 newCallback_Process_writeMessage(T* instance,
void (T::*excb)(
const ::Ice::Exception&,
const CT&),
void (T::*sentcb)(
bool,
const CT&) = 0)
969 return new Callback_Process_writeMessage<T, CT>(instance, 0, excb, sentcb);