10 #include <unordered_map>
45 void set(
const char* name,
const char* value);
47 const char*
get(
const char* name,
const char* defval)
const;
49 int get_int(
const char* name,
int defval)
const;
51 bool get_bool(
const char* name,
bool defval)
const;
53 float get_float(
const char* name,
float defval)
const;
59 bool get_bool(
const char* section,
const char* name,
bool defval)
const;
62 using map_type = std::unordered_map<std::string, std::string>;
Configuration class to initialize the API Represents a collection of (name,value) pairs used to confi...
Definition: configuration.h:31
configuration & operator=(configuration &&)=default
Move constructor.
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,...
configuration & operator=(const configuration &)=default
Assignment operator.
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.
configuration(const configuration &)=default
Copy constructor.
void set(const char *name, const char *value)
Sets the value for a given name. It overrides any existing values for that name.
bool get_bool(const char *section, const char *name, bool defval) const
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.
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.
configuration(configuration &&)=default
Move assignment operator.
[Error Generator]
Definition: live_model.h:25
reinforcement_learning::status_builder & operator<<(reinforcement_learning::status_builder &sbuilder, const T &val)
left shift operator to serialize types into stringstream held in status_builder
Definition: api_status.h:160