GedConf Class Reference

#include <gedconf.h>

List of all members.

Public Member Functions

 ~GedConf ()
void readConfig (const char *pathToFile)
void saveConfig ()
PluginDirsList getPluginDirs ()
void setPluginDir (const char *pathToDir)
void removePluginDir (const char *pathToDir)
MacroList getMacroList ()
CommandVector getCommands (const std::string macroName)
void removeMacro (const std::string macroName)
void addMacro (const char *macroName, const char *commandName, const char *commandParams)
std::string getHelpDir ()
std::string getImageDir ()
void getFont (std::string &fileName, std::string &dpi, std::string &size)

Static Public Member Functions

static GedConfptr ()
static void destroy ()

Protected Member Functions

 GedConf ()


Detailed Description

Definition at line 96 of file gedconf.h.


Constructor & Destructor Documentation

GedConf::~GedConf (  ) 

GedConf::GedConf (  )  [inline, protected]

Singleton can't be allocated static. use GedConf::ptr() method to obtain singleton address.

Definition at line 194 of file gedconf.h.


Member Function Documentation

static GedConf* GedConf::ptr (  )  [static]

Access point to singleton.

Returns:
Return pointer to singleton.

static void GedConf::destroy (  )  [static]

Destroy singleton object. It has no effect, if object is not allocated.

void GedConf::readConfig ( const char *  pathToFile  ) 

Read configuration file incrementally. New nodes replace existing if redefined.

Parameters:
pathToFile Path to config file to read.

void GedConf::saveConfig (  ) 

Save configuration to config file that was opened last. Existing file is replaced.

PluginDirsList GedConf::getPluginDirs (  ) 

Return the list of directories containing plugins.

Returns:
Return map of plugins, empty map if no directory was found. The key contains directory name.

void GedConf::setPluginDir ( const char *  pathToDir  ) 

Add plugin directory to configuration file opened as last. If there wasn't any opened configuration file, 'ged.conf' is used.

Parameters:
pathToDir Path to directory with plugins.

void GedConf::removePluginDir ( const char *  pathToDir  ) 

Remove plugin directory from last opend configuration file.

Parameters:
pathToDir Directory to remove.

MacroList GedConf::getMacroList (  ) 

Return macro list, empty map if no macro was found.

Returns:
Return macro map. The key is name of the macro. The value is configuration file, where was macro found.

CommandVector GedConf::getCommands ( const std::string  macroName  ) 

Return vector of commands for desired macro, empty vector if macro wasn't found.

Parameters:
macroName Name of the macro.
Returns:
Return squence of commands.

void GedConf::removeMacro ( const std::string  macroName  ) 

Remove macro from configuration file. It has no effect if macro isn't from last configuration file.

Parameters:
macroName Macro name to remove.

void GedConf::addMacro ( const char *  macroName,
const char *  commandName,
const char *  commandParams 
)

Add macro or add command to existing macro.

Parameters:
macroName Macro name.
commandName Command name.
commandParams Command data.

std::string GedConf::getHelpDir (  ) 

Return help directory. If help directory option is not found, return default help directory '../doc/help'.

Returns:
Help directory.

std::string GedConf::getImageDir (  ) 

Return images directory. If images directory option is not found, return default help directory 'images'.

Returns:
Images directory.

void GedConf::getFont ( std::string &  fileName,
std::string &  dpi,
std::string &  size 
)

Return font properties.

Parameters:
fileName File containing font.
dpi Font resolution.
size Base font size.


The documentation for this class was generated from the following file:
Generated on Wed Aug 29 00:01:04 2007 for GED 2006 by  doxygen 1.5.2