Ice 3.7 C++11 API Reference
ServantLocator.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 `ServantLocator.ice'
10 //
11 // Warning: do not edit this file.
12 //
13 // </auto-generated>
14 //
15 
16 #ifndef __Ice_ServantLocator_h__
17 #define __Ice_ServantLocator_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 <IceUtil/ScopedArray.h>
28 #include <Ice/Optional.h>
29 #include <Ice/ObjectAdapterF.h>
30 #include <Ice/Current.h>
31 #include <IceUtil/UndefSysMacros.h>
32 
33 #ifndef ICE_IGNORE_VERSION
34 # if ICE_INT_VERSION / 100 != 307
35 # error Ice version mismatch!
36 # endif
37 # if ICE_INT_VERSION % 100 >= 50
38 # error Beta header file detected
39 # endif
40 # if ICE_INT_VERSION % 100 < 10
41 # error Ice patch level mismatch!
42 # endif
43 #endif
44 
45 #ifndef ICE_API
46 # if defined(ICE_STATIC_LIBS)
47 # define ICE_API
48 # elif defined(ICE_API_EXPORTS)
49 # define ICE_API ICE_DECLSPEC_EXPORT
50 # else
51 # define ICE_API ICE_DECLSPEC_IMPORT
52 # endif
53 #endif
54 
55 #ifdef ICE_CPP11_MAPPING // C++11 mapping
56 
57 namespace Ice
58 {
59 
60 class ServantLocator;
61 
62 }
63 
64 namespace Ice
65 {
66 
75 class ICE_CLASS(ICE_API) ServantLocator
76 {
77 public:
78 
80 
113  virtual ::std::shared_ptr<::Ice::Object> locate(const Current& curr, ::std::shared_ptr<void>& cookie) = 0;
114 
139  virtual void finished(const Current& curr, const ::std::shared_ptr<Object>& servant, const ::std::shared_ptr<void>& cookie) = 0;
140 
150  virtual void deactivate(const ::std::string& category) = 0;
151 };
152 
153 }
154 
156 namespace Ice
157 {
158 
159 }
161 
163 namespace Ice
164 {
165 
166 using ServantLocatorPtr = ::std::shared_ptr<ServantLocator>;
167 
168 }
170 
171 #else // C++98 mapping
172 
173 namespace Ice
174 {
175 
176 class ServantLocator;
178 ICE_API LocalObject* upCast(ServantLocator*);
180 typedef ::IceInternal::Handle< ServantLocator> ServantLocatorPtr;
181 
182 }
183 
184 namespace Ice
185 {
186 
195 class ICE_API ServantLocator : public virtual LocalObject
196 {
197 public:
198 
199  typedef ServantLocatorPtr PointerType;
200 
201  virtual ~ServantLocator();
202 
203 #ifdef ICE_CPP11_COMPILER
204  ServantLocator() = default;
205  ServantLocator(const ServantLocator&) = default;
206  ServantLocator& operator=(const ServantLocator&) = default;
207 #endif
208 
241  virtual ObjectPtr locate(const Current& curr, LocalObjectPtr& cookie) = 0;
242 
267  virtual void finished(const Current& curr, const ObjectPtr& servant, const LocalObjectPtr& cookie) = 0;
268 
278  virtual void deactivate(const ::std::string& category) = 0;
279 };
280 
282 inline bool operator==(const ServantLocator& lhs, const ServantLocator& rhs)
283 {
284  return static_cast<const LocalObject&>(lhs) == static_cast<const LocalObject&>(rhs);
285 }
286 
287 inline bool operator<(const ServantLocator& lhs, const ServantLocator& rhs)
288 {
289  return static_cast<const LocalObject&>(lhs) < static_cast<const LocalObject&>(rhs);
290 }
292 
293 }
294 
296 namespace Ice
297 {
298 
299 }
301 
302 #endif
303 
305 #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
Ice::LocalObjectPtr
IceInternal::Handle< LocalObject > LocalObjectPtr
Definition: LocalObjectF.h:17
Optional.h
Current.h
StreamHelpers.h
Ice::operator==
bool operator==(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition: Comparable.h:184
Ice::upCast
IceUtil::Shared * upCast(::Ice::LocalObject *)
ICE_API
#define ICE_API
Definition: Config.h:197
ICE_MEMBER
#define ICE_MEMBER(API)
Definition: Config.h:177
Ice::ServantLocator::locate
virtual ::std::shared_ptr<::Ice::Object > locate(const Current &curr, ::std::shared_ptr< void > &cookie)=0
Called before a request is dispatched if a servant cannot be found in the object adapter's active ser...
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
UndefSysMacros.h
Ice::ServantLocator::~ServantLocator
virtual ~ServantLocator()
ObjectF.h
Ice::ServantLocator::deactivate
virtual void deactivate(const ::std::string &category)=0
Called when the object adapter in which this servant locator is installed is destroyed.
Ice
Definition: BuiltinSequences.h:56
Ice::ServantLocator::finished
virtual void finished(const Current &curr, const ::std::shared_ptr< Object > &servant, const ::std::shared_ptr< void > &cookie)=0
Called by the object adapter after a request has been made.
Comparable.h
ScopedArray.h
Ice::Current
Information about the current method invocation for servers.
Definition: Current.h:120
Exception.h
ValueF.h
ObjectAdapterF.h
PopDisableWarnings.h