global_config Class Reference

#include <config.hpp>

Inheritance diagram for global_config:

Inheritance graph
[legend]
Collaboration diagram for global_config:

Collaboration graph
[legend]

List of all members.


Detailed Description

Base class for global configuration variables.

The name is slightly unusual, but it was chosen so the static functions sound natural, e.g. global_config::override().

Definition at line 157 of file config.hpp.


Static Public Member Functions

static const config_recordget_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 &)=0
 Change the value of the config variable based on a given string.
virtual gsgl::string get_string () const =0
 Get a string representation of the value of the variable.
 global_config (const gsgl::string &path)
virtual ~global_config ()

Protected Attributes

config_recordassociated_record

Static Protected Attributes

static config_record global_config_vars

Constructor & Destructor Documentation

global_config ( const gsgl::string path  )  [protected]

~global_config (  )  [protected, virtual]

Definition at line 664 of file config.cpp.


Member Function Documentation

virtual void assign_from_string ( const gsgl::string  )  [protected, pure virtual]

static const config_record& get_config (  )  [inline, static]

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().

virtual gsgl::string get_string (  )  const [protected, pure virtual]

void override_with ( const config_record cr  )  [static]

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]

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().


Member Data Documentation

config_record global_config_vars [static, protected]

Definition at line 162 of file config.hpp.

Referenced by global_config::override_with(), and global_config::save().


The documentation for this class was generated from the following files:

Generated on Sat Mar 1 13:50:05 2008 for Periapsis Project by  doxygen 1.5.5