Ice 3.7 C++11 API Reference
Loading...
Searching...
No Matches
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.11
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>
30#include <Ice/LocalException.h>
31#include <Ice/Current.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 < 11
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
58namespace Ice
59{
60
61class ImplicitContext;
62
63}
64
65namespace Ice
66{
67
92class ICE_CLASS(ICE_API) ImplicitContext
93{
94public:
95
97
102 virtual ::Ice::Context getContext() const = 0;
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
146namespace Ice
147{
148
149}
151
153namespace Ice
154{
155
156using ImplicitContextPtr = ::std::shared_ptr<ImplicitContext>;
157
158}
160
161#else // C++98 mapping
162
163namespace Ice
164{
165
166class ImplicitContext;
168ICE_API LocalObject* upCast(ImplicitContext*);
170typedef ::IceInternal::Handle< ImplicitContext> ImplicitContextPtr;
171
172}
173
174namespace Ice
175{
176
201class ICE_API ImplicitContext : public virtual LocalObject
202{
203public:
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
261inline bool operator==(const ImplicitContext& lhs, const ImplicitContext& rhs)
262{
263 return static_cast<const LocalObject&>(lhs) == static_cast<const LocalObject&>(rhs);
264}
265
266inline 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
275namespace Ice
276{
277
278}
280
281#endif
282
284#endif
#define ICE_API
Definition Config.h:197
#define ICE_MEMBER(API)
Definition Config.h:177
An interface to associate implict contexts with communicators.
Definition ImplicitContext.h:93
virtual bool containsKey(const ::std::string &key) const =0
Check if this key has an associated value in the underlying context.
virtual::std::string get(const ::std::string &key) const =0
Get the value associated with the given key in the underlying context.
virtual::std::string put(const ::std::string &key, const ::std::string &value)=0
Create or update a key/value entry in the underlying context.
virtual void setContext(const Context &newContext)=0
Set the underlying context.
virtual::Ice::Context getContext() const =0
Get a copy of the underlying context.
virtual::std::string remove(const ::std::string &key)=0
Remove the entry for the given key in the underlying context.
virtual ~ImplicitContext()
Definition BuiltinSequences.h:56
IceUtil::Shared * upCast(::Ice::LocalObject *)
::std::map<::std::string, ::std::string > Context
A request context.
Definition Current.h:68
bool operator<(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition Comparable.h:136
bool operator==(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition Comparable.h:184