16 #ifndef __Ice_ObjectAdapter_h__
17 #define __Ice_ObjectAdapter_h__
44 #ifndef ICE_IGNORE_VERSION
45 # if ICE_INT_VERSION / 100 != 307
46 # error Ice version mismatch!
48 # if ICE_INT_VERSION % 100 >= 50
49 # error Beta header file detected
51 # if ICE_INT_VERSION % 100 < 10
52 # error Ice patch level mismatch!
57 # if defined(ICE_STATIC_LIBS)
59 # elif defined(ICE_API_EXPORTS)
60 # define ICE_API ICE_DECLSPEC_EXPORT
62 # define ICE_API ICE_DECLSPEC_IMPORT
66 #ifdef ICE_CPP11_MAPPING // C++11 mapping
99 virtual ::std::string
getName() const noexcept = 0;
115 virtual
void activate() = 0;
129 virtual
void hold() = 0;
139 virtual
void waitForHold() = 0;
163 virtual
void deactivate() noexcept = 0;
174 virtual
void waitForDeactivate() noexcept = 0;
181 virtual
bool isDeactivated() const noexcept = 0;
194 virtual
void destroy() noexcept = 0;
229 virtual ::std::shared_ptr<::
Ice::
ObjectPrx> addFacet(const ::std::shared_ptr<
Object>& servant, const
Identity&
id, const ::std::
string& facet) = 0;
245 virtual ::std::shared_ptr<::
Ice::
ObjectPrx> addWithUUID(const ::std::shared_ptr<
Object>& servant) = 0;
262 virtual ::std::shared_ptr<::
Ice::
ObjectPrx> addFacetWithUUID(const ::std::shared_ptr<
Object>& servant, const ::std::
string& facet) = 0;
297 virtual
void addDefaultServant(const ::std::shared_ptr<
Object>& servant, const ::std::
string& category) = 0;
325 virtual ::std::shared_ptr<::
Ice::
Object> removeFacet(const
Identity&
id, const ::std::
string& facet) = 0;
349 virtual ::std::shared_ptr<::
Ice::
Object> removeDefaultServant(const ::std::
string& category) = 0;
383 virtual ::std::shared_ptr<::
Ice::
Object> findFacet(const
Identity&
id, const ::std::
string& facet) const = 0;
411 virtual ::std::shared_ptr<::
Ice::
Object> findByProxy(const ::std::shared_ptr<
ObjectPrx>& proxy) const = 0;
454 virtual
void addServantLocator(const ::std::shared_ptr<
ServantLocator>& locator, const ::std::
string& category) = 0;
468 virtual ::std::shared_ptr<::
Ice::
ServantLocator> removeServantLocator(const ::std::
string& category) = 0;
482 virtual ::std::shared_ptr<::
Ice::
ServantLocator> findServantLocator(const ::std::
string& category) const = 0;
492 virtual ::std::shared_ptr<::
Ice::
Object> findDefaultServant(const ::std::
string& category) const = 0;
541 virtual
void setLocator(const ::std::shared_ptr<
LocatorPrx>& loc) = 0;
550 virtual ::std::shared_ptr<::
Ice::
LocatorPrx> getLocator() const noexcept = 0;
567 virtual
void refreshPublishedEndpoints() = 0;
585 virtual
void setPublishedEndpoints(const
EndpointSeq& newEndpoints) = 0;
601 using ObjectAdapterPtr = ::std::shared_ptr<ObjectAdapter>;
606 #else // C++98 mapping
620 typedef ::IceInternal::Handle< ObjectAdapter> ObjectAdapterPtr;
650 class ICE_API ObjectAdapter :
public virtual LocalObject
654 typedef ObjectAdapterPtr PointerType;
656 virtual ~ObjectAdapter();
658 #ifdef ICE_CPP11_COMPILER
659 ObjectAdapter() =
default;
660 ObjectAdapter(
const ObjectAdapter&) =
default;
661 ObjectAdapter& operator=(
const ObjectAdapter&) =
default;
675 virtual CommunicatorPtr getCommunicator() const
ICE_NOEXCEPT = 0;
684 virtual
void activate() = 0;
698 virtual
void hold() = 0;
708 virtual
void waitForHold() = 0;
781 virtual ObjectPrx add(const ObjectPtr& servant, const Identity&
id) = 0;
798 virtual ObjectPrx addFacet(const ObjectPtr& servant, const Identity&
id, const ::std::
string& facet) = 0;
814 virtual ObjectPrx addWithUUID(const ObjectPtr& servant) = 0;
831 virtual ObjectPrx addFacetWithUUID(const ObjectPtr& servant, const ::std::
string& facet) = 0;
866 virtual
void addDefaultServant(const ObjectPtr& servant, const ::std::
string& category) = 0;
881 virtual ObjectPtr remove(const Identity&
id) = 0;
894 virtual ObjectPtr removeFacet(const Identity&
id, const ::std::
string& facet) = 0;
907 virtual
FacetMap removeAllFacets(const Identity&
id) = 0;
918 virtual ObjectPtr removeDefaultServant(const ::std::
string& category) = 0;
935 virtual ObjectPtr find(const Identity&
id) const = 0;
952 virtual ObjectPtr findFacet(const Identity&
id, const ::std::
string& facet) const = 0;
965 virtual
FacetMap findAllFacets(const Identity&
id) const = 0;
980 virtual ObjectPtr findByProxy(const ObjectPrx& proxy) const = 0;
1023 virtual
void addServantLocator(const ServantLocatorPtr& locator, const ::std::
string& category) = 0;
1037 virtual ServantLocatorPtr removeServantLocator(const ::std::
string& category) = 0;
1051 virtual ServantLocatorPtr findServantLocator(const ::std::
string& category) const = 0;
1061 virtual ObjectPtr findDefaultServant(const ::std::
string& category) const = 0;
1075 virtual ObjectPrx createProxy(const Identity&
id) const = 0;
1085 virtual ObjectPrx createDirectProxy(const Identity&
id) const = 0;
1096 virtual ObjectPrx createIndirectProxy(const Identity&
id) const = 0;
1110 virtual
void setLocator(const LocatorPrx& loc) = 0;
1119 virtual LocatorPrx getLocator() const
ICE_NOEXCEPT = 0;
1136 virtual
void refreshPublishedEndpoints() = 0;
1154 virtual
void setPublishedEndpoints(const
EndpointSeq& newEndpoints) = 0;
1158 inline
bool operator==(const ObjectAdapter& lhs, const ObjectAdapter& rhs)
1160 return static_cast<const LocalObject&
>(lhs) ==
static_cast<const LocalObject&
>(rhs);
1163 inline bool operator<(
const ObjectAdapter& lhs,
const ObjectAdapter& rhs)
1165 return static_cast<const LocalObject&
>(lhs) <
static_cast<const LocalObject&
>(rhs);