Fawkes API Fawkes Development Version
|
A configurable property that is skill-specific and may have a default value. More...
#include <execution_time_estimator.h>
Public Member Functions | |
Property (fawkes::Configuration *config, const std::string &path, const std::string &property, const std::optional< T > &default_value=std::nullopt) | |
Constructor. More... | |
T | get_property (const std::string &key) const |
Get the property falue for a given skill. More... | |
T | get_default_value () const |
Get the default value if it is set, otherwise throw an exception. More... | |
Public Attributes | |
std::map< std::string, T > | property_entries |
Mapping from skill entry id to property value. More... | |
A configurable property that is skill-specific and may have a default value.
Definition at line 55 of file execution_time_estimator.h.
fawkes::ExecutionTimeEstimator::Property< T >::Property | ( | fawkes::Configuration * | config, |
const std::string & | path, | ||
const std::string & | property, | ||
const std::optional< T > & | default_value = std::nullopt |
||
) |
Constructor.
Create a property by reading all values from the config.
config | Config to read form |
path | Path under which the config values can be found |
property | Property name |
default_value | Default value in case values are not specified |
Definition at line 244 of file execution_time_estimator.cpp.
References fawkes::Configuration::get_bool(), fawkes::Configuration::get_float(), fawkes::Configuration::get_string(), fawkes::Configuration::search(), and fawkes::str_split().
T fawkes::ExecutionTimeEstimator::Property< T >::get_default_value | ( | ) | const |
Get the default value if it is set, otherwise throw an exception.
Definition at line 290 of file execution_time_estimator.cpp.
T fawkes::ExecutionTimeEstimator::Property< T >::get_property | ( | const std::string & | key | ) | const |
Get the property falue for a given skill.
key | Skill entry id |
Definition at line 301 of file execution_time_estimator.cpp.
std::map<std::string, T> fawkes::ExecutionTimeEstimator::Property< T >::property_entries |
Mapping from skill entry id to property value.
Definition at line 66 of file execution_time_estimator.h.