Empirical
|
Base class for all configuration settings. More...
#include <config.h>
Public Member Functions | |
ConfigEntry (const std::string _name, const std::string _type, const std::string _d_val, const std::string _desc) | |
virtual | ~ConfigEntry () |
const std::string & | GetName () const |
const std::string & | GetType () const |
const std::string & | GetDefault () const |
const std::string & | GetDescription () const |
ConfigEntry & | SetName (const std::string &_in) |
ConfigEntry & | SetType (const std::string &_in) |
ConfigEntry & | SetDefault (const std::string &_in) |
ConfigEntry & | SetDescription (const std::string &_in) |
ConfigEntry & | AddAlias (const std::string &_in) |
Alert this setting that it is aliased to alternate possible names. More... | |
bool | HasAlias (const std::string &_in) |
Are there any alternate names for this setting? More... | |
bool | IsMatch (const std::string &_in) |
Will the provided name match this setting? More... | |
const std::unordered_set< std::string > & | GetAliases () |
Retrieve the full set of aliases. More... | |
virtual std::string | GetValue () const =0 |
Retrieve the value of this setting as a string. More... | |
virtual std::string | GetLiteralValue () const =0 |
Conver the value of this setting into a literal that C++ would recognize as its current value. More... | |
virtual ConfigEntry & | SetValue (const std::string &in_val, std::stringstream &warnings)=0 |
Use a string to set the value of this setting. More... | |
virtual bool | IsConst () const =0 |
Identify if this setting is fixed at compile time. More... | |
Protected Attributes | |
std::string | name |
std::string | type |
std::string | default_val |
std::string | desc |
std::unordered_set< std::string > | alias_set |
Base class for all configuration settings.
|
inline |
|
inlinevirtual |
|
inline |
Alert this setting that it is aliased to alternate possible names.
|
inline |
Retrieve the full set of aliases.
|
inline |
|
inline |
|
pure virtual |
Conver the value of this setting into a literal that C++ would recognize as its current value.
Implemented in emp::Config::ConfigLiveEntry, emp::Config::tConfigConstEntry< VAR_TYPE >, and emp::Config::tConfigEntry< VAR_TYPE >.
|
inline |
|
inline |
|
pure virtual |
Retrieve the value of this setting as a string.
Implemented in emp::Config::ConfigLiveEntry, emp::Config::tConfigConstEntry< VAR_TYPE >, and emp::Config::tConfigEntry< VAR_TYPE >.
|
inline |
Are there any alternate names for this setting?
|
pure virtual |
Identify if this setting is fixed at compile time.
Implemented in emp::Config::ConfigLiveEntry, emp::Config::tConfigConstEntry< VAR_TYPE >, and emp::Config::tConfigEntry< VAR_TYPE >.
|
inline |
Will the provided name match this setting?
|
inline |
|
inline |
|
inline |
|
inline |
|
pure virtual |
Use a string to set the value of this setting.
Implemented in emp::Config::ConfigLiveEntry, emp::Config::tConfigConstEntry< VAR_TYPE >, and emp::Config::tConfigEntry< VAR_TYPE >.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |