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 < 11
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
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;
159class ICE_CLASS(ICE_API)
ProcessPrx :
public virtual Proxy<ProcessPrx, ObjectPrx>
168 void shutdown(
const Context& context = noExplicitContext)
170 _makePromiseOutgoing<void>(
true,
this, &ProcessPrx::_iceI_shutdown, context).
get();
179 template<
template<
typename>
class P = ::std::promise>
180 auto shutdownAsync(
const Context& context = noExplicitContext)
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,
199 const Context& context = noExplicitContext)
201 return _makeLambdaOutgoing<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&);
214 void writeMessage(const ::std::string& message,
int fd,
const Context& context = noExplicitContext)
216 _makePromiseOutgoing<void>(
true,
this, &ProcessPrx::_iceI_writeMessage, message, fd, context).get();
226 template<
template<
typename>
class P = ::std::promise>
227 auto writeMessageAsync(const ::std::string& message,
int fd,
const Context& context = noExplicitContext)
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,
248 const Context& context = noExplicitContext)
250 return _makeLambdaOutgoing<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;
302ICE_API void _readProxy(::Ice::InputStream*, ::IceInternal::ProxyHandle< Process>&);
318typedef ::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);
436 ICE_MEMBER(
ICE_API) ::
Ice::AsyncResultPtr _iceI_begin_shutdown(const ::
Ice::Context&, const ::IceInternal::CallbackBasePtr&, const ::
Ice::LocalObjectPtr& cookie = 0, bool sync = false);
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);
525 ICE_MEMBER(
ICE_API) ::
Ice::AsyncResultPtr _iceI_begin_writeMessage(const ::std::string&, ::
Ice::Int, const ::
Ice::Context&, const ::IceInternal::CallbackBasePtr&, const ::
Ice::LocalObjectPtr& cookie = 0, bool sync = false);
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);
642inline bool operator<(
const Process& lhs,
const Process& rhs)
644 return static_cast<const Object&
>(lhs) <
static_cast<const Object&
>(rhs);
677 : ::IceInternal::OnewayCallbackNC<T>(obj, cb, excb, sentcb)
690template<
class T> Callback_Process_shutdownPtr
703template<
class T> Callback_Process_shutdownPtr
717template<
class T> Callback_Process_shutdownPtr
730template<
class T> Callback_Process_shutdownPtr
741template<
class T,
typename CT>
748 typedef void (T::*
Exception)(const ::Ice::Exception& ,
const CT&);
749 typedef void (T::*
Sent)(bool ,
const CT&);
753 : ::IceInternal::OnewayCallback<T, CT>(obj, cb, excb, sentcb)
767template<
class T,
typename CT> Callback_Process_shutdownPtr
781template<
class T,
typename CT> Callback_Process_shutdownPtr
796template<
class T,
typename CT> Callback_Process_shutdownPtr
797newCallback_Process_shutdown(T* instance,
void (T::*cb)(
const CT&),
void (T::*excb)(const ::Ice::Exception&,
const CT&),
void (T::*sentcb)(
bool,
const CT&) = 0)
810template<
class T,
typename CT> Callback_Process_shutdownPtr
833 : ::IceInternal::OnewayCallbackNC<T>(obj, cb, excb, sentcb)
846template<
class T> Callback_Process_writeMessagePtr
859template<
class T> Callback_Process_writeMessagePtr
873template<
class T> Callback_Process_writeMessagePtr
886template<
class T> Callback_Process_writeMessagePtr
897template<
class T,
typename CT>
904 typedef void (T::*
Exception)(const ::Ice::Exception& ,
const CT&);
905 typedef void (T::*
Sent)(bool ,
const CT&);
909 : ::IceInternal::OnewayCallback<T, CT>(obj, cb, excb, sentcb)
923template<
class T,
typename CT> Callback_Process_writeMessagePtr
937template<
class T,
typename CT> Callback_Process_writeMessagePtr
952template<
class T,
typename CT> Callback_Process_writeMessagePtr
966template<
class T,
typename CT> Callback_Process_writeMessagePtr
#define ICE_API
Definition Config.h:197
#define ICE_MEMBER(API)
Definition Config.h:177
::Ice::AsyncResultPtr begin_shutdown(const ::Ice::Context &context, const ::Ice::CallbackPtr &cb, const ::Ice::LocalObjectPtr &cookie=0)
Initiate a graceful shut-down.
Definition Process.h:398
::Ice::AsyncResultPtr begin_writeMessage(const ::std::string &message, ::Ice::Int fd, const ::Ice::CallbackPtr &cb, const ::Ice::LocalObjectPtr &cookie=0)
Write a message on the process' stdout or stderr.
Definition Process.h:471
void shutdown(const ::Ice::Context &context=::Ice::noExplicitContext)
Initiate a graceful shut-down.
Definition Process.h:362
::Ice::AsyncResultPtr begin_writeMessage(const ::std::string &message, ::Ice::Int fd, const ::Ice::Callback_Process_writeMessagePtr &cb, const ::Ice::LocalObjectPtr &cookie=0)
Write a message on the process' stdout or stderr.
Definition Process.h:498
void writeMessage(const ::std::string &message, ::Ice::Int fd, const ::Ice::Context &context=::Ice::noExplicitContext)
Write a message on the process' stdout or stderr.
Definition Process.h:446
void end_shutdown(const ::Ice::AsyncResultPtr &result)
Completes an invocation of begin_shutdown.
::Ice::AsyncResultPtr begin_shutdown(const ::Ice::CallbackPtr &cb, const ::Ice::LocalObjectPtr &cookie=0)
Initiate a graceful shut-down.
Definition Process.h:385
::Ice::AsyncResultPtr begin_writeMessage(const ::std::string &message, ::Ice::Int fd, const ::Ice::Context &context, const ::Ice::Callback_Process_writeMessagePtr &cb, const ::Ice::LocalObjectPtr &cookie=0)
Write a message on the process' stdout or stderr.
Definition Process.h:512
::Ice::AsyncResultPtr begin_shutdown(const ::Ice::Context &context=::Ice::noExplicitContext)
Initiate a graceful shut-down.
Definition Process.h:373
::Ice::AsyncResultPtr begin_writeMessage(const ::std::string &message, ::Ice::Int fd, const ::Ice::Context &context=::Ice::noExplicitContext)
Write a message on the process' stdout or stderr.
Definition Process.h:458
::Ice::AsyncResultPtr begin_writeMessage(const ::std::string &message, ::Ice::Int fd, const ::Ice::Context &context, const ::Ice::CallbackPtr &cb, const ::Ice::LocalObjectPtr &cookie=0)
Write a message on the process' stdout or stderr.
Definition Process.h:485
static const ::std::string & ice_staticId()
Obtains the Slice type ID corresponding to this interface.
void end_writeMessage(const ::Ice::AsyncResultPtr &result)
Completes an invocation of begin_writeMessage.
::Ice::AsyncResultPtr begin_shutdown(const ::Ice::Callback_Process_shutdownPtr &cb, const ::Ice::LocalObjectPtr &cookie=0)
Initiate a graceful shut-down.
Definition Process.h:410
::Ice::AsyncResultPtr begin_shutdown(const ::Ice::Context &context, const ::Ice::Callback_Process_shutdownPtr &cb, const ::Ice::LocalObjectPtr &cookie=0)
Initiate a graceful shut-down.
Definition Process.h:423
T * get() const
Definition Handle.h:25
Shared & operator=(const Shared &)
Definition Shared.h:94
Type-safe asynchronous callback wrapper class used for calls to IceProxy::Ice::Process::begin_shutdow...
Definition Process.h:667
CallbackNC_Process_shutdown(const TPtr &obj, Response cb, Exception excb, Sent sentcb)
Definition Process.h:676
void(T::* Exception)(const ::Ice::Exception &)
Definition Process.h:672
IceUtil::Handle< T > TPtr
Definition Process.h:670
void(T::* Response)()
Definition Process.h:674
void(T::* Sent)(bool)
Definition Process.h:673
Type-safe asynchronous callback wrapper class used for calls to IceProxy::Ice::Process::begin_writeMe...
Definition Process.h:823
CallbackNC_Process_writeMessage(const TPtr &obj, Response cb, Exception excb, Sent sentcb)
Definition Process.h:832
void(T::* Sent)(bool)
Definition Process.h:829
void(T::* Exception)(const ::Ice::Exception &)
Definition Process.h:828
void(T::* Response)()
Definition Process.h:830
IceUtil::Handle< T > TPtr
Definition Process.h:826
Base class for asynchronous callback wrapper classes used for calls to IceProxy::Ice::Process::begin_...
Definition Process.h:334
Type-safe asynchronous callback wrapper class with cookie support used for calls to IceProxy::Ice::Pr...
Definition Process.h:743
void(T::* Response)(const CT &)
Definition Process.h:750
IceUtil::Handle< T > TPtr
Definition Process.h:746
void(T::* Exception)(const ::Ice::Exception &, const CT &)
Definition Process.h:748
Callback_Process_shutdown(const TPtr &obj, Response cb, Exception excb, Sent sentcb)
Definition Process.h:752
void(T::* Sent)(bool, const CT &)
Definition Process.h:749
Base class for asynchronous callback wrapper classes used for calls to IceProxy::Ice::Process::begin_...
Definition Process.h:342
Type-safe asynchronous callback wrapper class with cookie support used for calls to IceProxy::Ice::Pr...
Definition Process.h:899
void(T::* Sent)(bool, const CT &)
Definition Process.h:905
IceUtil::Handle< T > TPtr
Definition Process.h:902
void(T::* Exception)(const ::Ice::Exception &, const CT &)
Definition Process.h:904
Callback_Process_writeMessage(const TPtr &obj, Response cb, Exception excb, Sent sentcb)
Definition Process.h:908
void(T::* Response)(const CT &)
Definition Process.h:906
The base class for servants.
Definition Object.h:193
Object()
Definition Object.h:331
Interface for output streams used to create a sequence of bytes from Slice types.
Definition OutputStream.h:28
An administrative interface for process management.
Definition Process.h:561
static const ::std::string & ice_staticId()
Obtains the Slice type ID corresponding to this class.
virtual void shutdown(const Current ¤t=emptyCurrent)=0
Initiate a graceful shut-down.
ProcessPrx ProxyType
Definition Process.h:564
virtual void writeMessage(const ::std::string &message, Int fd, const Current ¤t=emptyCurrent)=0
Write a message on the process' stdout or stderr.
ProcessPtr PointerType
Definition Process.h:565
virtual const ::std::string & ice_id(const Current ¤t=emptyCurrent) const
Obtains a Slice type ID representing the most-derived interface supported by this object.
virtual ::std::vector< ::std::string > ice_ids(const Current ¤t=emptyCurrent) const
Obtains a list of the Slice type IDs representing the interfaces supported by this object.
virtual bool ice_isA(const ::std::string &id, const Current ¤t=emptyCurrent) const
Determines whether this object supports an interface with the given Slice type ID.
Helper template that supplies proxy factory functions.
Definition Proxy.h:2904
Definition BuiltinSequences.h:113
Callback_Process_shutdownPtr newCallback_Process_shutdown(const IceUtil::Handle< T > &instance, void(T::*cb)(), void(T::*excb)(const ::Ice::Exception &), void(T::*sentcb)(bool)=0)
Creates a callback wrapper instance that delegates to your object.
Definition Process.h:691
const Context noExplicitContext
Marker value used to indicate that no explicit context was passed to a proxy invocation.
Definition ProxyHandle.h:51
IceInternal::Handle< Object > ObjectPtr
Definition ObjectF.h:21
int Int
The mapping for the Slice int type.
Definition Config.h:54
const Current emptyCurrent
A default-initialized Current instance.
::IceUtil::Handle< Callback_Process_writeMessage_Base > Callback_Process_writeMessagePtr
Definition Process.h:343
::IceInternal::Handle< Process > ProcessPtr
Definition Process.h:317
ProcessPrx ProcessPrxPtr
Definition Process.h:319
::IceInternal::ProxyHandle< ::IceProxy::Ice::Process > ProcessPrx
Definition Process.h:318
IceInternal::Handle< AsyncResult > AsyncResultPtr
Definition AsyncResultF.h:18
::IceUtil::Handle< Callback_Process_shutdown_Base > Callback_Process_shutdownPtr
Definition Process.h:335
IceUtil::Shared * upCast(::Ice::AsyncResult *)
Callback_Process_writeMessagePtr newCallback_Process_writeMessage(const IceUtil::Handle< T > &instance, void(T::*cb)(), void(T::*excb)(const ::Ice::Exception &), void(T::*sentcb)(bool)=0)
Creates a callback wrapper instance that delegates to your object.
Definition Process.h:847
Information about the current method invocation for servers.
Definition Current.h:259