14#include <boost/algorithm/string/join.hpp>
27 os <<
"Configuration";
30 os <<
"EnvironmentVariable";
48std::optional<std::reference_wrapper<elt::configng::CiiConfigInstanceNode const>>
49GetParam(std::string
const& query, elt::configng::CiiConfigInstanceNode
const& node) {
54 auto pos = query.find(
'/');
55 if (pos == std::string::npos) {
57 if (node.Has(query)) {
58 return std::cref(node[query]);
62 auto next = query.substr(0, pos);
63 auto next_query = query.substr(pos + 1, std::string::npos);
64 if (!node.Has(next)) {
67 return GetParam(next_query, node[next]);
daq::config::Manager and associated types.
std::string description
May include additional information like which configuration file was used.
Origin
Configuration origins in descending priority.
@ Configuration
Configuration file.
@ Default
Built-in default value.
@ Runtime
Runtime change via e.g.
@ CommandLine
Command line argument.
@ EnvironmentVariable
Environment variable.
std::optional< std::reference_wrapper< elt::configng::CiiConfigInstanceNode const > > GetParam(std::string const &query, elt::configng::CiiConfigInstanceNode const &node)
Performs lookup of parameters in the form root/node/leaf relative to the provided node.
std::ostream & operator<<(std::ostream &os, Origin origin)
Format Origin.
Mutable metadata about a configuration attribute that describes where a value comes from.