Collection of named feature values.
More...
#include <FeatureConfiguration.hpp>
Collection of named feature values.
Definition at line 27 of file FeatureConfiguration.hpp.
◆ getFeatureOptions()
const FeatureOptions * sparta::app::FeatureConfiguration::getFeatureOptions |
( |
const std::string & |
feature_name | ) |
const |
|
inline |
Return the feature options data structure for the given feature name. If there are no options for this feature, this method still returns a non-null FeatureOptions pointer, though all of its option values will return the default value you pass in.
auto feat_opts = feat_cfg->getFeatureOptions("nonexistent");
sparta_assert(feat_opts != nullptr);
// "pi equals 3.14" (despite having no option values)
std::cout << feat_opts->getOptionValue<std::string>("nonexistent", "pi");
std::cout << " equals ";
std::cout << feat_opts->getOptionValue<double>("nonexistent", 3.14);
Definition at line 230 of file FeatureConfiguration.hpp.
◆ getFeatureValue()
unsigned int sparta::app::FeatureConfiguration::getFeatureValue |
( |
const std::string & |
feature_name | ) |
const |
|
inline |
◆ isFeatureValueSet()
bool sparta::app::FeatureConfiguration::isFeatureValueSet |
( |
const std::string & |
feature_name | ) |
const |
|
inline |
◆ setFeatureOptionsFromFile()
void sparta::app::FeatureConfiguration::setFeatureOptionsFromFile |
( |
const std::string & |
feature_name, |
|
|
const std::string & |
yaml_opts_fname |
|
) |
| |
|
inline |
◆ setFeatureValue()
void sparta::app::FeatureConfiguration::setFeatureValue |
( |
const std::string & |
name, |
|
|
const unsigned int |
value |
|
) |
| |
|
inline |
The documentation for this class was generated from the following file: