ifw-daq  2.1.0-pre1
IFW Data Acquisition modules
Classes | Enumerations | Functions
daq::config Namespace Reference

Classes

class  Manager
 Maintains the associativity of configuration attributes with metadata and value origin/priority. More...
 
struct  OriginInfo
 Mutable metadata about a configuration attribute that describes where a value comes from. More...
 

Enumerations

enum  Origin {
  Origin::Runtime = 0, Origin::CommandLine, Origin::Configuration, Origin::EnvironmentVariable,
  Origin::Default
}
 Configuration origins in descending priority. More...
 

Functions

std::ostream & operator<< (std::ostream &os, Origin origin)
 Format Origin. More...
 
std::ostream & operator<< (std::ostream &os, OriginInfo const &info)
 Format OriginInfo. More...
 

Class Documentation

◆ daq::config::Metadata

struct daq::config::Metadata

Immutable information about a configuration attribute.

Definition at line 64 of file manager.hpp.

Class Members
string canonical_name
string description

◆ daq::config::OriginInfo

struct daq::config::OriginInfo

Mutable metadata about a configuration attribute that describes where a value comes from.

Definition at line 72 of file manager.hpp.

Class Members
string description May include additional information like which configuration file was used.
Origin origin

Enumeration Type Documentation

◆ Origin

enum daq::config::Origin
strong

Configuration origins in descending priority.

This is used to indicate from where a configuration parameter originates as well as its configuration priority. Higher or equal priority (lower number) replace lower or equal priority origins.

Enumerator
Runtime 

Runtime change via e.g.

request/reply command.

CommandLine 

Command line argument.

Configuration 

Configuration file.

EnvironmentVariable 

Environment variable.

Default 

Built-in default value.

Definition at line 30 of file manager.hpp.

Function Documentation

◆ operator<<() [1/2]

std::ostream & daq::config::operator<< ( std::ostream &  os,
Origin  origin 
)

Format Origin.

Parameters
osoutput stream.
originOrigin to format.

Definition at line 16 of file manager.cpp.

◆ operator<<() [2/2]

std::ostream & daq::config::operator<< ( std::ostream &  os,
OriginInfo const &  info 
)

Format OriginInfo.

Parameters
osoutput stream.
infoOriginInfo to format.

Definition at line 40 of file manager.cpp.