AnCh configuration library aims to provide facilities to handle configuration files.
ini , conf , cnf and properties files)CMake target anch::conf:
See installation.
Configuration is loaded once with Configuration::loader() and read with Configuration::inst(). Values are read with dotted paths (section.subsection.key ).
Loading order (later files override previous values): application , included files (database , security ), then for each active profile application-<profile> and <include>-<profile> when they exist. Active profiles are given to profiles() , or set in ANCH_PROFILES environment variable, or anch::conf.default-profiles .
${alternative|alternative|...}: an alternative is resolver=argument (env , conf or registered resolvers) or a default value; the first alternative which resolves is used. Resolution is event driven (a resolved value completes the values which reference it) and has a watchdog: cycles and too long resolution chains are errors (CYCLE ). Resolved values are literal.