Ice 3.7 Slice API Reference
Properties.ice
Go to the documentation of this file.
1 //
2 // Copyright (c) ZeroC, Inc. All rights reserved.
3 //
4 
5 #pragma once
6 
7 [["cpp:dll-export:ICE_API"]]
8 [["cpp:doxygen:include:Ice/Ice.h"]]
9 [["cpp:header-ext:h"]]
10 
11 [["ice-prefix"]]
12 
13 [["js:module:ice"]]
14 [["js:cjs-module"]]
15 
16 [["objc:dll-export:ICE_API"]]
17 [["objc:header-dir:objc"]]
18 
19 [["python:pkgdir:Ice"]]
20 
21 #include <Ice/PropertiesAdmin.ice>
22 
23 #ifndef __SLICE2JAVA_COMPAT__
24 [["java:package:com.zeroc"]]
25 #endif
26 
27 ["objc:prefix:ICE"]
28 module Ice
29 {
30 
31 #if !defined(__SLICE2PHP__)
32 
41 local interface Properties
42 {
55  ["cpp:noexcept", "swift:noexcept"] string getProperty(string key);
56 
72  ["cpp:noexcept", "swift:noexcept"] string getPropertyWithDefault(string key, string \value);
73 
86  ["cpp:noexcept", "swift:noexcept"] int getPropertyAsInt(string key);
87 
104  ["cpp:noexcept", "swift:noexcept"] int getPropertyAsIntWithDefault(string key, int \value);
105 
124  ["cpp:noexcept", "swift:noexcept"] StringSeq getPropertyAsList(string key);
125 
147  ["cpp:noexcept", "swift:noexcept"] StringSeq getPropertyAsListWithDefault(string key, StringSeq \value);
148 
160  ["cpp:noexcept", "swift:noexcept"] PropertyDict getPropertiesForPrefix(string prefix);
161 
173  ["swift:noexcept"] void setProperty(string key, string \value);
174 
185  ["cpp:noexcept", "swift:noexcept"] StringSeq getCommandLineOptions();
186 
204  StringSeq parseCommandLineOptions(string prefix, StringSeq options);
205 
220 
221 #ifndef __SLICE2JS__
222 
229  void load(string file);
230 #endif
231 
239  ["cpp:noexcept", "swift:noexcept", "swift:nonnull"] Properties clone();
240 }
241 
242 #endif
243 
244 }
PropertiesAdmin.ice
Ice::PropertyDict
dictionary< string, string > PropertyDict
A simple collection of properties, represented as a dictionary of key/value pairs.
Definition: PropertiesAdmin.ice:39
Ice::Properties::getPropertyAsList
StringSeq getPropertyAsList(string key)
Get a property as a list of strings.
Ice::StringSeq
sequence< string > StringSeq
A sequence of strings.
Definition: BuiltinSequences.ice:51
Ice::Properties::getPropertiesForPrefix
PropertyDict getPropertiesForPrefix(string prefix)
Get all properties whose keys begins with prefix.
Ice::Properties::getPropertyAsIntWithDefault
int getPropertyAsIntWithDefault(string key, int \value)
Get a property as an integer.
Ice::Properties::clone
Properties clone()
Create a copy of this property set.
Ice::Properties::parseIceCommandLineOptions
StringSeq parseIceCommandLineOptions(StringSeq options)
Convert a sequence of command-line options into properties.
Ice::Properties::getProperty
string getProperty(string key)
Get a property by key.
Ice::Properties
A property set used to configure Ice and Ice applications.
Definition: Properties.ice:42
Ice::Properties::parseCommandLineOptions
StringSeq parseCommandLineOptions(string prefix, StringSeq options)
Convert a sequence of command-line options into properties.
Ice::Properties::setProperty
void setProperty(string key, string \value)
Set a property.
Ice
The Ice core library.
Definition: BuiltinSequences.ice:27
Ice::Properties::getPropertyWithDefault
string getPropertyWithDefault(string key, string \value)
Get a property by key.
Ice::Properties::getPropertyAsListWithDefault
StringSeq getPropertyAsListWithDefault(string key, StringSeq \value)
Get a property as a list of strings.
Ice::Properties::getCommandLineOptions
StringSeq getCommandLineOptions()
Get a sequence of command-line options that is equivalent to this property set.
Ice::Properties::getPropertyAsInt
int getPropertyAsInt(string key)
Get a property as an integer.
Ice::Properties::load
void load(string file)
Load properties from a file.