Ice 3.7 C++11 API Reference
ObjectAdapter.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 `ObjectAdapter.ice'
10 //
11 // Warning: do not edit this file.
12 //
13 // </auto-generated>
14 //
15 
16 #ifndef __Ice_ObjectAdapter_h__
17 #define __Ice_ObjectAdapter_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/CommunicatorF.h>
38 #include <Ice/ServantLocatorF.h>
39 #include <Ice/Locator.h>
40 #include <Ice/FacetMap.h>
41 #include <Ice/Endpoint.h>
42 #include <IceUtil/UndefSysMacros.h>
43 
44 #ifndef ICE_IGNORE_VERSION
45 # if ICE_INT_VERSION / 100 != 307
46 # error Ice version mismatch!
47 # endif
48 # if ICE_INT_VERSION % 100 >= 50
49 # error Beta header file detected
50 # endif
51 # if ICE_INT_VERSION % 100 < 10
52 # error Ice patch level mismatch!
53 # endif
54 #endif
55 
56 #ifndef ICE_API
57 # if defined(ICE_STATIC_LIBS)
58 # define ICE_API
59 # elif defined(ICE_API_EXPORTS)
60 # define ICE_API ICE_DECLSPEC_EXPORT
61 # else
62 # define ICE_API ICE_DECLSPEC_IMPORT
63 # endif
64 #endif
65 
66 #ifdef ICE_CPP11_MAPPING // C++11 mapping
67 
68 namespace Ice
69 {
70 
71 class ObjectAdapter;
72 
73 }
74 
75 namespace Ice
76 {
77 
89 class ICE_CLASS(ICE_API) ObjectAdapter
90 {
91 public:
92 
94 
99  virtual ::std::string getName() const noexcept = 0;
100 
106  virtual ::std::shared_ptr<::Ice::Communicator> getCommunicator() const noexcept = 0;
107 
115  virtual void activate() = 0;
116 
129  virtual void hold() = 0;
130 
139  virtual void waitForHold() = 0;
140 
163  virtual void deactivate() noexcept = 0;
164 
174  virtual void waitForDeactivate() noexcept = 0;
175 
181  virtual bool isDeactivated() const noexcept = 0;
182 
194  virtual void destroy() noexcept = 0;
195 
212  virtual ::std::shared_ptr<::Ice::ObjectPrx> add(const ::std::shared_ptr<Object>& servant, const Identity& id) = 0;
213 
229  virtual ::std::shared_ptr<::Ice::ObjectPrx> addFacet(const ::std::shared_ptr<Object>& servant, const Identity& id, const ::std::string& facet) = 0;
230 
245  virtual ::std::shared_ptr<::Ice::ObjectPrx> addWithUUID(const ::std::shared_ptr<Object>& servant) = 0;
246 
262  virtual ::std::shared_ptr<::Ice::ObjectPrx> addFacetWithUUID(const ::std::shared_ptr<Object>& servant, const ::std::string& facet) = 0;
263 
297  virtual void addDefaultServant(const ::std::shared_ptr<Object>& servant, const ::std::string& category) = 0;
298 
312  virtual ::std::shared_ptr<::Ice::Object> remove(const Identity& id) = 0;
313 
325  virtual ::std::shared_ptr<::Ice::Object> removeFacet(const Identity& id, const ::std::string& facet) = 0;
326 
338  virtual ::Ice::FacetMap removeAllFacets(const Identity& id) = 0;
339 
349  virtual ::std::shared_ptr<::Ice::Object> removeDefaultServant(const ::std::string& category) = 0;
350 
366  virtual ::std::shared_ptr<::Ice::Object> find(const Identity& id) const = 0;
367 
383  virtual ::std::shared_ptr<::Ice::Object> findFacet(const Identity& id, const ::std::string& facet) const = 0;
384 
396  virtual ::Ice::FacetMap findAllFacets(const Identity& id) const = 0;
397 
411  virtual ::std::shared_ptr<::Ice::Object> findByProxy(const ::std::shared_ptr<ObjectPrx>& proxy) const = 0;
412 
454  virtual void addServantLocator(const ::std::shared_ptr<ServantLocator>& locator, const ::std::string& category) = 0;
455 
468  virtual ::std::shared_ptr<::Ice::ServantLocator> removeServantLocator(const ::std::string& category) = 0;
469 
482  virtual ::std::shared_ptr<::Ice::ServantLocator> findServantLocator(const ::std::string& category) const = 0;
483 
492  virtual ::std::shared_ptr<::Ice::Object> findDefaultServant(const ::std::string& category) const = 0;
493 
506  virtual ::std::shared_ptr<::Ice::ObjectPrx> createProxy(const Identity& id) const = 0;
507 
516  virtual ::std::shared_ptr<::Ice::ObjectPrx> createDirectProxy(const Identity& id) const = 0;
517 
527  virtual ::std::shared_ptr<::Ice::ObjectPrx> createIndirectProxy(const Identity& id) const = 0;
528 
541  virtual void setLocator(const ::std::shared_ptr<LocatorPrx>& loc) = 0;
542 
550  virtual ::std::shared_ptr<::Ice::LocatorPrx> getLocator() const noexcept = 0;
551 
557  virtual ::Ice::EndpointSeq getEndpoints() const noexcept = 0;
558 
567  virtual void refreshPublishedEndpoints() = 0;
568 
576  virtual ::Ice::EndpointSeq getPublishedEndpoints() const noexcept = 0;
577 
585  virtual void setPublishedEndpoints(const EndpointSeq& newEndpoints) = 0;
586 };
587 
588 }
589 
591 namespace Ice
592 {
593 
594 }
596 
598 namespace Ice
599 {
600 
601 using ObjectAdapterPtr = ::std::shared_ptr<ObjectAdapter>;
602 
603 }
605 
606 #else // C++98 mapping
607 
608 namespace IceProxy
609 {
610 
611 }
612 
613 namespace Ice
614 {
615 
616 class ObjectAdapter;
618 ICE_API LocalObject* upCast(ObjectAdapter*);
620 typedef ::IceInternal::Handle< ObjectAdapter> ObjectAdapterPtr;
621 
622 }
623 
625 namespace IceAsync
626 {
627 
628 }
630 
631 namespace IceProxy
632 {
633 
634 }
635 
636 namespace Ice
637 {
638 
650 class ICE_API ObjectAdapter : public virtual LocalObject
651 {
652 public:
653 
654  typedef ObjectAdapterPtr PointerType;
655 
656  virtual ~ObjectAdapter();
657 
658 #ifdef ICE_CPP11_COMPILER
659  ObjectAdapter() = default;
660  ObjectAdapter(const ObjectAdapter&) = default;
661  ObjectAdapter& operator=(const ObjectAdapter&) = default;
662 #endif
663 
668  virtual ::std::string getName() const ICE_NOEXCEPT = 0;
669 
675  virtual CommunicatorPtr getCommunicator() const ICE_NOEXCEPT = 0;
676 
684  virtual void activate() = 0;
685 
698  virtual void hold() = 0;
699 
708  virtual void waitForHold() = 0;
709 
732  virtual void deactivate() ICE_NOEXCEPT = 0;
733 
743  virtual void waitForDeactivate() ICE_NOEXCEPT = 0;
744 
750  virtual bool isDeactivated() const ICE_NOEXCEPT = 0;
751 
763  virtual void destroy() ICE_NOEXCEPT = 0;
764 
781  virtual ObjectPrx add(const ObjectPtr& servant, const Identity& id) = 0;
782 
798  virtual ObjectPrx addFacet(const ObjectPtr& servant, const Identity& id, const ::std::string& facet) = 0;
799 
814  virtual ObjectPrx addWithUUID(const ObjectPtr& servant) = 0;
815 
831  virtual ObjectPrx addFacetWithUUID(const ObjectPtr& servant, const ::std::string& facet) = 0;
832 
866  virtual void addDefaultServant(const ObjectPtr& servant, const ::std::string& category) = 0;
867 
881  virtual ObjectPtr remove(const Identity& id) = 0;
882 
894  virtual ObjectPtr removeFacet(const Identity& id, const ::std::string& facet) = 0;
895 
907  virtual FacetMap removeAllFacets(const Identity& id) = 0;
908 
918  virtual ObjectPtr removeDefaultServant(const ::std::string& category) = 0;
919 
935  virtual ObjectPtr find(const Identity& id) const = 0;
936 
952  virtual ObjectPtr findFacet(const Identity& id, const ::std::string& facet) const = 0;
953 
965  virtual FacetMap findAllFacets(const Identity& id) const = 0;
966 
980  virtual ObjectPtr findByProxy(const ObjectPrx& proxy) const = 0;
981 
1023  virtual void addServantLocator(const ServantLocatorPtr& locator, const ::std::string& category) = 0;
1024 
1037  virtual ServantLocatorPtr removeServantLocator(const ::std::string& category) = 0;
1038 
1051  virtual ServantLocatorPtr findServantLocator(const ::std::string& category) const = 0;
1052 
1061  virtual ObjectPtr findDefaultServant(const ::std::string& category) const = 0;
1062 
1075  virtual ObjectPrx createProxy(const Identity& id) const = 0;
1076 
1085  virtual ObjectPrx createDirectProxy(const Identity& id) const = 0;
1086 
1096  virtual ObjectPrx createIndirectProxy(const Identity& id) const = 0;
1097 
1110  virtual void setLocator(const LocatorPrx& loc) = 0;
1111 
1119  virtual LocatorPrx getLocator() const ICE_NOEXCEPT = 0;
1120 
1126  virtual EndpointSeq getEndpoints() const ICE_NOEXCEPT = 0;
1127 
1136  virtual void refreshPublishedEndpoints() = 0;
1137 
1145  virtual EndpointSeq getPublishedEndpoints() const ICE_NOEXCEPT = 0;
1146 
1154  virtual void setPublishedEndpoints(const EndpointSeq& newEndpoints) = 0;
1155 };
1156 
1158 inline bool operator==(const ObjectAdapter& lhs, const ObjectAdapter& rhs)
1159 {
1160  return static_cast<const LocalObject&>(lhs) == static_cast<const LocalObject&>(rhs);
1161 }
1162 
1163 inline bool operator<(const ObjectAdapter& lhs, const ObjectAdapter& rhs)
1164 {
1165  return static_cast<const LocalObject&>(lhs) < static_cast<const LocalObject&>(rhs);
1166 }
1168 
1169 }
1170 
1172 namespace Ice
1173 {
1174 
1175 }
1177 
1178 #endif
1179 
1181 #endif
Ice::ServantLocator
A servant locator is called by an object adapter to locate a servant that is not found in its active ...
Definition: ServantLocator.h:76
CommunicatorF.h
Optional.h
Ice::LocatorPrx
The Ice locator interface.
Definition: Locator.h:517
StreamHelpers.h
Ice::Object
The base class for servants.
Definition: Object.h:91
Ice::upCast
IceUtil::Shared * upCast(::Ice::LocalObject *)
GCObject.h
Ice::Communicator
The central object in Ice.
Definition: Communicator.h:130
ICE_NOEXCEPT
#define ICE_NOEXCEPT
Definition: Config.h:128
Incoming.h
ICE_API
#define ICE_API
Definition: Config.h:197
ICE_MEMBER
#define ICE_MEMBER(API)
Definition: Config.h:177
FactoryTableInit.h
IncomingAsync.h
Ice::ObjectAdapter::~ObjectAdapter
virtual ~ObjectAdapter()
LocalObject.h
PushDisableWarnings.h
Locator.h
ProxyF.h
Ice::operator<
bool operator<(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition: Comparable.h:136
ServantLocatorF.h
Ice::ObjectAdapter::getName
virtual ::std::string getName() const noexcept=0
Get the name of this object adapter.
Object.h
Proxy.h
UndefSysMacros.h
Ice::FacetMap
::std::map<::std::string, ::std::shared_ptr< Object > > FacetMap
A mapping from facet name to servant.
Definition: FacetMap.h:61
ObjectF.h
Ice
Definition: BuiltinSequences.h:56
Ice::ObjectAdapter
The object adapter provides an up-call interface from the Ice run time to the implementation of Ice o...
Definition: ObjectAdapter.h:90
Ice::ObjectPrx
Base class of all object proxies.
Definition: Proxy.h:317
Ice::EndpointSeq
::std::vector<::std::shared_ptr< Endpoint > > EndpointSeq
A sequence of endpoints.
Definition: EndpointF.h:73
ExceptionHelpers.h
Comparable.h
ScopedArray.h
FacetMap.h
Ice::Identity
The identity of an Ice object.
Definition: Identity.h:67
Exception.h
ValueF.h
Value.h
Endpoint.h
PopDisableWarnings.h