Ice 3.7 C++11 API Reference
Session.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 `Session.ice'
10 //
11 // Warning: do not edit this file.
12 //
13 // </auto-generated>
14 //
15 
16 #ifndef __IceGrid_Session_h__
17 #define __IceGrid_Session_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/IncomingAsync.h>
33 #include <Ice/FactoryTableInit.h>
34 #include <IceUtil/ScopedArray.h>
35 #include <Ice/Optional.h>
36 #include <Ice/ExceptionHelpers.h>
37 #include <Ice/SlicedDataF.h>
38 #include <Glacier2/Session.h>
39 #include <IceGrid/Exception.h>
40 #include <IceUtil/UndefSysMacros.h>
41 #include <IceGrid/Config.h>
42 
43 #ifndef ICE_IGNORE_VERSION
44 # if ICE_INT_VERSION / 100 != 307
45 # error Ice version mismatch!
46 # endif
47 # if ICE_INT_VERSION % 100 >= 50
48 # error Beta header file detected
49 # endif
50 # if ICE_INT_VERSION % 100 < 10
51 # error Ice patch level mismatch!
52 # endif
53 #endif
54 
55 #ifndef ICEGRID_API
56 # if defined(ICE_STATIC_LIBS)
57 # define ICEGRID_API
58 # elif defined(ICEGRID_API_EXPORTS)
59 # define ICEGRID_API ICE_DECLSPEC_EXPORT
60 # else
61 # define ICEGRID_API ICE_DECLSPEC_IMPORT
62 # endif
63 #endif
64 
65 #ifdef ICE_CPP11_MAPPING // C++11 mapping
66 
67 namespace IceGrid
68 {
69 
70 class Session;
71 class SessionPrx;
72 
73 }
74 
75 namespace IceGrid
76 {
77 
86 class ICEGRID_API Session : public virtual ::Glacier2::Session
87 {
88 public:
89 
91 
98  virtual bool ice_isA(::std::string id, const ::Ice::Current& current) const override;
99 
105  virtual ::std::vector<::std::string> ice_ids(const ::Ice::Current& current) const override;
106 
112  virtual ::std::string ice_id(const ::Ice::Current& current) const override;
113 
118  static const ::std::string& ice_staticId();
119 
126  virtual void keepAlive(const ::Ice::Current& current) = 0;
128  bool _iceD_keepAlive(::IceInternal::Incoming&, const ::Ice::Current&);
130 
146  virtual void allocateObjectByIdAsync(::Ice::Identity id, ::std::function<void(const ::std::shared_ptr<::Ice::ObjectPrx>& returnValue)> response, ::std::function<void(::std::exception_ptr)> exception, const ::Ice::Current& current) = 0;
148  bool _iceD_allocateObjectById(::IceInternal::Incoming&, const ::Ice::Current&);
150 
163  virtual void allocateObjectByTypeAsync(::std::string type, ::std::function<void(const ::std::shared_ptr<::Ice::ObjectPrx>& returnValue)> response, ::std::function<void(::std::exception_ptr)> exception, const ::Ice::Current& current) = 0;
165  bool _iceD_allocateObjectByType(::IceInternal::Incoming&, const ::Ice::Current&);
167 
179  virtual void releaseObject(::Ice::Identity id, const ::Ice::Current& current) = 0;
181  bool _iceD_releaseObject(::IceInternal::Incoming&, const ::Ice::Current&);
183 
192  virtual void setAllocationTimeout(int timeout, const ::Ice::Current& current) = 0;
194  bool _iceD_setAllocationTimeout(::IceInternal::Incoming&, const ::Ice::Current&);
196 
198  virtual bool _iceDispatch(::IceInternal::Incoming&, const ::Ice::Current&) override;
200 };
201 
202 }
203 
204 namespace IceGrid
205 {
206 
215 class ICE_CLASS(ICEGRID_API) SessionPrx : public virtual ::Ice::Proxy<SessionPrx, ::Glacier2::SessionPrx>
216 {
217 public:
218 
226  {
227  _makePromiseOutgoing<void>(true, this, &SessionPrx::_iceI_keepAlive, context).get();
228  }
229 
237  template<template<typename> class P = ::std::promise>
239  -> decltype(::std::declval<P<void>>().get_future())
240  {
241  return _makePromiseOutgoing<void, P>(false, this, &SessionPrx::_iceI_keepAlive, context);
242  }
243 
254  ::std::function<void()>
255  keepAliveAsync(::std::function<void()> response,
256  ::std::function<void(::std::exception_ptr)> ex = nullptr,
257  ::std::function<void(bool)> sent = nullptr,
259  {
260  return _makeLamdaOutgoing<void>(std::move(response), std::move(ex), std::move(sent), this, &IceGrid::SessionPrx::_iceI_keepAlive, context);
261  }
262 
264  ICE_MEMBER(ICEGRID_API) void _iceI_keepAlive(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<void>>&, const ::Ice::Context&);
266 
281  ::std::shared_ptr<::Ice::ObjectPrx> allocateObjectById(const ::Ice::Identity& id, const ::Ice::Context& context = ::Ice::noExplicitContext)
282  {
283  return _makePromiseOutgoing<::std::shared_ptr<::Ice::ObjectPrx>>(true, this, &SessionPrx::_iceI_allocateObjectById, id, context).get();
284  }
285 
296  template<template<typename> class P = ::std::promise>
297  auto allocateObjectByIdAsync(const ::Ice::Identity& id, const ::Ice::Context& context = ::Ice::noExplicitContext)
298  -> decltype(::std::declval<P<::std::shared_ptr<::Ice::ObjectPrx>>>().get_future())
299  {
300  return _makePromiseOutgoing<::std::shared_ptr<::Ice::ObjectPrx>, P>(false, this, &SessionPrx::_iceI_allocateObjectById, id, context);
301  }
302 
316  ::std::function<void()>
317  allocateObjectByIdAsync(const ::Ice::Identity& id,
318  ::std::function<void(::std::shared_ptr<::Ice::ObjectPrx>)> response,
319  ::std::function<void(::std::exception_ptr)> ex = nullptr,
320  ::std::function<void(bool)> sent = nullptr,
322  {
323  return _makeLamdaOutgoing<::std::shared_ptr<::Ice::ObjectPrx>>(std::move(response), std::move(ex), std::move(sent), this, &IceGrid::SessionPrx::_iceI_allocateObjectById, id, context);
324  }
325 
327  ICE_MEMBER(ICEGRID_API) void _iceI_allocateObjectById(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<::std::shared_ptr<::Ice::ObjectPrx>>>&, const ::Ice::Identity&, const ::Ice::Context&);
329 
341  ::std::shared_ptr<::Ice::ObjectPrx> allocateObjectByType(const ::std::string& type, const ::Ice::Context& context = ::Ice::noExplicitContext)
342  {
343  return _makePromiseOutgoing<::std::shared_ptr<::Ice::ObjectPrx>>(true, this, &SessionPrx::_iceI_allocateObjectByType, type, context).get();
344  }
345 
356  template<template<typename> class P = ::std::promise>
357  auto allocateObjectByTypeAsync(const ::std::string& type, const ::Ice::Context& context = ::Ice::noExplicitContext)
358  -> decltype(::std::declval<P<::std::shared_ptr<::Ice::ObjectPrx>>>().get_future())
359  {
360  return _makePromiseOutgoing<::std::shared_ptr<::Ice::ObjectPrx>, P>(false, this, &SessionPrx::_iceI_allocateObjectByType, type, context);
361  }
362 
376  ::std::function<void()>
377  allocateObjectByTypeAsync(const ::std::string& type,
378  ::std::function<void(::std::shared_ptr<::Ice::ObjectPrx>)> response,
379  ::std::function<void(::std::exception_ptr)> ex = nullptr,
380  ::std::function<void(bool)> sent = nullptr,
382  {
383  return _makeLamdaOutgoing<::std::shared_ptr<::Ice::ObjectPrx>>(std::move(response), std::move(ex), std::move(sent), this, &IceGrid::SessionPrx::_iceI_allocateObjectByType, type, context);
384  }
385 
387  ICE_MEMBER(ICEGRID_API) void _iceI_allocateObjectByType(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<::std::shared_ptr<::Ice::ObjectPrx>>>&, const ::std::string&, const ::Ice::Context&);
389 
401  void releaseObject(const ::Ice::Identity& id, const ::Ice::Context& context = ::Ice::noExplicitContext)
402  {
403  _makePromiseOutgoing<void>(true, this, &SessionPrx::_iceI_releaseObject, id, context).get();
404  }
405 
413  template<template<typename> class P = ::std::promise>
414  auto releaseObjectAsync(const ::Ice::Identity& id, const ::Ice::Context& context = ::Ice::noExplicitContext)
415  -> decltype(::std::declval<P<void>>().get_future())
416  {
417  return _makePromiseOutgoing<void, P>(false, this, &SessionPrx::_iceI_releaseObject, id, context);
418  }
419 
430  ::std::function<void()>
431  releaseObjectAsync(const ::Ice::Identity& id,
432  ::std::function<void()> response,
433  ::std::function<void(::std::exception_ptr)> ex = nullptr,
434  ::std::function<void(bool)> sent = nullptr,
436  {
437  return _makeLamdaOutgoing<void>(std::move(response), std::move(ex), std::move(sent), this, &IceGrid::SessionPrx::_iceI_releaseObject, id, context);
438  }
439 
441  ICE_MEMBER(ICEGRID_API) void _iceI_releaseObject(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<void>>&, const ::Ice::Identity&, const ::Ice::Context&);
443 
453  {
454  _makePromiseOutgoing<void>(true, this, &SessionPrx::_iceI_setAllocationTimeout, timeout, context).get();
455  }
456 
466  template<template<typename> class P = ::std::promise>
468  -> decltype(::std::declval<P<void>>().get_future())
469  {
470  return _makePromiseOutgoing<void, P>(false, this, &SessionPrx::_iceI_setAllocationTimeout, timeout, context);
471  }
472 
485  ::std::function<void()>
487  ::std::function<void()> response,
488  ::std::function<void(::std::exception_ptr)> ex = nullptr,
489  ::std::function<void(bool)> sent = nullptr,
491  {
492  return _makeLamdaOutgoing<void>(std::move(response), std::move(ex), std::move(sent), this, &IceGrid::SessionPrx::_iceI_setAllocationTimeout, timeout, context);
493  }
494 
496  ICE_MEMBER(ICEGRID_API) void _iceI_setAllocationTimeout(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<void>>&, int, const ::Ice::Context&);
498 
503  ICE_MEMBER(ICEGRID_API) static const ::std::string& ice_staticId();
504 
505 protected:
506 
508  SessionPrx() = default;
509  friend ::std::shared_ptr<SessionPrx> IceInternal::createProxy<SessionPrx>();
510 
511  ICE_MEMBER(ICEGRID_API) virtual ::std::shared_ptr<::Ice::ObjectPrx> _newInstance() const override;
513 };
514 
515 }
516 
518 namespace Ice
519 {
520 
521 }
523 
525 namespace IceGrid
526 {
527 
528 using SessionPtr = ::std::shared_ptr<Session>;
529 using SessionPrxPtr = ::std::shared_ptr<SessionPrx>;
530 
531 }
533 
534 #else // C++98 mapping
535 
536 namespace IceProxy
537 {
538 
539 namespace IceGrid
540 {
541 
542 class Session;
544 ICEGRID_API void _readProxy(::Ice::InputStream*, ::IceInternal::ProxyHandle< Session>&);
545 ICEGRID_API ::IceProxy::Ice::Object* upCast(Session*);
547 
548 }
549 
550 }
551 
552 namespace IceGrid
553 {
554 
555 class Session;
557 ICEGRID_API ::Ice::Object* upCast(Session*);
559 typedef ::IceInternal::Handle< Session> SessionPtr;
560 typedef ::IceInternal::ProxyHandle< ::IceProxy::IceGrid::Session> SessionPrx;
561 typedef SessionPrx SessionPrxPtr;
563 ICEGRID_API void _icePatchObjectPtr(SessionPtr&, const ::Ice::ObjectPtr&);
565 
566 }
567 
568 namespace IceGrid
569 {
570 
576 class ICEGRID_API AMD_Session_allocateObjectById : public virtual ::Ice::AMDCallback
577 {
578 public:
579 
580  virtual ~AMD_Session_allocateObjectById();
581 
586  virtual void ice_response(const ::Ice::ObjectPrx& result) = 0;
587 };
588 
589 typedef ::IceUtil::Handle< ::IceGrid::AMD_Session_allocateObjectById> AMD_Session_allocateObjectByIdPtr;
590 
596 class ICEGRID_API AMD_Session_allocateObjectByType : public virtual ::Ice::AMDCallback
597 {
598 public:
599 
600  virtual ~AMD_Session_allocateObjectByType();
601 
606  virtual void ice_response(const ::Ice::ObjectPrx& result) = 0;
607 };
608 
609 typedef ::IceUtil::Handle< ::IceGrid::AMD_Session_allocateObjectByType> AMD_Session_allocateObjectByTypePtr;
610 
611 }
612 
614 namespace IceAsync
615 {
616 
617 namespace IceGrid
618 {
619 
620 #if defined(_MSC_VER) && (_MSC_VER >= 1900)
621 # pragma warning(push)
622 # pragma warning(disable:4239)
623 #endif
624 
625 class ICEGRID_API AMD_Session_allocateObjectById : public ::IceGrid::AMD_Session_allocateObjectById, public ::IceInternal::IncomingAsync
626 {
627 public:
628 
629  AMD_Session_allocateObjectById(::IceInternal::Incoming&);
630 
631  virtual void ice_response(const ::Ice::ObjectPrx&);
632 };
633 
634 #if defined(_MSC_VER) && (_MSC_VER >= 1900)
635 # pragma warning(pop)
636 #endif
637 
638 #if defined(_MSC_VER) && (_MSC_VER >= 1900)
639 # pragma warning(push)
640 # pragma warning(disable:4239)
641 #endif
642 
643 class ICEGRID_API AMD_Session_allocateObjectByType : public ::IceGrid::AMD_Session_allocateObjectByType, public ::IceInternal::IncomingAsync
644 {
645 public:
646 
647  AMD_Session_allocateObjectByType(::IceInternal::Incoming&);
648 
649  virtual void ice_response(const ::Ice::ObjectPrx&);
650 };
651 
652 #if defined(_MSC_VER) && (_MSC_VER >= 1900)
653 # pragma warning(pop)
654 #endif
655 
656 }
657 
658 }
660 
661 namespace IceGrid
662 {
663 
669 class Callback_Session_keepAlive_Base : public virtual ::IceInternal::CallbackBase { };
670 typedef ::IceUtil::Handle< Callback_Session_keepAlive_Base> Callback_Session_keepAlivePtr;
671 
677 class Callback_Session_allocateObjectById_Base : public virtual ::IceInternal::CallbackBase { };
678 typedef ::IceUtil::Handle< Callback_Session_allocateObjectById_Base> Callback_Session_allocateObjectByIdPtr;
679 
685 class Callback_Session_allocateObjectByType_Base : public virtual ::IceInternal::CallbackBase { };
686 typedef ::IceUtil::Handle< Callback_Session_allocateObjectByType_Base> Callback_Session_allocateObjectByTypePtr;
687 
693 class Callback_Session_releaseObject_Base : public virtual ::IceInternal::CallbackBase { };
694 typedef ::IceUtil::Handle< Callback_Session_releaseObject_Base> Callback_Session_releaseObjectPtr;
695 
701 class Callback_Session_setAllocationTimeout_Base : public virtual ::IceInternal::CallbackBase { };
702 typedef ::IceUtil::Handle< Callback_Session_setAllocationTimeout_Base> Callback_Session_setAllocationTimeoutPtr;
703 
704 }
705 
706 namespace IceProxy
707 {
708 
709 namespace IceGrid
710 {
711 
712 class ICE_CLASS(ICEGRID_API) Session : public virtual ::Ice::Proxy<Session, ::IceProxy::Glacier2::Session>
713 {
714 public:
715 
723  {
724  end_keepAlive(_iceI_begin_keepAlive(context, ::IceInternal::dummyCallback, 0, true));
725  }
726 
734  ::Ice::AsyncResultPtr begin_keepAlive(const ::Ice::Context& context = ::Ice::noExplicitContext)
735  {
736  return _iceI_begin_keepAlive(context, ::IceInternal::dummyCallback, 0);
737  }
738 
747  ::Ice::AsyncResultPtr begin_keepAlive(const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
748  {
749  return _iceI_begin_keepAlive(::Ice::noExplicitContext, cb, cookie);
750  }
751 
761  ::Ice::AsyncResultPtr begin_keepAlive(const ::Ice::Context& context, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
762  {
763  return _iceI_begin_keepAlive(context, cb, cookie);
764  }
765 
774  ::Ice::AsyncResultPtr begin_keepAlive(const ::IceGrid::Callback_Session_keepAlivePtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
775  {
776  return _iceI_begin_keepAlive(::Ice::noExplicitContext, cb, cookie);
777  }
778 
788  ::Ice::AsyncResultPtr begin_keepAlive(const ::Ice::Context& context, const ::IceGrid::Callback_Session_keepAlivePtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
789  {
790  return _iceI_begin_keepAlive(context, cb, cookie);
791  }
792 
797  ICE_MEMBER(ICEGRID_API) void end_keepAlive(const ::Ice::AsyncResultPtr& result);
798 
799 private:
800 
801  ICE_MEMBER(ICEGRID_API) ::Ice::AsyncResultPtr _iceI_begin_keepAlive(const ::Ice::Context&, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& cookie = 0, bool sync = false);
802 
803 public:
804 
819  ICE_MEMBER(ICEGRID_API) ::Ice::ObjectPrx allocateObjectById(const ::Ice::Identity& id, const ::Ice::Context& context = ::Ice::noExplicitContext)
820  {
821  return end_allocateObjectById(_iceI_begin_allocateObjectById(id, context, ::IceInternal::dummyCallback, 0, true));
822  }
823 
834  ::Ice::AsyncResultPtr begin_allocateObjectById(const ::Ice::Identity& id, const ::Ice::Context& context = ::Ice::noExplicitContext)
835  {
836  return _iceI_begin_allocateObjectById(id, context, ::IceInternal::dummyCallback, 0);
837  }
838 
850  ::Ice::AsyncResultPtr begin_allocateObjectById(const ::Ice::Identity& id, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
851  {
852  return _iceI_begin_allocateObjectById(id, ::Ice::noExplicitContext, cb, cookie);
853  }
854 
867  ::Ice::AsyncResultPtr begin_allocateObjectById(const ::Ice::Identity& id, const ::Ice::Context& context, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
868  {
869  return _iceI_begin_allocateObjectById(id, context, cb, cookie);
870  }
871 
883  ::Ice::AsyncResultPtr begin_allocateObjectById(const ::Ice::Identity& id, const ::IceGrid::Callback_Session_allocateObjectByIdPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
884  {
885  return _iceI_begin_allocateObjectById(id, ::Ice::noExplicitContext, cb, cookie);
886  }
887 
900  ::Ice::AsyncResultPtr begin_allocateObjectById(const ::Ice::Identity& id, const ::Ice::Context& context, const ::IceGrid::Callback_Session_allocateObjectByIdPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
901  {
902  return _iceI_begin_allocateObjectById(id, context, cb, cookie);
903  }
904 
914  ICE_MEMBER(ICEGRID_API) ::Ice::ObjectPrx end_allocateObjectById(const ::Ice::AsyncResultPtr& result);
915 
916 private:
917 
918  ICE_MEMBER(ICEGRID_API) ::Ice::AsyncResultPtr _iceI_begin_allocateObjectById(const ::Ice::Identity&, const ::Ice::Context&, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& cookie = 0, bool sync = false);
919 
920 public:
921 
933  ICE_MEMBER(ICEGRID_API) ::Ice::ObjectPrx allocateObjectByType(const ::std::string& type, const ::Ice::Context& context = ::Ice::noExplicitContext)
934  {
935  return end_allocateObjectByType(_iceI_begin_allocateObjectByType(type, context, ::IceInternal::dummyCallback, 0, true));
936  }
937 
948  ::Ice::AsyncResultPtr begin_allocateObjectByType(const ::std::string& type, const ::Ice::Context& context = ::Ice::noExplicitContext)
949  {
950  return _iceI_begin_allocateObjectByType(type, context, ::IceInternal::dummyCallback, 0);
951  }
952 
964  ::Ice::AsyncResultPtr begin_allocateObjectByType(const ::std::string& type, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
965  {
966  return _iceI_begin_allocateObjectByType(type, ::Ice::noExplicitContext, cb, cookie);
967  }
968 
981  ::Ice::AsyncResultPtr begin_allocateObjectByType(const ::std::string& type, const ::Ice::Context& context, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
982  {
983  return _iceI_begin_allocateObjectByType(type, context, cb, cookie);
984  }
985 
997  ::Ice::AsyncResultPtr begin_allocateObjectByType(const ::std::string& type, const ::IceGrid::Callback_Session_allocateObjectByTypePtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
998  {
999  return _iceI_begin_allocateObjectByType(type, ::Ice::noExplicitContext, cb, cookie);
1000  }
1001 
1014  ::Ice::AsyncResultPtr begin_allocateObjectByType(const ::std::string& type, const ::Ice::Context& context, const ::IceGrid::Callback_Session_allocateObjectByTypePtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
1015  {
1016  return _iceI_begin_allocateObjectByType(type, context, cb, cookie);
1017  }
1018 
1025  ICE_MEMBER(ICEGRID_API) ::Ice::ObjectPrx end_allocateObjectByType(const ::Ice::AsyncResultPtr& result);
1026 
1027 private:
1028 
1029  ICE_MEMBER(ICEGRID_API) ::Ice::AsyncResultPtr _iceI_begin_allocateObjectByType(const ::std::string&, const ::Ice::Context&, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& cookie = 0, bool sync = false);
1030 
1031 public:
1032 
1044  ICE_MEMBER(ICEGRID_API) void releaseObject(const ::Ice::Identity& id, const ::Ice::Context& context = ::Ice::noExplicitContext)
1045  {
1046  end_releaseObject(_iceI_begin_releaseObject(id, context, ::IceInternal::dummyCallback, 0, true));
1047  }
1048 
1056  ::Ice::AsyncResultPtr begin_releaseObject(const ::Ice::Identity& id, const ::Ice::Context& context = ::Ice::noExplicitContext)
1057  {
1058  return _iceI_begin_releaseObject(id, context, ::IceInternal::dummyCallback, 0);
1059  }
1060 
1069  ::Ice::AsyncResultPtr begin_releaseObject(const ::Ice::Identity& id, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
1070  {
1071  return _iceI_begin_releaseObject(id, ::Ice::noExplicitContext, cb, cookie);
1072  }
1073 
1083  ::Ice::AsyncResultPtr begin_releaseObject(const ::Ice::Identity& id, const ::Ice::Context& context, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
1084  {
1085  return _iceI_begin_releaseObject(id, context, cb, cookie);
1086  }
1087 
1096  ::Ice::AsyncResultPtr begin_releaseObject(const ::Ice::Identity& id, const ::IceGrid::Callback_Session_releaseObjectPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
1097  {
1098  return _iceI_begin_releaseObject(id, ::Ice::noExplicitContext, cb, cookie);
1099  }
1100 
1110  ::Ice::AsyncResultPtr begin_releaseObject(const ::Ice::Identity& id, const ::Ice::Context& context, const ::IceGrid::Callback_Session_releaseObjectPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
1111  {
1112  return _iceI_begin_releaseObject(id, context, cb, cookie);
1113  }
1114 
1124  ICE_MEMBER(ICEGRID_API) void end_releaseObject(const ::Ice::AsyncResultPtr& result);
1125 
1126 private:
1127 
1128  ICE_MEMBER(ICEGRID_API) ::Ice::AsyncResultPtr _iceI_begin_releaseObject(const ::Ice::Identity&, const ::Ice::Context&, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& cookie = 0, bool sync = false);
1129 
1130 public:
1131 
1140  ICE_MEMBER(ICEGRID_API) void setAllocationTimeout(::Ice::Int timeout, const ::Ice::Context& context = ::Ice::noExplicitContext)
1141  {
1142  end_setAllocationTimeout(_iceI_begin_setAllocationTimeout(timeout, context, ::IceInternal::dummyCallback, 0, true));
1143  }
1144 
1154  ::Ice::AsyncResultPtr begin_setAllocationTimeout(::Ice::Int timeout, const ::Ice::Context& context = ::Ice::noExplicitContext)
1155  {
1156  return _iceI_begin_setAllocationTimeout(timeout, context, ::IceInternal::dummyCallback, 0);
1157  }
1158 
1169  ::Ice::AsyncResultPtr begin_setAllocationTimeout(::Ice::Int timeout, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
1170  {
1171  return _iceI_begin_setAllocationTimeout(timeout, ::Ice::noExplicitContext, cb, cookie);
1172  }
1173 
1185  ::Ice::AsyncResultPtr begin_setAllocationTimeout(::Ice::Int timeout, const ::Ice::Context& context, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
1186  {
1187  return _iceI_begin_setAllocationTimeout(timeout, context, cb, cookie);
1188  }
1189 
1200  ::Ice::AsyncResultPtr begin_setAllocationTimeout(::Ice::Int timeout, const ::IceGrid::Callback_Session_setAllocationTimeoutPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
1201  {
1202  return _iceI_begin_setAllocationTimeout(timeout, ::Ice::noExplicitContext, cb, cookie);
1203  }
1204 
1216  ::Ice::AsyncResultPtr begin_setAllocationTimeout(::Ice::Int timeout, const ::Ice::Context& context, const ::IceGrid::Callback_Session_setAllocationTimeoutPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
1217  {
1218  return _iceI_begin_setAllocationTimeout(timeout, context, cb, cookie);
1219  }
1220 
1225  ICE_MEMBER(ICEGRID_API) void end_setAllocationTimeout(const ::Ice::AsyncResultPtr& result);
1226 
1227 private:
1228 
1229  ICE_MEMBER(ICEGRID_API) ::Ice::AsyncResultPtr _iceI_begin_setAllocationTimeout(::Ice::Int, const ::Ice::Context&, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& cookie = 0, bool sync = false);
1230 
1231 public:
1232 
1237  ICE_MEMBER(ICEGRID_API) static const ::std::string& ice_staticId();
1238 
1239 protected:
1241 
1242  ICE_MEMBER(ICEGRID_API) virtual ::IceProxy::Ice::Object* _newInstance() const;
1244 };
1245 
1246 }
1247 
1248 }
1249 
1250 namespace IceGrid
1251 {
1252 
1261 class ICEGRID_API Session : virtual public ::Glacier2::Session
1262 {
1263 public:
1264 
1265  typedef SessionPrx ProxyType;
1266  typedef SessionPtr PointerType;
1267 
1268  virtual ~Session();
1269 
1270 #ifdef ICE_CPP11_COMPILER
1271  Session() = default;
1272  Session(const Session&) = default;
1273  Session& operator=(const Session&) = default;
1274 #endif
1275 
1282  virtual bool ice_isA(const ::std::string& id, const ::Ice::Current& current = ::Ice::emptyCurrent) const;
1283 
1289  virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& current = ::Ice::emptyCurrent) const;
1290 
1296  virtual const ::std::string& ice_id(const ::Ice::Current& current = ::Ice::emptyCurrent) const;
1297 
1302  static const ::std::string& ice_staticId();
1303 
1310  virtual void keepAlive(const ::Ice::Current& current = ::Ice::emptyCurrent) = 0;
1312  bool _iceD_keepAlive(::IceInternal::Incoming&, const ::Ice::Current&);
1314 
1329  virtual void allocateObjectById_async(const ::IceGrid::AMD_Session_allocateObjectByIdPtr& cb, const ::Ice::Identity& id, const ::Ice::Current& current = ::Ice::emptyCurrent) = 0;
1331  bool _iceD_allocateObjectById(::IceInternal::Incoming&, const ::Ice::Current&);
1333 
1345  virtual void allocateObjectByType_async(const ::IceGrid::AMD_Session_allocateObjectByTypePtr& cb, const ::std::string& type, const ::Ice::Current& current = ::Ice::emptyCurrent) = 0;
1347  bool _iceD_allocateObjectByType(::IceInternal::Incoming&, const ::Ice::Current&);
1349 
1361  virtual void releaseObject(const ::Ice::Identity& id, const ::Ice::Current& current = ::Ice::emptyCurrent) = 0;
1363  bool _iceD_releaseObject(::IceInternal::Incoming&, const ::Ice::Current&);
1365 
1374  virtual void setAllocationTimeout(::Ice::Int timeout, const ::Ice::Current& current = ::Ice::emptyCurrent) = 0;
1376  bool _iceD_setAllocationTimeout(::IceInternal::Incoming&, const ::Ice::Current&);
1378 
1380  virtual bool _iceDispatch(::IceInternal::Incoming&, const ::Ice::Current&);
1382 
1383 protected:
1384 
1386  virtual void _iceWriteImpl(::Ice::OutputStream*) const;
1387  virtual void _iceReadImpl(::Ice::InputStream*);
1389 };
1390 
1392 inline bool operator==(const Session& lhs, const Session& rhs)
1393 {
1394  return static_cast<const ::Ice::Object&>(lhs) == static_cast<const ::Ice::Object&>(rhs);
1395 }
1396 
1397 inline bool operator<(const Session& lhs, const Session& rhs)
1398 {
1399  return static_cast<const ::Ice::Object&>(lhs) < static_cast<const ::Ice::Object&>(rhs);
1400 }
1402 
1403 }
1404 
1406 namespace Ice
1407 {
1408 
1409 }
1411 
1412 namespace IceGrid
1413 {
1414 
1420 template<class T>
1421 class CallbackNC_Session_keepAlive : public Callback_Session_keepAlive_Base, public ::IceInternal::OnewayCallbackNC<T>
1422 {
1423 public:
1424 
1425  typedef IceUtil::Handle<T> TPtr;
1426 
1427  typedef void (T::*Exception)(const ::Ice::Exception&);
1428  typedef void (T::*Sent)(bool);
1429  typedef void (T::*Response)();
1430 
1431  CallbackNC_Session_keepAlive(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
1432  : ::IceInternal::OnewayCallbackNC<T>(obj, cb, excb, sentcb)
1433  {
1434  }
1435 };
1436 
1445 template<class T> Callback_Session_keepAlivePtr
1446 newCallback_Session_keepAlive(const IceUtil::Handle<T>& instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
1447 {
1448  return new CallbackNC_Session_keepAlive<T>(instance, cb, excb, sentcb);
1449 }
1450 
1458 template<class T> Callback_Session_keepAlivePtr
1459 newCallback_Session_keepAlive(const IceUtil::Handle<T>& instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
1460 {
1461  return new CallbackNC_Session_keepAlive<T>(instance, 0, excb, sentcb);
1462 }
1463 
1472 template<class T> Callback_Session_keepAlivePtr
1473 newCallback_Session_keepAlive(T* instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
1474 {
1475  return new CallbackNC_Session_keepAlive<T>(instance, cb, excb, sentcb);
1476 }
1477 
1485 template<class T> Callback_Session_keepAlivePtr
1486 newCallback_Session_keepAlive(T* instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
1487 {
1488  return new CallbackNC_Session_keepAlive<T>(instance, 0, excb, sentcb);
1489 }
1490 
1496 template<class T, typename CT>
1497 class Callback_Session_keepAlive : public Callback_Session_keepAlive_Base, public ::IceInternal::OnewayCallback<T, CT>
1498 {
1499 public:
1500 
1501  typedef IceUtil::Handle<T> TPtr;
1502 
1503  typedef void (T::*Exception)(const ::Ice::Exception& , const CT&);
1504  typedef void (T::*Sent)(bool , const CT&);
1505  typedef void (T::*Response)(const CT&);
1506 
1507  Callback_Session_keepAlive(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
1508  : ::IceInternal::OnewayCallback<T, CT>(obj, cb, excb, sentcb)
1509  {
1510  }
1511 };
1512 
1522 template<class T, typename CT> Callback_Session_keepAlivePtr
1523 newCallback_Session_keepAlive(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)
1524 {
1525  return new Callback_Session_keepAlive<T, CT>(instance, cb, excb, sentcb);
1526 }
1527 
1536 template<class T, typename CT> Callback_Session_keepAlivePtr
1537 newCallback_Session_keepAlive(const IceUtil::Handle<T>& instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
1538 {
1539  return new Callback_Session_keepAlive<T, CT>(instance, 0, excb, sentcb);
1540 }
1541 
1551 template<class T, typename CT> Callback_Session_keepAlivePtr
1552 newCallback_Session_keepAlive(T* instance, void (T::*cb)(const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
1553 {
1554  return new Callback_Session_keepAlive<T, CT>(instance, cb, excb, sentcb);
1555 }
1556 
1565 template<class T, typename CT> Callback_Session_keepAlivePtr
1566 newCallback_Session_keepAlive(T* instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
1567 {
1568  return new Callback_Session_keepAlive<T, CT>(instance, 0, excb, sentcb);
1569 }
1570 
1576 template<class T>
1577 class CallbackNC_Session_allocateObjectById : public Callback_Session_allocateObjectById_Base, public ::IceInternal::TwowayCallbackNC<T>
1578 {
1579 public:
1580 
1581  typedef IceUtil::Handle<T> TPtr;
1582 
1583  typedef void (T::*Exception)(const ::Ice::Exception&);
1584  typedef void (T::*Sent)(bool);
1585  typedef void (T::*Response)(const ::Ice::ObjectPrx&);
1586 
1587  CallbackNC_Session_allocateObjectById(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
1588  : ::IceInternal::TwowayCallbackNC<T>(obj, cb != 0, excb, sentcb), _response(cb)
1589  {
1590  }
1591 
1593  virtual void completed(const ::Ice::AsyncResultPtr& result) const
1594  {
1595  SessionPrx proxy = SessionPrx::uncheckedCast(result->getProxy());
1596  ::Ice::ObjectPrx ret;
1597  try
1598  {
1599  ret = proxy->end_allocateObjectById(result);
1600  }
1601  catch(const ::Ice::Exception& ex)
1602  {
1603  ::IceInternal::CallbackNC<T>::exception(result, ex);
1604  return;
1605  }
1606  if(_response)
1607  {
1608  (::IceInternal::CallbackNC<T>::_callback.get()->*_response)(ret);
1609  }
1610  }
1612 
1613 private:
1614 
1615  Response _response;
1616 };
1617 
1626 template<class T> Callback_Session_allocateObjectByIdPtr
1627 newCallback_Session_allocateObjectById(const IceUtil::Handle<T>& instance, void (T::*cb)(const ::Ice::ObjectPrx&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
1628 {
1629  return new CallbackNC_Session_allocateObjectById<T>(instance, cb, excb, sentcb);
1630 }
1631 
1640 template<class T> Callback_Session_allocateObjectByIdPtr
1641 newCallback_Session_allocateObjectById(T* instance, void (T::*cb)(const ::Ice::ObjectPrx&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
1642 {
1643  return new CallbackNC_Session_allocateObjectById<T>(instance, cb, excb, sentcb);
1644 }
1645 
1651 template<class T, typename CT>
1652 class Callback_Session_allocateObjectById : public Callback_Session_allocateObjectById_Base, public ::IceInternal::TwowayCallback<T, CT>
1653 {
1654 public:
1655 
1656  typedef IceUtil::Handle<T> TPtr;
1657 
1658  typedef void (T::*Exception)(const ::Ice::Exception& , const CT&);
1659  typedef void (T::*Sent)(bool , const CT&);
1660  typedef void (T::*Response)(const ::Ice::ObjectPrx&, const CT&);
1661 
1662  Callback_Session_allocateObjectById(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
1663  : ::IceInternal::TwowayCallback<T, CT>(obj, cb != 0, excb, sentcb), _response(cb)
1664  {
1665  }
1666 
1668  virtual void completed(const ::Ice::AsyncResultPtr& result) const
1669  {
1670  SessionPrx proxy = SessionPrx::uncheckedCast(result->getProxy());
1671  ::Ice::ObjectPrx ret;
1672  try
1673  {
1674  ret = proxy->end_allocateObjectById(result);
1675  }
1676  catch(const ::Ice::Exception& ex)
1677  {
1678  ::IceInternal::Callback<T, CT>::exception(result, ex);
1679  return;
1680  }
1681  if(_response)
1682  {
1683  (::IceInternal::Callback<T, CT>::_callback.get()->*_response)(ret, CT::dynamicCast(result->getCookie()));
1684  }
1685  }
1687 
1688 private:
1689 
1690  Response _response;
1691 };
1692 
1702 template<class T, typename CT> Callback_Session_allocateObjectByIdPtr
1703 newCallback_Session_allocateObjectById(const IceUtil::Handle<T>& instance, void (T::*cb)(const ::Ice::ObjectPrx&, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
1704 {
1705  return new Callback_Session_allocateObjectById<T, CT>(instance, cb, excb, sentcb);
1706 }
1707 
1717 template<class T, typename CT> Callback_Session_allocateObjectByIdPtr
1718 newCallback_Session_allocateObjectById(T* instance, void (T::*cb)(const ::Ice::ObjectPrx&, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
1719 {
1720  return new Callback_Session_allocateObjectById<T, CT>(instance, cb, excb, sentcb);
1721 }
1722 
1728 template<class T>
1729 class CallbackNC_Session_allocateObjectByType : public Callback_Session_allocateObjectByType_Base, public ::IceInternal::TwowayCallbackNC<T>
1730 {
1731 public:
1732 
1733  typedef IceUtil::Handle<T> TPtr;
1734 
1735  typedef void (T::*Exception)(const ::Ice::Exception&);
1736  typedef void (T::*Sent)(bool);
1737  typedef void (T::*Response)(const ::Ice::ObjectPrx&);
1738 
1739  CallbackNC_Session_allocateObjectByType(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
1740  : ::IceInternal::TwowayCallbackNC<T>(obj, cb != 0, excb, sentcb), _response(cb)
1741  {
1742  }
1743 
1745  virtual void completed(const ::Ice::AsyncResultPtr& result) const
1746  {
1747  SessionPrx proxy = SessionPrx::uncheckedCast(result->getProxy());
1748  ::Ice::ObjectPrx ret;
1749  try
1750  {
1751  ret = proxy->end_allocateObjectByType(result);
1752  }
1753  catch(const ::Ice::Exception& ex)
1754  {
1755  ::IceInternal::CallbackNC<T>::exception(result, ex);
1756  return;
1757  }
1758  if(_response)
1759  {
1760  (::IceInternal::CallbackNC<T>::_callback.get()->*_response)(ret);
1761  }
1762  }
1764 
1765 private:
1766 
1767  Response _response;
1768 };
1769 
1778 template<class T> Callback_Session_allocateObjectByTypePtr
1779 newCallback_Session_allocateObjectByType(const IceUtil::Handle<T>& instance, void (T::*cb)(const ::Ice::ObjectPrx&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
1780 {
1781  return new CallbackNC_Session_allocateObjectByType<T>(instance, cb, excb, sentcb);
1782 }
1783 
1792 template<class T> Callback_Session_allocateObjectByTypePtr
1793 newCallback_Session_allocateObjectByType(T* instance, void (T::*cb)(const ::Ice::ObjectPrx&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
1794 {
1795  return new CallbackNC_Session_allocateObjectByType<T>(instance, cb, excb, sentcb);
1796 }
1797 
1803 template<class T, typename CT>
1804 class Callback_Session_allocateObjectByType : public Callback_Session_allocateObjectByType_Base, public ::IceInternal::TwowayCallback<T, CT>
1805 {
1806 public:
1807 
1808  typedef IceUtil::Handle<T> TPtr;
1809 
1810  typedef void (T::*Exception)(const ::Ice::Exception& , const CT&);
1811  typedef void (T::*Sent)(bool , const CT&);
1812  typedef void (T::*Response)(const ::Ice::ObjectPrx&, const CT&);
1813 
1814  Callback_Session_allocateObjectByType(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
1815  : ::IceInternal::TwowayCallback<T, CT>(obj, cb != 0, excb, sentcb), _response(cb)
1816  {
1817  }
1818 
1820  virtual void completed(const ::Ice::AsyncResultPtr& result) const
1821  {
1822  SessionPrx proxy = SessionPrx::uncheckedCast(result->getProxy());
1823  ::Ice::ObjectPrx ret;
1824  try
1825  {
1826  ret = proxy->end_allocateObjectByType(result);
1827  }
1828  catch(const ::Ice::Exception& ex)
1829  {
1830  ::IceInternal::Callback<T, CT>::exception(result, ex);
1831  return;
1832  }
1833  if(_response)
1834  {
1835  (::IceInternal::Callback<T, CT>::_callback.get()->*_response)(ret, CT::dynamicCast(result->getCookie()));
1836  }
1837  }
1839 
1840 private:
1841 
1842  Response _response;
1843 };
1844 
1854 template<class T, typename CT> Callback_Session_allocateObjectByTypePtr
1855 newCallback_Session_allocateObjectByType(const IceUtil::Handle<T>& instance, void (T::*cb)(const ::Ice::ObjectPrx&, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
1856 {
1857  return new Callback_Session_allocateObjectByType<T, CT>(instance, cb, excb, sentcb);
1858 }
1859 
1869 template<class T, typename CT> Callback_Session_allocateObjectByTypePtr
1870 newCallback_Session_allocateObjectByType(T* instance, void (T::*cb)(const ::Ice::ObjectPrx&, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
1871 {
1872  return new Callback_Session_allocateObjectByType<T, CT>(instance, cb, excb, sentcb);
1873 }
1874 
1880 template<class T>
1881 class CallbackNC_Session_releaseObject : public Callback_Session_releaseObject_Base, public ::IceInternal::TwowayCallbackNC<T>
1882 {
1883 public:
1884 
1885  typedef IceUtil::Handle<T> TPtr;
1886 
1887  typedef void (T::*Exception)(const ::Ice::Exception&);
1888  typedef void (T::*Sent)(bool);
1889  typedef void (T::*Response)();
1890 
1891  CallbackNC_Session_releaseObject(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
1892  : ::IceInternal::TwowayCallbackNC<T>(obj, cb != 0, excb, sentcb), _response(cb)
1893  {
1894  }
1895 
1897  virtual void completed(const ::Ice::AsyncResultPtr& result) const
1898  {
1899  SessionPrx proxy = SessionPrx::uncheckedCast(result->getProxy());
1900  try
1901  {
1902  proxy->end_releaseObject(result);
1903  }
1904  catch(const ::Ice::Exception& ex)
1905  {
1906  ::IceInternal::CallbackNC<T>::exception(result, ex);
1907  return;
1908  }
1909  if(_response)
1910  {
1911  (::IceInternal::CallbackNC<T>::_callback.get()->*_response)();
1912  }
1913  }
1915 
1916 private:
1917 
1918  Response _response;
1919 };
1920 
1929 template<class T> Callback_Session_releaseObjectPtr
1930 newCallback_Session_releaseObject(const IceUtil::Handle<T>& instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
1931 {
1932  return new CallbackNC_Session_releaseObject<T>(instance, cb, excb, sentcb);
1933 }
1934 
1942 template<class T> Callback_Session_releaseObjectPtr
1943 newCallback_Session_releaseObject(const IceUtil::Handle<T>& instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
1944 {
1945  return new CallbackNC_Session_releaseObject<T>(instance, 0, excb, sentcb);
1946 }
1947 
1956 template<class T> Callback_Session_releaseObjectPtr
1957 newCallback_Session_releaseObject(T* instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
1958 {
1959  return new CallbackNC_Session_releaseObject<T>(instance, cb, excb, sentcb);
1960 }
1961 
1969 template<class T> Callback_Session_releaseObjectPtr
1970 newCallback_Session_releaseObject(T* instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
1971 {
1972  return new CallbackNC_Session_releaseObject<T>(instance, 0, excb, sentcb);
1973 }
1974 
1980 template<class T, typename CT>
1981 class Callback_Session_releaseObject : public Callback_Session_releaseObject_Base, public ::IceInternal::TwowayCallback<T, CT>
1982 {
1983 public:
1984 
1985  typedef IceUtil::Handle<T> TPtr;
1986 
1987  typedef void (T::*Exception)(const ::Ice::Exception& , const CT&);
1988  typedef void (T::*Sent)(bool , const CT&);
1989  typedef void (T::*Response)(const CT&);
1990 
1991  Callback_Session_releaseObject(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
1992  : ::IceInternal::TwowayCallback<T, CT>(obj, cb != 0, excb, sentcb), _response(cb)
1993  {
1994  }
1995 
1997  virtual void completed(const ::Ice::AsyncResultPtr& result) const
1998  {
1999  SessionPrx proxy = SessionPrx::uncheckedCast(result->getProxy());
2000  try
2001  {
2002  proxy->end_releaseObject(result);
2003  }
2004  catch(const ::Ice::Exception& ex)
2005  {
2006  ::IceInternal::Callback<T, CT>::exception(result, ex);
2007  return;
2008  }
2009  if(_response)
2010  {
2011  (::IceInternal::Callback<T, CT>::_callback.get()->*_response)(CT::dynamicCast(result->getCookie()));
2012  }
2013  }
2015 
2016 private:
2017 
2018  Response _response;
2019 };
2020 
2030 template<class T, typename CT> Callback_Session_releaseObjectPtr
2031 newCallback_Session_releaseObject(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)
2032 {
2033  return new Callback_Session_releaseObject<T, CT>(instance, cb, excb, sentcb);
2034 }
2035 
2044 template<class T, typename CT> Callback_Session_releaseObjectPtr
2045 newCallback_Session_releaseObject(const IceUtil::Handle<T>& instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
2046 {
2047  return new Callback_Session_releaseObject<T, CT>(instance, 0, excb, sentcb);
2048 }
2049 
2059 template<class T, typename CT> Callback_Session_releaseObjectPtr
2060 newCallback_Session_releaseObject(T* instance, void (T::*cb)(const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
2061 {
2062  return new Callback_Session_releaseObject<T, CT>(instance, cb, excb, sentcb);
2063 }
2064 
2073 template<class T, typename CT> Callback_Session_releaseObjectPtr
2074 newCallback_Session_releaseObject(T* instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
2075 {
2076  return new Callback_Session_releaseObject<T, CT>(instance, 0, excb, sentcb);
2077 }
2078 
2084 template<class T>
2085 class CallbackNC_Session_setAllocationTimeout : public Callback_Session_setAllocationTimeout_Base, public ::IceInternal::OnewayCallbackNC<T>
2086 {
2087 public:
2088 
2089  typedef IceUtil::Handle<T> TPtr;
2090 
2091  typedef void (T::*Exception)(const ::Ice::Exception&);
2092  typedef void (T::*Sent)(bool);
2093  typedef void (T::*Response)();
2094 
2095  CallbackNC_Session_setAllocationTimeout(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
2096  : ::IceInternal::OnewayCallbackNC<T>(obj, cb, excb, sentcb)
2097  {
2098  }
2099 };
2100 
2109 template<class T> Callback_Session_setAllocationTimeoutPtr
2110 newCallback_Session_setAllocationTimeout(const IceUtil::Handle<T>& instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
2111 {
2112  return new CallbackNC_Session_setAllocationTimeout<T>(instance, cb, excb, sentcb);
2113 }
2114 
2122 template<class T> Callback_Session_setAllocationTimeoutPtr
2123 newCallback_Session_setAllocationTimeout(const IceUtil::Handle<T>& instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
2124 {
2125  return new CallbackNC_Session_setAllocationTimeout<T>(instance, 0, excb, sentcb);
2126 }
2127 
2136 template<class T> Callback_Session_setAllocationTimeoutPtr
2137 newCallback_Session_setAllocationTimeout(T* instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
2138 {
2139  return new CallbackNC_Session_setAllocationTimeout<T>(instance, cb, excb, sentcb);
2140 }
2141 
2149 template<class T> Callback_Session_setAllocationTimeoutPtr
2150 newCallback_Session_setAllocationTimeout(T* instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
2151 {
2152  return new CallbackNC_Session_setAllocationTimeout<T>(instance, 0, excb, sentcb);
2153 }
2154 
2160 template<class T, typename CT>
2161 class Callback_Session_setAllocationTimeout : public Callback_Session_setAllocationTimeout_Base, public ::IceInternal::OnewayCallback<T, CT>
2162 {
2163 public:
2164 
2165  typedef IceUtil::Handle<T> TPtr;
2166 
2167  typedef void (T::*Exception)(const ::Ice::Exception& , const CT&);
2168  typedef void (T::*Sent)(bool , const CT&);
2169  typedef void (T::*Response)(const CT&);
2170 
2171  Callback_Session_setAllocationTimeout(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
2172  : ::IceInternal::OnewayCallback<T, CT>(obj, cb, excb, sentcb)
2173  {
2174  }
2175 };
2176 
2186 template<class T, typename CT> Callback_Session_setAllocationTimeoutPtr
2187 newCallback_Session_setAllocationTimeout(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)
2188 {
2189  return new Callback_Session_setAllocationTimeout<T, CT>(instance, cb, excb, sentcb);
2190 }
2191 
2200 template<class T, typename CT> Callback_Session_setAllocationTimeoutPtr
2201 newCallback_Session_setAllocationTimeout(const IceUtil::Handle<T>& instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
2202 {
2203  return new Callback_Session_setAllocationTimeout<T, CT>(instance, 0, excb, sentcb);
2204 }
2205 
2215 template<class T, typename CT> Callback_Session_setAllocationTimeoutPtr
2216 newCallback_Session_setAllocationTimeout(T* instance, void (T::*cb)(const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
2217 {
2218  return new Callback_Session_setAllocationTimeout<T, CT>(instance, cb, excb, sentcb);
2219 }
2220 
2229 template<class T, typename CT> Callback_Session_setAllocationTimeoutPtr
2230 newCallback_Session_setAllocationTimeout(T* instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
2231 {
2232  return new Callback_Session_setAllocationTimeout<T, CT>(instance, 0, excb, sentcb);
2233 }
2234 
2235 }
2236 
2237 #endif
2238 
2240 #endif
IceGrid::SessionPrx::allocateObjectByTypeAsync
::std::function< void()> allocateObjectByTypeAsync(const ::std::string &type, ::std::function< void(::std::shared_ptr<::Ice::ObjectPrx >)> response, ::std::function< void(::std::exception_ptr)> ex=nullptr, ::std::function< void(bool)> sent=nullptr, const ::Ice::Context &context=::Ice::noExplicitContext)
Allocate an object with the given type.
Definition: Session.h:377
Glacier2::Session
A client-visible session object, which is tied to the lifecycle of a Router.
Definition: Session.h:163
IceGrid::Session::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.
Ice::LocalObjectPtr
IceInternal::Handle< LocalObject > LocalObjectPtr
Definition: LocalObjectF.h:17
Optional.h
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
IceGrid::Session
A session object is used by IceGrid clients to allocate and release objects.
Definition: Session.h:87
IceGrid::Session::keepAlive
virtual void keepAlive(const ::Ice::Current &current)=0
Keep the session alive.
Ice::emptyCurrent
const Current emptyCurrent
A default-initialized Current instance.
Exception.h
IceGrid::SessionPrx::ice_staticId
static const ::std::string & ice_staticId()
Obtains the Slice type ID of this interface.
IceGrid::SessionPrx::releaseObjectAsync
::std::function< void()> releaseObjectAsync(const ::Ice::Identity &id, ::std::function< void()> response, ::std::function< void(::std::exception_ptr)> ex=nullptr, ::std::function< void(bool)> sent=nullptr, const ::Ice::Context &context=::Ice::noExplicitContext)
Release an object that was allocated using allocateObjectById or allocateObjectByType.
Definition: Session.h:431
StreamHelpers.h
Ice::Object
The base class for servants.
Definition: Object.h:91
IceGrid::SessionPrx::releaseObjectAsync
auto releaseObjectAsync(const ::Ice::Identity &id, const ::Ice::Context &context=::Ice::noExplicitContext) -> decltype(::std::declval< P< void >>().get_future())
Release an object that was allocated using allocateObjectById or allocateObjectByType.
Definition: Session.h:414
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::SessionPrx::releaseObject
void releaseObject(const ::Ice::Identity &id, const ::Ice::Context &context=::Ice::noExplicitContext)
Release an object that was allocated using allocateObjectById or allocateObjectByType.
Definition: Session.h:401
GCObject.h
IceGrid::Session::ice_staticId
static const ::std::string & ice_staticId()
Obtains the Slice type ID corresponding to this class.
IceGrid::SessionPrx::allocateObjectByTypeAsync
auto allocateObjectByTypeAsync(const ::std::string &type, const ::Ice::Context &context=::Ice::noExplicitContext) -> decltype(::std::declval< P<::std::shared_ptr<::Ice::ObjectPrx >>>().get_future())
Allocate an object with the given type.
Definition: Session.h:357
Incoming.h
ICE_MEMBER
#define ICE_MEMBER(API)
Definition: Config.h:177
FactoryTableInit.h
IceGrid::SessionPrx
A session object is used by IceGrid clients to allocate and release objects.
Definition: Session.h:216
Glacier2::SessionPrx
A client-visible session object, which is tied to the lifecycle of a Router.
Definition: Session.h:604
IceGrid::Session::releaseObject
virtual void releaseObject(::Ice::Identity id, const ::Ice::Current &current)=0
Release an object that was allocated using allocateObjectById or allocateObjectByType.
IncomingAsync.h
IceGrid::Session::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.
LocalObject.h
PushDisableWarnings.h
IceGrid::SessionPrx::setAllocationTimeoutAsync
auto setAllocationTimeoutAsync(int timeout, const ::Ice::Context &context=::Ice::noExplicitContext) -> decltype(::std::declval< P< void >>().get_future())
Set the allocation timeout.
Definition: Session.h:467
IceGrid::SessionPrx::keepAliveAsync
auto keepAliveAsync(const ::Ice::Context &context=::Ice::noExplicitContext) -> decltype(::std::declval< P< void >>().get_future())
Keep the session alive.
Definition: Session.h:238
ProxyF.h
Ice::operator<
bool operator<(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition: Comparable.h:136
SlicedDataF.h
IceGrid::Session::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.
Object.h
Proxy.h
UndefSysMacros.h
IceGrid::SessionPrx::allocateObjectByIdAsync
::std::function< void()> allocateObjectByIdAsync(const ::Ice::Identity &id, ::std::function< void(::std::shared_ptr<::Ice::ObjectPrx >)> response, ::std::function< void(::std::exception_ptr)> ex=nullptr, ::std::function< void(bool)> sent=nullptr, const ::Ice::Context &context=::Ice::noExplicitContext)
Allocate an object.
Definition: Session.h:317
Ice::OutputStream
Interface for output streams used to create a sequence of bytes from Slice types.
Definition: OutputStream.h:28
ObjectF.h
Ice
Definition: BuiltinSequences.h:56
ICEGRID_API
#define ICEGRID_API
Definition: Session.h:61
IceGrid::SessionPrx::keepAlive
void keepAlive(const ::Ice::Context &context=::Ice::noExplicitContext)
Keep the session alive.
Definition: Session.h:225
IceGrid::Session::allocateObjectByTypeAsync
virtual void allocateObjectByTypeAsync(::std::string type, ::std::function< void(const ::std::shared_ptr<::Ice::ObjectPrx > &returnValue)> response, ::std::function< void(::std::exception_ptr)> exception, const ::Ice::Current &current)=0
Allocate an object with the given type.
IceGrid::Session::setAllocationTimeout
virtual void setAllocationTimeout(int timeout, const ::Ice::Current &current)=0
Set the allocation timeout.
IceGrid::SessionPrx::allocateObjectByType
::std::shared_ptr<::Ice::ObjectPrx > allocateObjectByType(const ::std::string &type, const ::Ice::Context &context=::Ice::noExplicitContext)
Allocate an object with the given type.
Definition: Session.h:341
IceUtil::Handle
Definition: Handle.h:143
Ice::ObjectPrx
Base class of all object proxies.
Definition: Proxy.h:317
ExceptionHelpers.h
IceGrid::SessionPrx::setAllocationTimeout
void setAllocationTimeout(int timeout, const ::Ice::Context &context=::Ice::noExplicitContext)
Set the allocation timeout.
Definition: Session.h:452
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
IceGrid::Session::allocateObjectByIdAsync
virtual void allocateObjectByIdAsync(::Ice::Identity id, ::std::function< void(const ::std::shared_ptr<::Ice::ObjectPrx > &returnValue)> response, ::std::function< void(::std::exception_ptr)> exception, const ::Ice::Current &current)=0
Allocate an object.
Config.h
IceGrid::SessionPrx::keepAliveAsync
::std::function< void()> keepAliveAsync(::std::function< void()> response, ::std::function< void(::std::exception_ptr)> ex=nullptr, ::std::function< void(bool)> sent=nullptr, const ::Ice::Context &context=::Ice::noExplicitContext)
Keep the session alive.
Definition: Session.h:255
Comparable.h
ScopedArray.h
IceGrid
Definition: Admin.h:73
Ice::Proxy
Helper template that supplies proxy factory functions.
Definition: Proxy.h:1204
IceGrid::SessionPrx::allocateObjectByIdAsync
auto allocateObjectByIdAsync(const ::Ice::Identity &id, const ::Ice::Context &context=::Ice::noExplicitContext) -> decltype(::std::declval< P<::std::shared_ptr<::Ice::ObjectPrx >>>().get_future())
Allocate an object.
Definition: Session.h:297
Session.h
Ice::Identity
The identity of an Ice object.
Definition: Identity.h:67
Exception.h
ValueF.h
IceGrid::SessionPrx::allocateObjectById
::std::shared_ptr<::Ice::ObjectPrx > allocateObjectById(const ::Ice::Identity &id, const ::Ice::Context &context=::Ice::noExplicitContext)
Allocate an object.
Definition: Session.h:281
Ice::Int
int Int
The mapping for the Slice int type.
Definition: Config.h:54
Ice::noExplicitContext
const Context noExplicitContext
Marker value used to indicate that no explicit context was passed to a proxy invocation.
Value.h
IceGrid::SessionPrx::setAllocationTimeoutAsync
::std::function< void()> setAllocationTimeoutAsync(int timeout, ::std::function< void()> response, ::std::function< void(::std::exception_ptr)> ex=nullptr, ::std::function< void(bool)> sent=nullptr, const ::Ice::Context &context=::Ice::noExplicitContext)
Set the allocation timeout.
Definition: Session.h:486
PopDisableWarnings.h