Loader Class Reference

#include <loader.h>

List of all members.

Public Member Functions

 Loader ()
 ~Loader ()

Static Public Member Functions

static bool load (MSettings *settings, string path, bool suppressWarning=false, bool caseSensitive=false)
static bool saveSettings (MSettings *settings, string path)
static bool saveFile (string path, string content)
static void print (MSettings *settings)


Detailed Description

Loads and saves settings.

Definition at line 20 of file loader.h.


Constructor & Destructor Documentation

Loader::Loader (  ) 

Constructs a new settings manager instance.

Definition at line 18 of file loader.cpp.

Loader::~Loader (  ) 

Definition at line 21 of file loader.cpp.


Member Function Documentation

bool Loader::load ( MSettings settings,
string  path,
bool  suppressWarning = false,
bool  caseSensitive = false 
) [static]

(Re)loads settings. Returns true on success. The settings file has following grammar: <key>=

whitespaces (' ', '') are ignored by default (escape using "...") '\' is escape character for escaping from '"', '=', '#', '
', '\'

Parameters:
settings the settings to set
filename the filename to load from
suppressWarning suppresses warn messages to stderr
caseSensitive reads keys case sensitive if file couldn't be loaded

Definition at line 24 of file loader.cpp.

References ENDLINE, and Util::timestamp().

Referenced by loadSettings().

Here is the call graph for this function:

bool Loader::saveSettings ( MSettings settings,
string  path 
) [static]

Saves settings. Returns true on success.

Definition at line 139 of file loader.cpp.

References Util::containsWhitespaces(), Util::encodeEscapes(), and saveFile().

Referenced by main(), and Kernel::saveSettings().

Here is the call graph for this function:

bool Loader::saveFile ( string  path,
string  content 
) [static]

Saves content to the file specified by path.

Definition at line 158 of file loader.cpp.

References Util::canonicalDir(), Util::exists(), and Util::timestamp().

Referenced by Kernel::endScriptRecording(), and saveSettings().

Here is the call graph for this function:

void Loader::print ( MSettings settings  )  [static]

Prints all settings to stdout.

Definition at line 188 of file loader.cpp.


The documentation for this class was generated from the following files:
Generated on Thu May 24 15:20:18 2007 for ncwm by  doxygen 1.5.1