Ice 3.7 C++11 API Reference
Properties.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 `Properties.ice'
10 //
11 // Warning: do not edit this file.
12 //
13 // </auto-generated>
14 //
15 
16 #ifndef __Ice_Properties_h__
17 #define __Ice_Properties_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/FactoryTableInit.h>
33 #include <IceUtil/ScopedArray.h>
34 #include <Ice/Optional.h>
35 #include <Ice/PropertiesAdmin.h>
36 #include <IceUtil/UndefSysMacros.h>
37 
38 #ifndef ICE_IGNORE_VERSION
39 # if ICE_INT_VERSION / 100 != 307
40 # error Ice version mismatch!
41 # endif
42 # if ICE_INT_VERSION % 100 >= 50
43 # error Beta header file detected
44 # endif
45 # if ICE_INT_VERSION % 100 < 10
46 # error Ice patch level mismatch!
47 # endif
48 #endif
49 
50 #ifndef ICE_API
51 # if defined(ICE_STATIC_LIBS)
52 # define ICE_API
53 # elif defined(ICE_API_EXPORTS)
54 # define ICE_API ICE_DECLSPEC_EXPORT
55 # else
56 # define ICE_API ICE_DECLSPEC_IMPORT
57 # endif
58 #endif
59 
60 #ifdef ICE_CPP11_MAPPING // C++11 mapping
61 
62 namespace Ice
63 {
64 
65 class Properties;
66 
67 }
68 
69 namespace Ice
70 {
71 
79 class ICE_CLASS(ICE_API) Properties
80 {
81 public:
82 
84 
92  virtual ::std::string getProperty(const ::std::string& key) noexcept = 0;
93 
103  virtual ::std::string getPropertyWithDefault(const ::std::string& key, const ::std::string& value) noexcept = 0;
104 
112  virtual int getPropertyAsInt(const ::std::string& key) noexcept = 0;
113 
124  virtual int getPropertyAsIntWithDefault(const ::std::string& key, int value) noexcept = 0;
125 
139  virtual ::Ice::StringSeq getPropertyAsList(const ::std::string& key) noexcept = 0;
140 
156  virtual ::Ice::StringSeq getPropertyAsListWithDefault(const ::std::string& key, const StringSeq& value) noexcept = 0;
157 
166  virtual ::Ice::PropertyDict getPropertiesForPrefix(const ::std::string& prefix) noexcept = 0;
167 
175  virtual void setProperty(const ::std::string& key, const ::std::string& value) = 0;
176 
185 
198  virtual ::Ice::StringSeq parseCommandLineOptions(const ::std::string& prefix, const StringSeq& options) = 0;
199 
209  virtual ::Ice::StringSeq parseIceCommandLineOptions(const StringSeq& options) = 0;
210 
215  virtual void load(const ::std::string& file) = 0;
216 
221  virtual ::std::shared_ptr<::Ice::Properties> clone() noexcept = 0;
222 };
223 
224 }
225 
227 namespace Ice
228 {
229 
230 }
232 
234 namespace Ice
235 {
236 
237 using PropertiesPtr = ::std::shared_ptr<Properties>;
238 
239 }
241 
242 #else // C++98 mapping
243 
244 namespace IceProxy
245 {
246 
247 }
248 
249 namespace Ice
250 {
251 
252 class Properties;
254 ICE_API LocalObject* upCast(Properties*);
256 typedef ::IceInternal::Handle< Properties> PropertiesPtr;
257 
258 }
259 
260 namespace IceProxy
261 {
262 
263 }
264 
265 namespace Ice
266 {
267 
275 class ICE_API Properties : public virtual LocalObject
276 {
277 public:
278 
279  typedef PropertiesPtr PointerType;
280 
281  virtual ~Properties();
282 
283 #ifdef ICE_CPP11_COMPILER
284  Properties() = default;
285  Properties(const Properties&) = default;
286  Properties& operator=(const Properties&) = default;
287 #endif
288 
296  virtual ::std::string getProperty(const ::std::string& key) ICE_NOEXCEPT = 0;
297 
307  virtual ::std::string getPropertyWithDefault(const ::std::string& key, const ::std::string& value) ICE_NOEXCEPT = 0;
308 
316  virtual Int getPropertyAsInt(const ::std::string& key) ICE_NOEXCEPT = 0;
317 
328  virtual Int getPropertyAsIntWithDefault(const ::std::string& key, Int value) ICE_NOEXCEPT = 0;
329 
343  virtual StringSeq getPropertyAsList(const ::std::string& key) ICE_NOEXCEPT = 0;
344 
360  virtual StringSeq getPropertyAsListWithDefault(const ::std::string& key, const StringSeq& value) ICE_NOEXCEPT = 0;
361 
370  virtual PropertyDict getPropertiesForPrefix(const ::std::string& prefix) ICE_NOEXCEPT = 0;
371 
379  virtual void setProperty(const ::std::string& key, const ::std::string& value) = 0;
380 
388  virtual StringSeq getCommandLineOptions() ICE_NOEXCEPT = 0;
389 
402  virtual StringSeq parseCommandLineOptions(const ::std::string& prefix, const StringSeq& options) = 0;
403 
413  virtual StringSeq parseIceCommandLineOptions(const StringSeq& options) = 0;
414 
419  virtual void load(const ::std::string& file) = 0;
420 
425  virtual PropertiesPtr clone() ICE_NOEXCEPT = 0;
426 };
427 
429 inline bool operator==(const Properties& lhs, const Properties& rhs)
430 {
431  return static_cast<const LocalObject&>(lhs) == static_cast<const LocalObject&>(rhs);
432 }
433 
434 inline bool operator<(const Properties& lhs, const Properties& rhs)
435 {
436  return static_cast<const LocalObject&>(lhs) < static_cast<const LocalObject&>(rhs);
437 }
439 
440 }
441 
443 namespace Ice
444 {
445 
446 }
448 
449 #endif
450 
452 #endif
Ice::Properties::getPropertyAsListWithDefault
virtual ::Ice::StringSeq getPropertyAsListWithDefault(const ::std::string &key, const StringSeq &value) noexcept=0
Get a property as a list of strings.
Ice::Properties
A property set used to configure Ice and Ice applications.
Definition: Properties.h:80
Optional.h
Ice::Properties::~Properties
virtual ~Properties()
PropertiesAdmin.h
StreamHelpers.h
Ice::PropertyDict
::std::map<::std::string, ::std::string > PropertyDict
A simple collection of properties, represented as a dictionary of key/value pairs.
Definition: PropertiesAdmin.h:78
Ice::upCast
IceUtil::Shared * upCast(::Ice::LocalObject *)
GCObject.h
Ice::Properties::getCommandLineOptions
virtual ::Ice::StringSeq getCommandLineOptions() noexcept=0
Get a sequence of command-line options that is equivalent to this property set.
Ice::Properties::setProperty
virtual void setProperty(const ::std::string &key, const ::std::string &value)=0
Set a property.
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
Ice::Properties::getPropertyAsList
virtual ::Ice::StringSeq getPropertyAsList(const ::std::string &key) noexcept=0
Get a property as a list of strings.
Ice::Properties::getPropertyAsInt
virtual int getPropertyAsInt(const ::std::string &key) noexcept=0
Get a property as an integer.
LocalObject.h
Ice::Properties::getPropertyWithDefault
virtual ::std::string getPropertyWithDefault(const ::std::string &key, const ::std::string &value) noexcept=0
Get a property by key.
PushDisableWarnings.h
Ice::Properties::getPropertyAsIntWithDefault
virtual int getPropertyAsIntWithDefault(const ::std::string &key, int value) noexcept=0
Get a property as an integer.
ProxyF.h
Ice::operator<
bool operator<(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition: Comparable.h:136
Object.h
Proxy.h
UndefSysMacros.h
Ice::Properties::getPropertiesForPrefix
virtual ::Ice::PropertyDict getPropertiesForPrefix(const ::std::string &prefix) noexcept=0
Get all properties whose keys begins with prefix.
ObjectF.h
Ice::StringSeq
::std::vector<::std::string > StringSeq
A sequence of strings.
Definition: BuiltinSequences.h:96
Ice
Definition: BuiltinSequences.h:56
Ice::Properties::getProperty
virtual ::std::string getProperty(const ::std::string &key) noexcept=0
Get a property by key.
Comparable.h
ScopedArray.h
Exception.h
ValueF.h
Ice::Int
int Int
The mapping for the Slice int type.
Definition: Config.h:54
Value.h
PopDisableWarnings.h