#include <config.hpp>
Definition at line 187 of file config.hpp.
Public Member Functions | |
template<> | |
void | assign_from_string (const gsgl::string &s) |
Change the value of the config variable based on a given string. | |
template<> | |
void | assign_from_string (const gsgl::string &s) |
Change the value of the config variable based on a given string. | |
template<> | |
void | assign_from_string (const gsgl::string &s) |
Change the value of the config variable based on a given string. | |
template<> | |
void | assign_from_string (const gsgl::string &s) |
Change the value of the config variable based on a given string. | |
config_variable (const gsgl::string &path, const T &value=T()) | |
template<> | |
gsgl::string | get_string () const |
Get a string representation of the value of the variable. | |
template<> | |
gsgl::string | get_string () const |
Get a string representation of the value of the variable. | |
template<> | |
gsgl::string | get_string () const |
Get a string representation of the value of the variable. | |
template<> | |
gsgl::string | get_string () const |
Get a string representation of the value of the variable. | |
const T & | get_value () const |
operator const T & () const | |
Static Public Member Functions | |
static const config_record & | get_config () |
Returns a reference to the global config record that contains entries for all config variables. | |
static void | override_with (const config_record &) |
Override the global config vars with the data in the given config record. | |
static void | save (const gsgl::string &fname) |
Save the global config to a file. | |
Protected Member Functions | |
virtual void | assign_from_string (const gsgl::string &) |
Change the value of the config variable based on a given string. | |
virtual gsgl::string | get_string () const |
Get a string representation of the value of the variable. | |
Protected Attributes | |
config_record & | associated_record |
Static Protected Attributes | |
static config_record | global_config_vars |
Private Member Functions | |
config_variable (const config_variable &cv) | |
You cannot copy config variables. | |
config_variable & | operator= (const config_variable &cv) |
You cannot copy config variables. | |
Private Attributes | |
T | value |
config_variable | ( | const gsgl::string & | path, | |
const T & | value = T() | |||
) | [inline] |
Definition at line 192 of file config.hpp.
config_variable | ( | const config_variable< T > & | cv | ) | [inline, private] |
void assign_from_string | ( | const gsgl::string & | ) | [inline, virtual] |
Change the value of the config variable based on a given string.
Implements global_config.
Definition at line 110 of file color.hpp.
References iterable::iter(), string::split(), and config_variable::value.
void assign_from_string | ( | const gsgl::string & | ) | [inline, virtual] |
Change the value of the config variable based on a given string.
Implements global_config.
Definition at line 262 of file config.hpp.
References string::to_int(), and config_variable::value.
void assign_from_string | ( | const gsgl::string & | ) | [inline, virtual] |
Change the value of the config variable based on a given string.
Implements global_config.
Definition at line 248 of file config.hpp.
References string::to_double(), and config_variable::value.
void assign_from_string | ( | const gsgl::string & | ) | [inline, virtual] |
Change the value of the config variable based on a given string.
Implements global_config.
Definition at line 222 of file config.hpp.
References config_variable::value.
virtual void assign_from_string | ( | const gsgl::string & | ) | [protected, virtual] |
Change the value of the config variable based on a given string.
Implements global_config.
Referenced by config_variable< gsgl::platform::color >::config_variable().
static const config_record& get_config | ( | ) | [inline, static, inherited] |
Returns a reference to the global config record that contains entries for all config variables.
Note that not all entries may be present if package DLLs have not yet been loaded.
Definition at line 174 of file config.hpp.
Referenced by application::application(), and application::get_config_overrides().
gsgl::string get_string | ( | ) | const [inline, virtual] |
Get a string representation of the value of the variable.
Implements global_config.
Definition at line 103 of file color.hpp.
References string::format(), and config_variable::value.
gsgl::string get_string | ( | ) | const [inline, virtual] |
Get a string representation of the value of the variable.
Implements global_config.
Definition at line 269 of file config.hpp.
References string::format(), and config_variable::value.
gsgl::string get_string | ( | ) | const [inline, virtual] |
Get a string representation of the value of the variable.
Implements global_config.
Definition at line 255 of file config.hpp.
References string::format(), and config_variable::value.
gsgl::string get_string | ( | ) | const [inline, virtual] |
Get a string representation of the value of the variable.
Implements global_config.
Definition at line 229 of file config.hpp.
References config_variable::value.
virtual gsgl::string get_string | ( | ) | const [protected, virtual] |
Get a string representation of the value of the variable.
Implements global_config.
Referenced by config_variable< gsgl::platform::color >::config_variable().
const T& get_value | ( | ) | const [inline] |
Definition at line 210 of file config.hpp.
Referenced by application::get_config_overrides(), and gsgl::data::operator+().
operator const T & | ( | ) | const [inline] |
config_variable& operator= | ( | const config_variable< T > & | cv | ) | [inline, private] |
void override_with | ( | const config_record & | cr | ) | [static, inherited] |
Override the global config vars with the data in the given config record.
Definition at line 671 of file config.cpp.
References global_config::global_config_vars, and config_record::override_with().
Referenced by application::get_config_overrides().
void save | ( | const gsgl::string & | fname | ) | [static, inherited] |
Save the global config to a file.
Definition at line 677 of file config.cpp.
References global_config::global_config_vars, config_record::override_with(), and config_record::save().
Referenced by application::get_config_overrides().
config_record& associated_record [protected, inherited] |
Definition at line 163 of file config.hpp.
Referenced by config_variable< gsgl::platform::color >::config_variable(), and global_config::global_config().
config_record global_config_vars [static, protected, inherited] |
Definition at line 162 of file config.hpp.
Referenced by global_config::override_with(), and global_config::save().
T value [private] |
Definition at line 190 of file config.hpp.
Referenced by config_variable::assign_from_string(), config_variable::get_string(), config_variable< gsgl::platform::color >::get_value(), config_variable::operator const T &(), and config_variable< gsgl::platform::color >::operator=().