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;
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 _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&);
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 _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;
286using ProcessPtr = ::std::shared_ptr<Process>;
287using ProcessPrxPtr = ::std::shared_ptr<ProcessPrx>;
302ICE_API void _readProxy(::Ice::InputStream*, ::IceInternal::ProxyHandle< Process>&);
317typedef ::IceInternal::Handle< Process> ProcessPtr;
318typedef ::IceInternal::ProxyHandle< ::IceProxy::Ice::Process>
ProcessPrx;
321ICE_API void _icePatchObjectPtr(ProcessPtr&,
const ObjectPtr&);
334class Callback_Process_shutdown_Base :
public virtual ::IceInternal::CallbackBase { };
335typedef ::IceUtil::Handle< Callback_Process_shutdown_Base> Callback_Process_shutdownPtr;
342class Callback_Process_writeMessage_Base :
public virtual ::IceInternal::CallbackBase { };
343typedef ::IceUtil::Handle< Callback_Process_writeMessage_Base> Callback_Process_writeMessagePtr;
353class 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);
385 ::Ice::AsyncResultPtr begin_shutdown(const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
398 ::Ice::AsyncResultPtr begin_shutdown(const ::Ice::Context& context, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
400 return _iceI_begin_shutdown(context, cb, cookie);
410 ::Ice::AsyncResultPtr begin_shutdown(const ::Ice::Callback_Process_shutdownPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
423 ::Ice::AsyncResultPtr begin_shutdown(const ::Ice::Context& context, const ::Ice::Callback_Process_shutdownPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
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);
471 ::Ice::AsyncResultPtr begin_writeMessage(const ::std::string& message,
::Ice::Int fd, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
485 ::Ice::AsyncResultPtr begin_writeMessage(const ::std::string& message,
::Ice::Int fd, const ::Ice::Context& context, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 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)
512 ::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)
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);
560class 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*);
637inline bool operator==(
const Process& lhs,
const Process& rhs)
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);
666class CallbackNC_Process_shutdown :
public Callback_Process_shutdown_Base,
public ::IceInternal::OnewayCallbackNC<T>
670 typedef IceUtil::Handle<T> TPtr;
672 typedef void (T::*Exception)(const ::Ice::Exception&);
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)
690template<
class T> Callback_Process_shutdownPtr
691newCallback_Process_shutdown(
const IceUtil::Handle<T>& instance,
void (T::*cb)(),
void (T::*excb)(const ::Ice::Exception&),
void (T::*sentcb)(
bool) = 0)
693 return new CallbackNC_Process_shutdown<T>(instance, cb, excb, sentcb);
703template<
class T> Callback_Process_shutdownPtr
704newCallback_Process_shutdown(
const IceUtil::Handle<T>& instance,
void (T::*excb)(const ::Ice::Exception&),
void (T::*sentcb)(
bool) = 0)
706 return new CallbackNC_Process_shutdown<T>(instance, 0, excb, sentcb);
717template<
class T> Callback_Process_shutdownPtr
718newCallback_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);
730template<
class T> Callback_Process_shutdownPtr
731newCallback_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);
741template<
class T,
typename CT>
742class Callback_Process_shutdown :
public Callback_Process_shutdown_Base,
public ::IceInternal::OnewayCallback<T, CT>
746 typedef IceUtil::Handle<T> TPtr;
748 typedef void (T::*Exception)(const ::Ice::Exception& ,
const 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)
767template<
class T,
typename CT> Callback_Process_shutdownPtr
768newCallback_Process_shutdown(
const IceUtil::Handle<T>& instance,
void (T::*cb)(
const CT&),
void (T::*excb)(const ::Ice::Exception&,
const CT&),
void (T::*sentcb)(
bool,
const CT&) = 0)
770 return new Callback_Process_shutdown<T, CT>(instance, cb, excb, sentcb);
781template<
class T,
typename CT> Callback_Process_shutdownPtr
782newCallback_Process_shutdown(
const IceUtil::Handle<T>& instance,
void (T::*excb)(const ::Ice::Exception&,
const CT&),
void (T::*sentcb)(
bool,
const CT&) = 0)
784 return new Callback_Process_shutdown<T, CT>(instance, 0, excb, sentcb);
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)
799 return new Callback_Process_shutdown<T, CT>(instance, cb, excb, sentcb);
810template<
class T,
typename CT> Callback_Process_shutdownPtr
811newCallback_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);
822class CallbackNC_Process_writeMessage :
public Callback_Process_writeMessage_Base,
public ::IceInternal::OnewayCallbackNC<T>
826 typedef IceUtil::Handle<T> TPtr;
828 typedef void (T::*Exception)(const ::Ice::Exception&);
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)
846template<
class T> Callback_Process_writeMessagePtr
847newCallback_Process_writeMessage(
const IceUtil::Handle<T>& instance,
void (T::*cb)(),
void (T::*excb)(const ::Ice::Exception&),
void (T::*sentcb)(
bool) = 0)
849 return new CallbackNC_Process_writeMessage<T>(instance, cb, excb, sentcb);
859template<
class T> Callback_Process_writeMessagePtr
860newCallback_Process_writeMessage(
const IceUtil::Handle<T>& instance,
void (T::*excb)(const ::Ice::Exception&),
void (T::*sentcb)(
bool) = 0)
862 return new CallbackNC_Process_writeMessage<T>(instance, 0, excb, sentcb);
873template<
class T> Callback_Process_writeMessagePtr
874newCallback_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);
886template<
class T> Callback_Process_writeMessagePtr
887newCallback_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);
897template<
class T,
typename CT>
898class Callback_Process_writeMessage :
public Callback_Process_writeMessage_Base,
public ::IceInternal::OnewayCallback<T, CT>
902 typedef IceUtil::Handle<T> TPtr;
904 typedef void (T::*Exception)(const ::Ice::Exception& ,
const 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)
923template<
class T,
typename CT> Callback_Process_writeMessagePtr
924newCallback_Process_writeMessage(
const IceUtil::Handle<T>& instance,
void (T::*cb)(
const CT&),
void (T::*excb)(const ::Ice::Exception&,
const CT&),
void (T::*sentcb)(
bool,
const CT&) = 0)
926 return new Callback_Process_writeMessage<T, CT>(instance, cb, excb, sentcb);
937template<
class T,
typename CT> Callback_Process_writeMessagePtr
938newCallback_Process_writeMessage(
const IceUtil::Handle<T>& instance,
void (T::*excb)(const ::Ice::Exception&,
const CT&),
void (T::*sentcb)(
bool,
const CT&) = 0)
940 return new Callback_Process_writeMessage<T, CT>(instance, 0, excb, sentcb);
952template<
class T,
typename CT> Callback_Process_writeMessagePtr
953newCallback_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);
966template<
class T,
typename CT> Callback_Process_writeMessagePtr
967newCallback_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);
#define ICE_API
Definition Config.h:197
#define ICE_MEMBER(API)
Definition Config.h:177
The base class for servants.
Definition Object.h:91
An administrative interface for process management.
Definition Process.h:160
auto writeMessageAsync(const ::std::string &message, int fd, const Context &context=noExplicitContext) -> decltype(::std::declval< P< void > >().get_future())
Write a message on the process' stdout or stderr.
Definition Process.h:227
void shutdown(const Context &context=noExplicitContext)
Initiate a graceful shut-down.
Definition Process.h:168
void writeMessage(const ::std::string &message, int fd, const Context &context=noExplicitContext)
Write a message on the process' stdout or stderr.
Definition Process.h:214
auto shutdownAsync(const Context &context=noExplicitContext) -> decltype(::std::declval< P< void > >().get_future())
Initiate a graceful shut-down.
Definition Process.h:180
static const ::std::string & ice_staticId()
Obtains the Slice type ID of this interface.
::std::function< void()> writeMessageAsync(const ::std::string &message, int fd, ::std::function< void()> response, ::std::function< void(::std::exception_ptr)> ex=nullptr, ::std::function< void(bool)> sent=nullptr, const Context &context=noExplicitContext)
Write a message on the process' stdout or stderr.
Definition Process.h:244
::std::function< void()> shutdownAsync(::std::function< void()> response, ::std::function< void(::std::exception_ptr)> ex=nullptr, ::std::function< void(bool)> sent=nullptr, const Context &context=noExplicitContext)
Initiate a graceful shut-down.
Definition Process.h:196
An administrative interface for process management.
Definition Process.h:84
static const ::std::string & ice_staticId()
Obtains the Slice type ID corresponding to this class.
virtual bool ice_isA(::std::string id, const Current ¤t) const override
Determines whether this object supports an interface with the given Slice type ID.
ProcessPrx ProxyType
Definition Process.h:87
virtual void shutdown(const Current ¤t)=0
Initiate a graceful shut-down.
virtual void writeMessage(::std::string message, int fd, const Current ¤t)=0
Write a message on the process' stdout or stderr.
virtual::std::string ice_id(const Current ¤t) const override
Obtains a Slice type ID representing the most-derived interface supported by this object.
virtual ::std::vector<::std::string > ice_ids(const Current ¤t) const override
Obtains a list of the Slice type IDs representing the interfaces supported by this object.
Helper template that supplies proxy factory functions.
Definition Proxy.h:1204
Definition BuiltinSequences.h:56
const Context noExplicitContext
Marker value used to indicate that no explicit context was passed to a proxy invocation.
int Int
The mapping for the Slice int type.
Definition Config.h:54
IceUtil::Shared * upCast(::Ice::LocalObject *)
::std::map<::std::string, ::std::string > Context
A request context.
Definition Current.h:68
IceInternal::Handle< LocalObject > LocalObjectPtr
Definition LocalObjectF.h:17
bool operator<(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition Comparable.h:136
bool operator==(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition Comparable.h:184
Information about the current method invocation for servers.
Definition Current.h:120