Empirical
|
Master configuration class that manages all of the settings. More...
#include <config.h>
Classes | |
class | ConfigGroup |
Information about a sub-group of settings. More... | |
class | ConfigLiveEntry |
Special settings entry for settings created during the run (only accissibly dynamically) More... | |
class | tConfigConstEntry |
Type-specific and CONST versions of ConfigEntry class to manage fixed settings. More... | |
class | tConfigEntry |
Type-specific versions of ConfigEntry class to manage settings. More... | |
Public Member Functions | |
Config (const std::string &in_version="") | |
~Config () | |
ConfigEntry * | operator[] (const std::string &name) |
auto | begin () -> decltype(var_map.begin()) |
auto | end () -> decltype(var_map.end()) |
Config & | SetExpandOK (bool ok=true) |
bool | Has (const std::string &setting_name) const |
bool | ResolveAlias (std::string &setting_name) const |
std::string | Get (std::string setting_name) |
Config & | Set (std::string setting_name, const std::string &new_value, const std::string &in_desc="") |
std::string | operator() (const std::string &setting_name) |
Config & | operator() (const std::string &setting_name, const std::string &new_value) |
void | AddAlias (const std::string &base_name, const std::string &alias_name) |
void | Write (std::ostream &out) |
void | Write (std::string filename) |
void | WriteMacros (std::ostream &out, bool as_const=false) |
void | WriteMacros (std::string filename, bool as_const=false) |
bool | Read (std::istream &input) |
bool | Read (std::string filename) |
void | AddCommand (const std::string &command_name, std::function< bool(std::string)> command_fun) |
void | AddNewCallback (const std::string &type_name, std::function< bool(std::string)> new_fun) |
void | AddUseCallback (const std::string &type_name, std::function< bool(std::string)> use_fun) |
template<class MANAGED_TYPE > | |
void | AddManagedType (const std::string &type_keyword, const std::string &command_keyword, std::function< bool(MANAGED_TYPE &, std::string)> fun_callback) |
Protected Member Functions | |
ConfigGroup * | GetActiveGroup () |
ConfigEntry * | GetActiveEntry () |
bool | IsVarChar (const char c) |
void | ProcessLine (std::string &cur_line, std::string &extras) |
Protected Attributes | |
emp::vector< std::string > | class_names |
std::map< std::string, ConfigEntry * > | var_map |
std::string | version_id |
emp::vector< ConfigGroup * > | group_set |
std::stringstream | warnings |
int | delay_warnings |
std::map< std::string, std::string > | alias_map |
std::map< std::string, ConfigManager_Base * > | type_manager_map |
std::map< std::string, std::function< bool(std::string)> > | command_map |
std::map< std::string, std::function< bool(std::string)> > | new_map |
std::map< std::string, std::function< bool(std::string)> > | use_map |
bool | expand_ok |
Master configuration class that manages all of the settings.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprotected |
|
inlineprotected |
|
inline |
|
inlineprotected |
|
inline |
|
inline |
|
inline |
|
inlineprotected |
|
inline |
Read in from a text representation (typically a file) to set the state of Config. Return success state.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |