Ice 3.7 C++11 API Reference
ImplicitContext.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 `ImplicitContext.ice'
10 //
11 // Warning: do not edit this file.
12 //
13 // </auto-generated>
14 //
15 
16 #ifndef __Ice_ImplicitContext_h__
17 #define __Ice_ImplicitContext_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/ExceptionHelpers.h>
30 #include <Ice/LocalException.h>
31 #include <Ice/Current.h>
32 #include <IceUtil/UndefSysMacros.h>
33 
34 #ifndef ICE_IGNORE_VERSION
35 # if ICE_INT_VERSION / 100 != 307
36 # error Ice version mismatch!
37 # endif
38 # if ICE_INT_VERSION % 100 >= 50
39 # error Beta header file detected
40 # endif
41 # if ICE_INT_VERSION % 100 < 10
42 # error Ice patch level mismatch!
43 # endif
44 #endif
45 
46 #ifndef ICE_API
47 # if defined(ICE_STATIC_LIBS)
48 # define ICE_API
49 # elif defined(ICE_API_EXPORTS)
50 # define ICE_API ICE_DECLSPEC_EXPORT
51 # else
52 # define ICE_API ICE_DECLSPEC_IMPORT
53 # endif
54 #endif
55 
56 #ifdef ICE_CPP11_MAPPING // C++11 mapping
57 
58 namespace Ice
59 {
60 
61 class ImplicitContext;
62 
63 }
64 
65 namespace Ice
66 {
67 
92 class ICE_CLASS(ICE_API) ImplicitContext
93 {
94 public:
95 
97 
103 
108  virtual void setContext(const Context& newContext) = 0;
109 
115  virtual bool containsKey(const ::std::string& key) const = 0;
116 
125  virtual ::std::string get(const ::std::string& key) const = 0;
126 
133  virtual ::std::string put(const ::std::string& key, const ::std::string& value) = 0;
134 
140  virtual ::std::string remove(const ::std::string& key) = 0;
141 };
142 
143 }
144 
146 namespace Ice
147 {
148 
149 }
151 
153 namespace Ice
154 {
155 
156 using ImplicitContextPtr = ::std::shared_ptr<ImplicitContext>;
157 
158 }
160 
161 #else // C++98 mapping
162 
163 namespace Ice
164 {
165 
166 class ImplicitContext;
168 ICE_API LocalObject* upCast(ImplicitContext*);
170 typedef ::IceInternal::Handle< ImplicitContext> ImplicitContextPtr;
171 
172 }
173 
174 namespace Ice
175 {
176 
201 class ICE_API ImplicitContext : public virtual LocalObject
202 {
203 public:
204 
205  typedef ImplicitContextPtr PointerType;
206 
207  virtual ~ImplicitContext();
208 
209 #ifdef ICE_CPP11_COMPILER
210  ImplicitContext() = default;
211  ImplicitContext(const ImplicitContext&) = default;
212  ImplicitContext& operator=(const ImplicitContext&) = default;
213 #endif
214 
219  virtual Context getContext() const = 0;
220 
225  virtual void setContext(const Context& newContext) = 0;
226 
232  virtual bool containsKey(const ::std::string& key) const = 0;
233 
242  virtual ::std::string get(const ::std::string& key) const = 0;
243 
250  virtual ::std::string put(const ::std::string& key, const ::std::string& value) = 0;
251 
257  virtual ::std::string remove(const ::std::string& key) = 0;
258 };
259 
261 inline bool operator==(const ImplicitContext& lhs, const ImplicitContext& rhs)
262 {
263  return static_cast<const LocalObject&>(lhs) == static_cast<const LocalObject&>(rhs);
264 }
265 
266 inline bool operator<(const ImplicitContext& lhs, const ImplicitContext& rhs)
267 {
268  return static_cast<const LocalObject&>(lhs) < static_cast<const LocalObject&>(rhs);
269 }
271 
272 }
273 
275 namespace Ice
276 {
277 
278 }
280 
281 #endif
282 
284 #endif
Optional.h
Ice::Context
::std::map<::std::string, ::std::string > Context
A request context.
Definition: Current.h:68
LocalException.h
Ice::ImplicitContext::~ImplicitContext
virtual ~ImplicitContext()
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
LocalObject.h
PushDisableWarnings.h
Ice::ImplicitContext::get
virtual ::std::string get(const ::std::string &key) const =0
Get the value associated with the given key in the underlying context.
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::ImplicitContext::put
virtual ::std::string put(const ::std::string &key, const ::std::string &value)=0
Create or update a key/value entry in the underlying context.
Ice::ImplicitContext::getContext
virtual ::Ice::Context getContext() const =0
Get a copy of the underlying context.
Ice::ImplicitContext::containsKey
virtual bool containsKey(const ::std::string &key) const =0
Check if this key has an associated value in the underlying context.
ObjectF.h
Ice::ImplicitContext::setContext
virtual void setContext(const Context &newContext)=0
Set the underlying context.
Ice
Definition: BuiltinSequences.h:56
ExceptionHelpers.h
Comparable.h
ScopedArray.h
Ice::ImplicitContext::remove
virtual ::std::string remove(const ::std::string &key)=0
Remove the entry for the given key in the underlying context.
Exception.h
ValueF.h
Ice::ImplicitContext
An interface to associate implict contexts with communicators.
Definition: ImplicitContext.h:93
PopDisableWarnings.h