16 #ifndef __IceGrid_UserAccountMapper_h__
17 #define __IceGrid_UserAccountMapper_h__
39 #ifndef ICE_IGNORE_VERSION
40 # if ICE_INT_VERSION / 100 != 307
41 # error Ice version mismatch!
43 # if ICE_INT_VERSION % 100 >= 50
44 # error Beta header file detected
46 # if ICE_INT_VERSION % 100 < 10
47 # error Ice patch level mismatch!
52 # if defined(ICE_STATIC_LIBS)
54 # elif defined(ICEGRID_API_EXPORTS)
55 # define ICEGRID_API ICE_DECLSPEC_EXPORT
57 # define ICEGRID_API ICE_DECLSPEC_IMPORT
61 #ifdef ICE_CPP11_MAPPING // C++11 mapping
66 class UserAccountMapper;
67 class UserAccountMapperPrx;
131 virtual bool ice_isA(::std::string
id, const ::Ice::Current& current)
const override;
138 virtual ::std::vector<::std::string>
ice_ids(const ::Ice::Current& current)
const override;
145 virtual ::std::string
ice_id(const ::Ice::Current& current)
const override;
166 virtual ::std::string
getUserAccount(::std::string user, const ::Ice::Current& current) = 0;
168 bool _iceD_getUserAccount(::IceInternal::Incoming&, const ::Ice::Current&);
172 virtual bool _iceDispatch(::IceInternal::Incoming&, const ::Ice::Current&)
override;
205 return _makePromiseOutgoing<::std::string>(
true,
this, &UserAccountMapperPrx::_iceI_getUserAccount, user, context).get();
219 template<
template<
typename>
class P = ::std::promise>
221 -> decltype(::std::declval<P<::std::string>>().get_future())
223 return _makePromiseOutgoing<::std::string, P>(
false,
this, &UserAccountMapperPrx::_iceI_getUserAccount, user, context);
240 ::std::function<void()>
242 ::std::function<
void(::std::string)> response,
243 ::std::function<
void(::std::exception_ptr)> ex =
nullptr,
244 ::std::function<
void(
bool)> sent =
nullptr,
247 return _makeLamdaOutgoing<::std::string>(std::move(response), std::move(ex), std::move(sent),
this, &IceGrid::UserAccountMapperPrx::_iceI_getUserAccount, user, context);
264 friend ::std::shared_ptr<UserAccountMapperPrx> IceInternal::createProxy<UserAccountMapperPrx>();
283 using UserAccountMapperPtr = ::std::shared_ptr<UserAccountMapper>;
284 using UserAccountMapperPrxPtr = ::std::shared_ptr<UserAccountMapperPrx>;
289 #else // C++98 mapping
297 class UserAccountMapper;
300 ICEGRID_API ::IceProxy::Ice::Object* upCast(UserAccountMapper*);
310 class UserAccountMapper;
312 ICEGRID_API ::Ice::Object* upCast(UserAccountMapper*);
314 typedef ::IceInternal::Handle< UserAccountMapper> UserAccountMapperPtr;
315 typedef ::IceInternal::ProxyHandle< ::IceProxy::IceGrid::UserAccountMapper> UserAccountMapperPrx;
316 typedef UserAccountMapperPrx UserAccountMapperPrxPtr;
318 ICEGRID_API void _icePatchObjectPtr(UserAccountMapperPtr&, const ::Ice::ObjectPtr&);
335 UserAccountNotFoundException() {}
337 #ifdef ICE_CPP11_COMPILER
338 UserAccountNotFoundException(
const UserAccountNotFoundException&) =
default;
339 virtual ~UserAccountNotFoundException();
341 virtual ~UserAccountNotFoundException() throw();
348 virtual ::std::string ice_id()
const;
353 virtual UserAccountNotFoundException* ice_clone()
const;
357 virtual void ice_throw()
const;
368 static UserAccountNotFoundException _iceS_UserAccountNotFoundException_init;
381 class Callback_UserAccountMapper_getUserAccount_Base :
public virtual ::IceInternal::CallbackBase { };
382 typedef ::IceUtil::Handle< Callback_UserAccountMapper_getUserAccount_Base> Callback_UserAccountMapper_getUserAccountPtr;
392 class ICE_CLASS(ICEGRID_API) UserAccountMapper :
public virtual ::Ice::Proxy<UserAccountMapper, ::IceProxy::Ice::Object>
411 return end_getUserAccount(_iceI_begin_getUserAccount(user, context, ::IceInternal::dummyCallback, 0,
true));
427 return _iceI_begin_getUserAccount(user, context, ::IceInternal::dummyCallback, 0);
442 ::Ice::AsyncResultPtr begin_getUserAccount(const ::std::string& user, const ::Ice::CallbackPtr& cb,
const ::Ice::LocalObjectPtr& cookie = 0)
462 return _iceI_begin_getUserAccount(user, context, cb, cookie);
477 ::Ice::AsyncResultPtr begin_getUserAccount(const ::std::string& user, const ::IceGrid::Callback_UserAccountMapper_getUserAccountPtr& cb,
const ::Ice::LocalObjectPtr& cookie = 0)
497 return _iceI_begin_getUserAccount(user, context, cb, cookie);
544 typedef UserAccountMapperPrx ProxyType;
545 typedef UserAccountMapperPtr PointerType;
547 virtual ~UserAccountMapper();
549 #ifdef ICE_CPP11_COMPILER
550 UserAccountMapper() =
default;
551 UserAccountMapper(
const UserAccountMapper&) =
default;
552 UserAccountMapper& operator=(
const UserAccountMapper&) =
default;
561 virtual bool ice_isA(const ::std::string&
id, const ::Ice::Current& current = ::
Ice::emptyCurrent)
const;
568 virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& current = ::
Ice::emptyCurrent)
const;
575 virtual const ::std::string& ice_id(const ::Ice::Current& current = ::
Ice::emptyCurrent)
const;
581 static const ::std::string& ice_staticId();
596 virtual ::std::string getUserAccount(const ::std::string& user, const ::Ice::Current& current = ::
Ice::emptyCurrent) = 0;
598 bool _iceD_getUserAccount(::IceInternal::Incoming&, const ::Ice::Current&);
602 virtual bool _iceDispatch(::IceInternal::Incoming&, const ::Ice::Current&);
614 inline bool operator==(
const UserAccountMapper& lhs,
const UserAccountMapper& rhs)
619 inline bool operator<(
const UserAccountMapper& lhs,
const UserAccountMapper& rhs)
634 static const StreamHelperCategory helper = StreamHelperCategoryUserException;
649 class CallbackNC_UserAccountMapper_getUserAccount :
public Callback_UserAccountMapper_getUserAccount_Base,
public ::IceInternal::TwowayCallbackNC<T>
656 typedef void (T::*Sent)(bool);
657 typedef void (T::*Response)(const ::std::string&);
659 CallbackNC_UserAccountMapper_getUserAccount(
const TPtr& obj, Response cb,
Exception excb, Sent sentcb)
660 : ::IceInternal::TwowayCallbackNC<T>(obj, cb != 0, excb, sentcb), _response(cb)
665 virtual void completed(const ::Ice::AsyncResultPtr& result)
const
671 ret = proxy->end_getUserAccount(result);
675 ::IceInternal::CallbackNC<T>::exception(result, ex);
680 (::IceInternal::CallbackNC<T>::_callback.get()->*_response)(ret);
698 template<
class T> Callback_UserAccountMapper_getUserAccountPtr
701 return new CallbackNC_UserAccountMapper_getUserAccount<T>(instance, cb, excb, sentcb);
712 template<
class T> Callback_UserAccountMapper_getUserAccountPtr
713 newCallback_UserAccountMapper_getUserAccount(T* instance,
void (T::*cb)(const ::std::string&),
void (T::*excb)(
const ::Ice::Exception&),
void (T::*sentcb)(
bool) = 0)
715 return new CallbackNC_UserAccountMapper_getUserAccount<T>(instance, cb, excb, sentcb);
723 template<
class T,
typename CT>
724 class Callback_UserAccountMapper_getUserAccount :
public Callback_UserAccountMapper_getUserAccount_Base,
public ::IceInternal::TwowayCallback<T, CT>
731 typedef void (T::*Sent)(bool ,
const CT&);
732 typedef void (T::*Response)(const ::std::string&,
const CT&);
734 Callback_UserAccountMapper_getUserAccount(
const TPtr& obj, Response cb,
Exception excb, Sent sentcb)
735 : ::IceInternal::TwowayCallback<T, CT>(obj, cb != 0, excb, sentcb), _response(cb)
740 virtual void completed(const ::Ice::AsyncResultPtr& result)
const
746 ret = proxy->end_getUserAccount(result);
750 ::IceInternal::Callback<T, CT>::exception(result, ex);
755 (::IceInternal::Callback<T, CT>::_callback.get()->*_response)(ret, CT::dynamicCast(result->getCookie()));
774 template<
class T,
typename CT> Callback_UserAccountMapper_getUserAccountPtr
775 newCallback_UserAccountMapper_getUserAccount(
const IceUtil::Handle<T>& instance,
void (T::*cb)(const ::std::string&,
const CT&),
void (T::*excb)(
const ::Ice::Exception&,
const CT&),
void (T::*sentcb)(
bool,
const CT&) = 0)
777 return new Callback_UserAccountMapper_getUserAccount<T, CT>(instance, cb, excb, sentcb);
789 template<
class T,
typename CT> Callback_UserAccountMapper_getUserAccountPtr
790 newCallback_UserAccountMapper_getUserAccount(T* instance,
void (T::*cb)(const ::std::string&,
const CT&),
void (T::*excb)(
const ::Ice::Exception&,
const CT&),
void (T::*sentcb)(
bool,
const CT&) = 0)
792 return new Callback_UserAccountMapper_getUserAccount<T, CT>(instance, cb, excb, sentcb);