Configuration class to initialize the API Represents a collection of (name,value) pairs used to configure the API. More...
#include <configuration.h>
Public Member Functions | |
| configuration (const configuration &)=default | |
| Copy constructor. | |
| configuration & | operator= (const configuration &)=default |
| Assignment operator. | |
| configuration & | operator= (configuration &&)=default |
| Move constructor. | |
| configuration (configuration &&)=default | |
| Move assignment operator. | |
| void | set (const char *name, const char *value) |
| Sets the value for a given name. It overrides any existing values for that name. | |
| const char * | get (const char *name, const char *defval) const |
| Gets the value for a given name. If the value does not exist, it returns defval. | |
| int | get_int (const char *name, int defval) const |
| Gets the value as an integer. If the value does not exist or if there is an error, it returns defval. | |
| bool | get_bool (const char *name, bool defval) const |
| Gets the value as a boolean. If the value does not exist or if there is an error, it returns defval. | |
| float | get_float (const char *name, float defval) const |
| Gets the value as a float. If the value does not exist or if there is an error, it returns defval. | |
| bool | get_bool (const char *section, const char *name, bool defval) const |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const reinforcement_learning::utility::configuration &) |
| friend Left shift operator | |
Configuration class to initialize the API Represents a collection of (name,value) pairs used to configure the API.
| bool reinforcement_learning::utility::configuration::get_bool | ( | const char * | section, |
| const char * | name, | ||
| bool | defval | ||
| ) | const |
Same as get_bool, but use global value as fallback before defval. Sections names are dot delimited. IE: section.property