ALib C++ Library
Library Version: 2402 R1
Documentation generated by doxygen
No Matches
alib::config Namespace Reference


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.

Nested Namespaces:

namespace  detail

Type Index:

class  CLIArgs
class  Config
class  Configuration
class  ConfigurationPlugin
class  Environment
struct  ERPriorities
class  IniFile
class  InMemoryPlugin
class  Variable
struct  VariableDecl
class  XTernalizer

Enumeration Index:

enum class  Exceptions { ErrorOpeningFile = 1 , ErrorWritingFile = 2 }
enum class  FormatHints { None = 0 , MultiLine = 1 << 0 , NoDelimSpaces = 1 << 1 , Custom = 1 << 16 }
enum class  Priorities {
  ProtectedValues = (std::numeric_limits<int>::max)() , CLI = 40000 , Environment = 30000 , Standard = 20000 ,
  DefaultValues = 10000 , AutoDetected = 500 , NONE = 0

Enumeration Details:

◆ Exceptions

enum class Exceptions

Exception codes of namespace alib::config.


File not found when reading.


An error occurred writing the file .

Definition at line 36 of file config.hpp.

◆ FormatHints

enum class FormatHints

Denotes hints for formatting variables when storing in external configuration files

Definition at line 33 of file variabledecl.hpp.

◆ Priorities

enum class Priorities

Arithmetical enumeration used to prioritize of type ConfigurationPlugin objects attached to instances of class Configuration .


Used to store protected values. By default, a plug-in of type InMemoryPlugin is installed here. No other plug-in can overwrite configuration variables which are defined in a plug-in with this priority.
The underlying integral value is std::numeric_limits<int>::max().


Used with plug-in CLIArgs . The underlying integral value is 40000.


Used with plug-in Environment . The underlying integral value is 30,000.


Used to attach the main application configuration plug-in. For example an plug-in of type IniFile . The underlying integral value is 20,000.


Used to store default values. By default, a plug-in of type InMemoryPlugin is installed here.. The underlying integral value is 10,000.


Constant providing a priority which is even lower than default. This priority is not used by any standard plug-ins and currently not even anywhere in detail ALib . The rationale to provide it, is for third party libraries that may use this value in cases where values are estimated or detected instead of defaulted.
A user of the module may then overwrite such auto-detection by setting a default value in the configuration.
The underlying integral value is 500.


Used to denote that no variable or plug-in was found.

Definition at line 37 of file priorities.hpp.