Ice 3.7 C++11 API Reference
UserAccountMapper.h
Go to the documentation of this file.
1 //
2 // Copyright (c) ZeroC, Inc. All rights reserved.
3 //
4 //
5 // Ice version 3.7.10
6 //
7 // <auto-generated>
8 //
9 // Generated from file `UserAccountMapper.ice'
10 //
11 // Warning: do not edit this file.
12 //
13 // </auto-generated>
14 //
15 
16 #ifndef __IceGrid_UserAccountMapper_h__
17 #define __IceGrid_UserAccountMapper_h__
18 
20 #include <Ice/ProxyF.h>
21 #include <Ice/ObjectF.h>
22 #include <Ice/ValueF.h>
23 #include <Ice/Exception.h>
24 #include <Ice/LocalObject.h>
25 #include <Ice/StreamHelpers.h>
26 #include <Ice/Comparable.h>
27 #include <Ice/Proxy.h>
28 #include <Ice/Object.h>
29 #include <Ice/GCObject.h>
30 #include <Ice/Value.h>
31 #include <Ice/Incoming.h>
32 #include <Ice/FactoryTableInit.h>
33 #include <IceUtil/ScopedArray.h>
34 #include <Ice/Optional.h>
35 #include <Ice/ExceptionHelpers.h>
36 #include <IceUtil/UndefSysMacros.h>
37 #include <IceGrid/Config.h>
38 
39 #ifndef ICE_IGNORE_VERSION
40 # if ICE_INT_VERSION / 100 != 307
41 # error Ice version mismatch!
42 # endif
43 # if ICE_INT_VERSION % 100 >= 50
44 # error Beta header file detected
45 # endif
46 # if ICE_INT_VERSION % 100 < 10
47 # error Ice patch level mismatch!
48 # endif
49 #endif
50 
51 #ifndef ICEGRID_API
52 # if defined(ICE_STATIC_LIBS)
53 # define ICEGRID_API
54 # elif defined(ICEGRID_API_EXPORTS)
55 # define ICEGRID_API ICE_DECLSPEC_EXPORT
56 # else
57 # define ICEGRID_API ICE_DECLSPEC_IMPORT
58 # endif
59 #endif
60 
61 #ifdef ICE_CPP11_MAPPING // C++11 mapping
62 
63 namespace IceGrid
64 {
65 
66 class UserAccountMapper;
67 class UserAccountMapperPrx;
68 
69 }
70 
71 namespace IceGrid
72 {
73 
79 class ICE_CLASS(ICEGRID_API) UserAccountNotFoundException : public ::Ice::UserExceptionHelper<UserAccountNotFoundException, ::Ice::UserException>
80 {
81 public:
82 
84 
86 
88 
93  std::tuple<> ice_tuple() const
94  {
95  return std::tie();
96  }
97 
102  ICE_MEMBER(ICEGRID_API) static const ::std::string& ice_staticId();
103 };
104 
106 static UserAccountNotFoundException _iceS_UserAccountNotFoundException_init;
108 
109 }
110 
111 namespace IceGrid
112 {
113 
120 {
121 public:
122 
124 
131  virtual bool ice_isA(::std::string id, const ::Ice::Current& current) const override;
132 
138  virtual ::std::vector<::std::string> ice_ids(const ::Ice::Current& current) const override;
139 
145  virtual ::std::string ice_id(const ::Ice::Current& current) const override;
146 
151  static const ::std::string& ice_staticId();
152 
166  virtual ::std::string getUserAccount(::std::string user, const ::Ice::Current& current) = 0;
168  bool _iceD_getUserAccount(::IceInternal::Incoming&, const ::Ice::Current&);
170 
172  virtual bool _iceDispatch(::IceInternal::Incoming&, const ::Ice::Current&) override;
174 };
175 
176 }
177 
178 namespace IceGrid
179 {
180 
186 class ICE_CLASS(ICEGRID_API) UserAccountMapperPrx : public virtual ::Ice::Proxy<UserAccountMapperPrx, ::Ice::ObjectPrx>
187 {
188 public:
189 
203  ::std::string getUserAccount(const ::std::string& user, const ::Ice::Context& context = ::Ice::noExplicitContext)
204  {
205  return _makePromiseOutgoing<::std::string>(true, this, &UserAccountMapperPrx::_iceI_getUserAccount, user, context).get();
206  }
207 
219  template<template<typename> class P = ::std::promise>
220  auto getUserAccountAsync(const ::std::string& user, const ::Ice::Context& context = ::Ice::noExplicitContext)
221  -> decltype(::std::declval<P<::std::string>>().get_future())
222  {
223  return _makePromiseOutgoing<::std::string, P>(false, this, &UserAccountMapperPrx::_iceI_getUserAccount, user, context);
224  }
225 
240  ::std::function<void()>
241  getUserAccountAsync(const ::std::string& user,
242  ::std::function<void(::std::string)> response,
243  ::std::function<void(::std::exception_ptr)> ex = nullptr,
244  ::std::function<void(bool)> sent = nullptr,
246  {
247  return _makeLamdaOutgoing<::std::string>(std::move(response), std::move(ex), std::move(sent), this, &IceGrid::UserAccountMapperPrx::_iceI_getUserAccount, user, context);
248  }
249 
251  ICE_MEMBER(ICEGRID_API) void _iceI_getUserAccount(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<::std::string>>&, const ::std::string&, const ::Ice::Context&);
253 
258  ICE_MEMBER(ICEGRID_API) static const ::std::string& ice_staticId();
259 
260 protected:
261 
263  UserAccountMapperPrx() = default;
264  friend ::std::shared_ptr<UserAccountMapperPrx> IceInternal::createProxy<UserAccountMapperPrx>();
265 
266  ICE_MEMBER(ICEGRID_API) virtual ::std::shared_ptr<::Ice::ObjectPrx> _newInstance() const override;
268 };
269 
270 }
271 
273 namespace Ice
274 {
275 
276 }
278 
280 namespace IceGrid
281 {
282 
283 using UserAccountMapperPtr = ::std::shared_ptr<UserAccountMapper>;
284 using UserAccountMapperPrxPtr = ::std::shared_ptr<UserAccountMapperPrx>;
285 
286 }
288 
289 #else // C++98 mapping
290 
291 namespace IceProxy
292 {
293 
294 namespace IceGrid
295 {
296 
297 class UserAccountMapper;
299 ICEGRID_API void _readProxy(::Ice::InputStream*, ::IceInternal::ProxyHandle< UserAccountMapper>&);
300 ICEGRID_API ::IceProxy::Ice::Object* upCast(UserAccountMapper*);
302 
303 }
304 
305 }
306 
307 namespace IceGrid
308 {
309 
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&);
320 
321 }
322 
323 namespace IceGrid
324 {
325 
331 class ICEGRID_API UserAccountNotFoundException : public ::Ice::UserException
332 {
333 public:
334 
335  UserAccountNotFoundException() {}
336 
337 #ifdef ICE_CPP11_COMPILER
338  UserAccountNotFoundException(const UserAccountNotFoundException&) = default;
339  virtual ~UserAccountNotFoundException();
340 #else
341  virtual ~UserAccountNotFoundException() throw();
342 #endif
343 
348  virtual ::std::string ice_id() const;
353  virtual UserAccountNotFoundException* ice_clone() const;
357  virtual void ice_throw() const;
358 
359 protected:
360 
362  virtual void _writeImpl(::Ice::OutputStream*) const;
363  virtual void _readImpl(::Ice::InputStream*);
365 };
366 
368 static UserAccountNotFoundException _iceS_UserAccountNotFoundException_init;
370 
371 }
372 
373 namespace IceGrid
374 {
375 
381 class Callback_UserAccountMapper_getUserAccount_Base : public virtual ::IceInternal::CallbackBase { };
382 typedef ::IceUtil::Handle< Callback_UserAccountMapper_getUserAccount_Base> Callback_UserAccountMapper_getUserAccountPtr;
383 
384 }
385 
386 namespace IceProxy
387 {
388 
389 namespace IceGrid
390 {
391 
392 class ICE_CLASS(ICEGRID_API) UserAccountMapper : public virtual ::Ice::Proxy<UserAccountMapper, ::IceProxy::Ice::Object>
393 {
394 public:
395 
409  ICE_MEMBER(ICEGRID_API) ::std::string getUserAccount(const ::std::string& user, const ::Ice::Context& context = ::Ice::noExplicitContext)
410  {
411  return end_getUserAccount(_iceI_begin_getUserAccount(user, context, ::IceInternal::dummyCallback, 0, true));
412  }
413 
425  ::Ice::AsyncResultPtr begin_getUserAccount(const ::std::string& user, const ::Ice::Context& context = ::Ice::noExplicitContext)
426  {
427  return _iceI_begin_getUserAccount(user, context, ::IceInternal::dummyCallback, 0);
428  }
429 
442  ::Ice::AsyncResultPtr begin_getUserAccount(const ::std::string& user, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
443  {
444  return _iceI_begin_getUserAccount(user, ::Ice::noExplicitContext, cb, cookie);
445  }
446 
460  ::Ice::AsyncResultPtr begin_getUserAccount(const ::std::string& user, const ::Ice::Context& context, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
461  {
462  return _iceI_begin_getUserAccount(user, context, cb, cookie);
463  }
464 
477  ::Ice::AsyncResultPtr begin_getUserAccount(const ::std::string& user, const ::IceGrid::Callback_UserAccountMapper_getUserAccountPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
478  {
479  return _iceI_begin_getUserAccount(user, ::Ice::noExplicitContext, cb, cookie);
480  }
481 
495  ::Ice::AsyncResultPtr begin_getUserAccount(const ::std::string& user, const ::Ice::Context& context, const ::IceGrid::Callback_UserAccountMapper_getUserAccountPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
496  {
497  return _iceI_begin_getUserAccount(user, context, cb, cookie);
498  }
499 
507  ICE_MEMBER(ICEGRID_API) ::std::string end_getUserAccount(const ::Ice::AsyncResultPtr& result);
508 
509 private:
510 
511  ICE_MEMBER(ICEGRID_API) ::Ice::AsyncResultPtr _iceI_begin_getUserAccount(const ::std::string&, const ::Ice::Context&, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& cookie = 0, bool sync = false);
512 
513 public:
514 
519  ICE_MEMBER(ICEGRID_API) static const ::std::string& ice_staticId();
520 
521 protected:
523 
524  ICE_MEMBER(ICEGRID_API) virtual ::IceProxy::Ice::Object* _newInstance() const;
526 };
527 
528 }
529 
530 }
531 
532 namespace IceGrid
533 {
534 
540 class ICEGRID_API UserAccountMapper : public virtual ::Ice::Object
541 {
542 public:
543 
544  typedef UserAccountMapperPrx ProxyType;
545  typedef UserAccountMapperPtr PointerType;
546 
547  virtual ~UserAccountMapper();
548 
549 #ifdef ICE_CPP11_COMPILER
550  UserAccountMapper() = default;
551  UserAccountMapper(const UserAccountMapper&) = default;
552  UserAccountMapper& operator=(const UserAccountMapper&) = default;
553 #endif
554 
561  virtual bool ice_isA(const ::std::string& id, const ::Ice::Current& current = ::Ice::emptyCurrent) const;
562 
568  virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& current = ::Ice::emptyCurrent) const;
569 
575  virtual const ::std::string& ice_id(const ::Ice::Current& current = ::Ice::emptyCurrent) const;
576 
581  static const ::std::string& ice_staticId();
582 
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&);
600 
602  virtual bool _iceDispatch(::IceInternal::Incoming&, const ::Ice::Current&);
604 
605 protected:
606 
608  virtual void _iceWriteImpl(::Ice::OutputStream*) const;
609  virtual void _iceReadImpl(::Ice::InputStream*);
611 };
612 
614 inline bool operator==(const UserAccountMapper& lhs, const UserAccountMapper& rhs)
615 {
616  return static_cast<const ::Ice::Object&>(lhs) == static_cast<const ::Ice::Object&>(rhs);
617 }
618 
619 inline bool operator<(const UserAccountMapper& lhs, const UserAccountMapper& rhs)
620 {
621  return static_cast<const ::Ice::Object&>(lhs) < static_cast<const ::Ice::Object&>(rhs);
622 }
624 
625 }
626 
628 namespace Ice
629 {
630 
631 template<>
632 struct StreamableTraits< ::IceGrid::UserAccountNotFoundException>
633 {
634  static const StreamHelperCategory helper = StreamHelperCategoryUserException;
635 };
636 
637 }
639 
640 namespace IceGrid
641 {
642 
648 template<class T>
649 class CallbackNC_UserAccountMapper_getUserAccount : public Callback_UserAccountMapper_getUserAccount_Base, public ::IceInternal::TwowayCallbackNC<T>
650 {
651 public:
652 
653  typedef IceUtil::Handle<T> TPtr;
654 
655  typedef void (T::*Exception)(const ::Ice::Exception&);
656  typedef void (T::*Sent)(bool);
657  typedef void (T::*Response)(const ::std::string&);
658 
659  CallbackNC_UserAccountMapper_getUserAccount(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
660  : ::IceInternal::TwowayCallbackNC<T>(obj, cb != 0, excb, sentcb), _response(cb)
661  {
662  }
663 
665  virtual void completed(const ::Ice::AsyncResultPtr& result) const
666  {
667  UserAccountMapperPrx proxy = UserAccountMapperPrx::uncheckedCast(result->getProxy());
668  ::std::string ret;
669  try
670  {
671  ret = proxy->end_getUserAccount(result);
672  }
673  catch(const ::Ice::Exception& ex)
674  {
675  ::IceInternal::CallbackNC<T>::exception(result, ex);
676  return;
677  }
678  if(_response)
679  {
680  (::IceInternal::CallbackNC<T>::_callback.get()->*_response)(ret);
681  }
682  }
684 
685 private:
686 
687  Response _response;
688 };
689 
698 template<class T> Callback_UserAccountMapper_getUserAccountPtr
699 newCallback_UserAccountMapper_getUserAccount(const IceUtil::Handle<T>& instance, void (T::*cb)(const ::std::string&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
700 {
701  return new CallbackNC_UserAccountMapper_getUserAccount<T>(instance, cb, excb, sentcb);
702 }
703 
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)
714 {
715  return new CallbackNC_UserAccountMapper_getUserAccount<T>(instance, cb, excb, sentcb);
716 }
717 
723 template<class T, typename CT>
724 class Callback_UserAccountMapper_getUserAccount : public Callback_UserAccountMapper_getUserAccount_Base, public ::IceInternal::TwowayCallback<T, CT>
725 {
726 public:
727 
728  typedef IceUtil::Handle<T> TPtr;
729 
730  typedef void (T::*Exception)(const ::Ice::Exception& , const CT&);
731  typedef void (T::*Sent)(bool , const CT&);
732  typedef void (T::*Response)(const ::std::string&, const CT&);
733 
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)
736  {
737  }
738 
740  virtual void completed(const ::Ice::AsyncResultPtr& result) const
741  {
742  UserAccountMapperPrx proxy = UserAccountMapperPrx::uncheckedCast(result->getProxy());
743  ::std::string ret;
744  try
745  {
746  ret = proxy->end_getUserAccount(result);
747  }
748  catch(const ::Ice::Exception& ex)
749  {
750  ::IceInternal::Callback<T, CT>::exception(result, ex);
751  return;
752  }
753  if(_response)
754  {
755  (::IceInternal::Callback<T, CT>::_callback.get()->*_response)(ret, CT::dynamicCast(result->getCookie()));
756  }
757  }
759 
760 private:
761 
762  Response _response;
763 };
764 
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)
776 {
777  return new Callback_UserAccountMapper_getUserAccount<T, CT>(instance, cb, excb, sentcb);
778 }
779 
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)
791 {
792  return new Callback_UserAccountMapper_getUserAccount<T, CT>(instance, cb, excb, sentcb);
793 }
794 
795 }
796 
797 #endif
798 
800 #endif
IceGrid::UserAccountNotFoundException
This exception is raised if a user account for a given session identifier can't be found.
Definition: UserAccountMapper.h:80
IceGrid::UserAccountNotFoundException::ice_tuple
std::tuple ice_tuple() const
Obtains a tuple containing all of the exception's data members.
Definition: UserAccountMapper.h:93
Ice::LocalObjectPtr
IceInternal::Handle< LocalObject > LocalObjectPtr
Definition: LocalObjectF.h:17
Optional.h
ICEGRID_API
#define ICEGRID_API
Definition: UserAccountMapper.h:57
IceGrid::UserAccountMapperPrx::getUserAccount
::std::string getUserAccount(const ::std::string &user, const ::Ice::Context &context=::Ice::noExplicitContext)
Get the name of the user account for the given user.
Definition: UserAccountMapper.h:203
Ice::Context
::std::map<::std::string, ::std::string > Context
A request context.
Definition: Current.h:68
Ice::InputStream
Interface for input streams used to extract Slice types from a sequence of bytes.
Definition: InputStream.h:50
Ice::emptyCurrent
const Current emptyCurrent
A default-initialized Current instance.
StreamHelpers.h
Ice::Object
The base class for servants.
Definition: Object.h:91
Ice::operator==
bool operator==(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition: Comparable.h:184
Ice::Exception
IceUtil::Exception Exception
Definition: Exception.h:20
IceGrid::UserAccountNotFoundException::~UserAccountNotFoundException
virtual ~UserAccountNotFoundException()
GCObject.h
Incoming.h
IceGrid::UserAccountMapperPrx::ice_staticId
static const ::std::string & ice_staticId()
Obtains the Slice type ID of this interface.
Ice::UserExceptionHelper
Helper template for the implementation of Ice::UserException.
Definition: ExceptionHelpers.h:39
ICE_MEMBER
#define ICE_MEMBER(API)
Definition: Config.h:177
FactoryTableInit.h
IceGrid::UserAccountMapperPrx
A user account mapper object is used by IceGrid nodes to map session identifiers to user accounts.
Definition: UserAccountMapper.h:187
LocalObject.h
PushDisableWarnings.h
ProxyF.h
Ice::operator<
bool operator<(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition: Comparable.h:136
IceGrid::UserAccountMapper
A user account mapper object is used by IceGrid nodes to map session identifiers to user accounts.
Definition: UserAccountMapper.h:120
IceGrid::UserAccountMapperPrx::getUserAccountAsync
auto getUserAccountAsync(const ::std::string &user, const ::Ice::Context &context=::Ice::noExplicitContext) -> decltype(::std::declval< P<::std::string >>().get_future())
Get the name of the user account for the given user.
Definition: UserAccountMapper.h:220
IceGrid::UserAccountNotFoundException::UserAccountNotFoundException
UserAccountNotFoundException(const UserAccountNotFoundException &)=default
Object.h
Proxy.h
UndefSysMacros.h
Ice::OutputStream
Interface for output streams used to create a sequence of bytes from Slice types.
Definition: OutputStream.h:28
ObjectF.h
IceGrid::UserAccountMapper::ice_staticId
static const ::std::string & ice_staticId()
Obtains the Slice type ID corresponding to this class.
Ice
Definition: BuiltinSequences.h:56
IceGrid::UserAccountNotFoundException::ice_staticId
static const ::std::string & ice_staticId()
Obtains the Slice type ID of this exception.
IceUtil::Handle
Definition: Handle.h:143
ExceptionHelpers.h
IceGrid::UserAccountMapper::getUserAccount
virtual ::std::string getUserAccount(::std::string user, const ::Ice::Current &current)=0
Get the name of the user account for the given user.
IceGrid::UserAccountNotFoundException::UserAccountNotFoundException
UserAccountNotFoundException()=default
Ice::uncheckedCast
::std::shared_ptr< P > uncheckedCast(const ::std::shared_ptr< T > &b)
Downcasts a proxy without confirming the target object's type via a remote invocation.
Definition: Proxy.h:1549
Config.h
Comparable.h
ScopedArray.h
IceGrid::UserAccountMapper::ice_isA
virtual bool ice_isA(::std::string id, const ::Ice::Current &current) const override
Determines whether this object supports an interface with the given Slice type ID.
IceGrid
Definition: Admin.h:73
Ice::Proxy
Helper template that supplies proxy factory functions.
Definition: Proxy.h:1204
Exception.h
ValueF.h
IceGrid::UserAccountMapperPrx::getUserAccountAsync
::std::function< void()> getUserAccountAsync(const ::std::string &user, ::std::function< void(::std::string)> response, ::std::function< void(::std::exception_ptr)> ex=nullptr, ::std::function< void(bool)> sent=nullptr, const ::Ice::Context &context=::Ice::noExplicitContext)
Get the name of the user account for the given user.
Definition: UserAccountMapper.h:241
IceGrid::UserAccountMapper::ice_id
virtual ::std::string ice_id(const ::Ice::Current &current) const override
Obtains a Slice type ID representing the most-derived interface supported by this object.
Ice::noExplicitContext
const Context noExplicitContext
Marker value used to indicate that no explicit context was passed to a proxy invocation.
Value.h
IceGrid::UserAccountMapper::ice_ids
virtual ::std::vector<::std::string > ice_ids(const ::Ice::Current &current) const override
Obtains a list of the Slice type IDs representing the interfaces supported by this object.
Ice::UserException
Base class for all Ice user exceptions.
Definition: Exception.h:68
PopDisableWarnings.h