This is the namespace ofALib Module, which implements access, evaluation and writing of configuration variables. Variable data can be load from different sources, for example configuration files, command line parameters, environment variables, or any custom storage type.
Please consult ALib Module Config - Programmer's Manual for further information.
Type Index: | |
struct | Bool |
class | CLIVariablesPlugin |
class | ConfigCamp |
class | ConfigResourcePool |
class | Configuration |
struct | ConfigurationListener |
class | ConfigurationPlugin |
class | Declaration |
class | EnvironmentVariablesPlugin |
struct | ERPriority |
ALib Enum Record associated with enumeration Priority. More... | |
class | IniFile |
class | IniFileFeeder |
class | TSharedConfiguration |
class | Variable |
struct | VMeta |
Type Definition Index: | |
using | StringVectorComma = alib::StringVectorPA |
using | StringVectorSemicolon = alib::StringVectorPA |
Enumeration Index: | |
enum class | Exceptions { ErrorOpeningFile = 1 , ErrorWritingFile = 2 } |
Exception codes of namespace alib::config. More... | |
enum class | Priority : uint16_t { NONE = 0 , AutoDetected = 1000 , DefaultValues = 2000 , Standard = 4000 , ConfigFile = 6000 , Environment = 8000 , SessionFile = 10000 , CLI = 12000 , Session = 14000 , Protected = (std::numeric_limits<uint16_t>::max)() } |
Type definition used with configuration variables of type "SV,"
, which stores a string array, imported by parsing a comma-separated string list.
Type definition used with configuration variables of type "SV;"
, which stores a string array, imported by parsing a string list separated by character ';'
.
|
strong |
Exception codes of namespace alib::config.
Enumerator | |
---|---|
ErrorOpeningFile | File not found when reading. |
ErrorWritingFile | An error occurred writing the file . |
Definition at line 23 of file configcamp.hpp.
|
strong |
Arithmetical enumeration used to control write access to configuration variables, depending on the source of assignable values.
Enumerator | |
---|---|
NONE | This priority value denotes that a variable is undefined and has no value set. The underlying integral value is |
AutoDetected | Constant providing a priority which is even lower than default. A use-case for this priority are for third party libraries that may preset variables in cases where values are estimated or detected instead of defaulted. |
DefaultValues | Used to store default values, either from (resourced) declarations, hard-coded values, or values provided with method Configuration::PresetImportString. The underlying integral value is |
Standard | This is the default priority when a variable is defined for setting a 'hard-coded' value. The underlying integral value is |
ConfigFile | External application configuration sources use this element to define variables found. This element is also used with built-in class IniFileFeeder. The underlying integral value is |
Environment | Used with plug-in EnvironmentVariablesPlugin. The underlying integral value is |
SessionFile | Used to store temporary session information. Those are higher than Environment but lower than CLI. This session priority is only a proposal. Implementations might use a different value, even for different variables, for example Environment - 1 or CLI + 1 . It depends on the use case. |
CLI | Used with plug-in CLIVariablesPlugin. The underlying integral value is |
Session | Used to store generate temporary session information. While usually changes made in source code has a low priority, session information is overwritten by running software, no matter from which external source an existing values came. If a software wants to disallow the change of session information imposed by a library or a different software part, still a value can be set to protected. The underlying integral value is |
Protected | Used to define variables with protected values. If all code entities apply to the contract that this camp imposes in respect to variable definitions and priorities, a value set with this priority cannot be manipulated from "outside", hence by config files, command line arguments or any custom configuration source or plug-in. The underlying integral value is |
Definition at line 28 of file priority.hpp.