Licensed under the LGPL v2.1 or newer, see LICENSE for details.
-
C++ compiler: support for C++17 (ISO/IEC 14882:2017) is required
-
CMake: at least 3.15
-
toml++: toml for C++ is used for reading and writing the TOML files, included as a
git submodule.
This library is intended to be used as a git submodule from the main source repository.
By #define'ing CONFIG_NAMESPACE you can put all the libraries classes into the namespace CONFIG_NAMESPACE::config. This mechanism is used to
keep configuration of COVISE, OpenCOVER and Vistle separated.
- the library is not thread-safe
- initiate access to the config subsystem with
Access(#include <access.h>) - access values from configuration with
Valuetemplate,typedefed toConfigBool,ConfigInt,ConfigFloatandConfigString(#include <value.h>) - access homogeneous arrays of values from configuration with
Arraytemplate,typedefed toConfigBoolArray,ConfigIntArray,ConfigFloatArrayandConfigStringArray(#include <array.h>) - modification of values/arrays is possible, will be stored to user configuration directory when saving of configuration path is requested
- install an update handler on
Values andArrays for being notified when values are changed from within same process - existing sections and entries can be queried with
File(#include <file.h>) - revoke access with by destroying
Access - on UNIX, search paths follow XDG specification
- in addition, the current directory and the config subdirectory of software installation prefix are searched
- configuration in host and cluster specific subdirectories is preferred
- for every configuration path, only a single file is loaded - configuration data is not merged
- configuration is not reloaded when being changed on disk
- for getting debug output set the environment variable
COVCONFIG_DEBUG: empty will generate all output, setting it to a non-negative level controls the amount of logging