Public Member Functions

Barry::GlobalConfigFile Class Reference

Collaboration diagram for Barry::GlobalConfigFile:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 GlobalConfigFile ()
 Loads the global config file.
 GlobalConfigFile (const std::string &appname)
 Loads the global config file, as well as any application-specific keywords and variables.
bool Save ()
 Save the current global config, overwriting or creating as needed.
void SetKey (const std::string &key, const std::string &value)
 Throws std::logic_error if not constructed with an appname.

Detailed Description

Definition at line 131 of file configfile.h.


Constructor & Destructor Documentation

Barry::GlobalConfigFile::GlobalConfigFile (  ) 

Loads the global config file.

Throws ConfigFileError on error, but it is not an error if the config does not exist.

Definition at line 335 of file configfile.cc.

Barry::GlobalConfigFile::GlobalConfigFile ( const std::string &  appname  ) 

Loads the global config file, as well as any application-specific keywords and variables.

Use this if you wish to make use of SetKey() and GetKey(), otherwise these functions will throw and exception since they don't have an application name.

Definition at line 343 of file configfile.cc.


Member Function Documentation

bool Barry::GlobalConfigFile::Save (  ) 

Save the current global config, overwriting or creating as needed.

Definition at line 422 of file configfile.cc.

References Barry::ConfigFile::CheckPath().

Here is the call graph for this function:

void Barry::GlobalConfigFile::SetKey ( const std::string &  key,
const std::string &  value 
)

Throws std::logic_error if not constructed with an appname.

Definition at line 452 of file configfile.cc.


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