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
83 class ICE_API Process :
public virtual Object
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;
109 virtual ::std::string ice_id(
const Current& current)
const override;
115 static const ::std::string& ice_staticId();
122 virtual void shutdown(
const Current& current) = 0;
124 bool _iceD_shutdown(::IceInternal::Incoming&,
const Current&);
133 virtual void writeMessage(::std::string message,
int fd,
const Current& current) = 0;
135 bool _iceD_writeMessage(::IceInternal::Incoming&,
const Current&);
139 virtual bool _iceDispatch(::IceInternal::Incoming&,
const Current&)
override;
159 class ICE_CLASS(ICE_API)
ProcessPrx :
public virtual Proxy<ProcessPrx, ObjectPrx>
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()>
196 shutdownAsync(::std::function<
void()> response,
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()>
244 writeMessageAsync(const ::std::string& message,
int fd,
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>;
292 #else // C++98 mapping
303 ICE_API ::IceProxy::Ice::Object*
upCast(Process*);
318 typedef ::IceInternal::ProxyHandle< ::IceProxy::Ice::Process>
ProcessPrx;
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);
514 return _iceI_begin_writeMessage(message, fd, context, cb, cookie);
569 #ifdef ICE_CPP11_COMPILER
610 bool _iceD_shutdown(::IceInternal::Incoming&, const ::Ice::Current&);
621 bool _iceD_writeMessage(::IceInternal::Incoming&, const ::Ice::Current&);
625 virtual bool _iceDispatch(::IceInternal::Incoming&,
const Current&);
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);
673 typedef void (T::*Sent)(bool);
674 typedef void (T::*Response)();
677 : ::IceInternal::OnewayCallbackNC<T>(obj, cb, excb, sentcb)
741 template<
class T,
typename CT>
749 typedef void (T::*Sent)(bool ,
const CT&);
750 typedef void (T::*Response)(
const CT&);
753 : ::IceInternal::OnewayCallback<T, CT>(obj, cb, excb, sentcb)
829 typedef void (T::*Sent)(bool);
830 typedef void (T::*Response)();
833 : ::IceInternal::OnewayCallbackNC<T>(obj, cb, excb, sentcb)
897 template<
class T,
typename CT>
905 typedef void (T::*Sent)(bool ,
const CT&);
906 typedef void (T::*Response)(
const CT&);
909 : ::IceInternal::OnewayCallback<T, CT>(obj, cb, excb, sentcb)