#include <config.hpp>
Class to hold a set of related configuration values.
Configuration classes must derive from this class and define helper getter functions for each of its config values. Any derived class must define a constexpr C-string named "identifier" to uniquely identify that class.
- Author
- Timothy Flynn (trfly.nosp@m.nn89.nosp@m.@pm.m.nosp@m.e)
- Version
- July 18, 2016
◆ ~Config()
virtual fly::config::Config::~Config |
( |
| ) |
|
|
protectedvirtualdefault |
◆ get_value()
template<typename T >
T fly::config::Config::get_value |
( |
const std::string & |
name, |
|
|
T |
def |
|
) |
| const |
|
protected |
Get a value converted to a basic type, e.g. int or bool. If the value could not be found, or could not be converted to the given type, returns the provided default value.
- Template Parameters
-
T | The basic return type of the value. |
- Parameters
-
name | The name of the value. |
def | Default value to use if needed. |
- Returns
- The converted value or the default value.
◆ update()
void fly::config::Config::update |
( |
const Json & |
values | ) |
|
|
protected |
Update this configuration with a new set of parsed values.
The documentation for this class was generated from the following files: