Config Class Reference
Singleton for configuration variables. More...
#include <config.h>
Collaboration diagram for Config:

Public Member Functions | |
QPtrListIterator< ConfigOption > | iterator () |
void | writeTemplate (QFile *f, bool shortIndex, bool updateOnly) |
void | convertStrToVal () |
void | substituteEnvironmentVars () |
void | check () |
void | init () |
bool | parse (const char *fn) |
void | create () |
Getting configuration values. | |
QCString & | getString (const char *fileName, int num, const char *name) const |
QStrList & | getList (const char *fileName, int num, const char *name) const |
QCString & | getEnum (const char *fileName, int num, const char *name) const |
int & | getInt (const char *fileName, int num, const char *name) const |
bool & | getBool (const char *fileName, int num, const char *name) const |
ConfigOption * | get (const char *name) const |
Adding configuration options. | |
ConfigInfo * | addInfo (const char *name, const char *doc) |
ConfigString * | addString (const char *name, const char *doc) |
ConfigEnum * | addEnum (const char *name, const char *doc, const char *defVal) |
ConfigList * | addList (const char *name, const char *doc) |
ConfigInt * | addInt (const char *name, const char *doc, int minVal, int maxVal, int defVal) |
ConfigBool * | addBool (const char *name, const char *doc, bool defVal) |
ConfigOption * | addObsolete (const char *name) |
Static Public Member Functions | |
Config * | instance () |
void | deleteInstance () |
Protected Member Functions | |
Config () | |
~Config () | |
Private Attributes | |
QPtrList< ConfigOption > * | m_options |
QPtrList< ConfigOption > * | m_obsolete |
QDict< ConfigOption > * | m_dict |
bool | m_initialized |
Static Private Attributes | |
Config * | m_instance = 0 |
Detailed Description
Singleton for configuration variables.This object holds the global static variables read from a user-supplied configuration file. The static member instance() can be used to get a pointer to the one and only instance.
Set all variables to their default values by calling Config::instance()->init()
Definition at line 342 of file config.h.
Constructor & Destructor Documentation
|
|
|
|
Member Function Documentation
|
Adds a new boolean option with name and documentation doc. The boolean has a default value of defVal.
|
|
Adds a new enumeration option with name and documentation doc and initial value defVal.
|
|
Starts a new configuration section with name and description doc.
|
|
Adds a new integer option with name and documentation doc. The integer has a range between minVal and maxVal and a default value of defVal.
|
|
Adds a new string option with name and documentation doc.
Definition at line 457 of file config.h. Referenced by DoxygenPart::slotRunPreview(). |
|
Adds an option that has become obsolete. |
|
Adds a new string option with name and documentation doc.
|
|
Checks if the values of the variable are correct, adjusts them if needed, and report any errors. Referenced by DoxygenPart::adjustDoxyfile(). |
|
Converts the string values read from the configuration file to real values for non-string type options (like int, and bools) Referenced by K_EXPORT_COMPONENT_FACTORY(), DoxygenConfigWidget::loadFile(), and DoxygenPart::slotDoxygen(). |
|
Called from the constructor, will add doxygen's default options to the configuration object |
|
Delete the instance |
|
Returns the ConfigOption corresponding with name or 0 if the option is not supported. Definition at line 407 of file config.h. Referenced by DoxygenPart::adjustDoxyfile(), configYYlex(), DoxygenPart::slotDoxygen(), and DoxygenPart::slotRunPreview(). |
|
Returns the value of the boolean option with name fileName. The arguments num and name are for debugging purposes only. There is a convenience function Config_getBool() for this. Definition at line 759 of file config.cpp. References config_err(), ConfigOption::kind(), and m_dict. |
|
Returns the value of the enum option with name fileName. The arguments num and name are for debugging purposes only. There is a convenience function Config_getEnum() for this. Definition at line 727 of file config.cpp. References config_err(), ConfigOption::kind(), and m_dict. |
|
Returns the value of the integer option with name fileName. The arguments num and name are for debugging purposes only. There is a convenience function Config_getInt() for this. Definition at line 743 of file config.cpp. References config_err(), ConfigOption::kind(), and m_dict. |
|
Returns the value of the list option with name fileName. The arguments num and name are for debugging purposes only. There is a convenience function Config_getList() for this. Definition at line 711 of file config.cpp. References config_err(), ConfigOption::kind(), and m_dict. |
|
Returns the value of the string option with name fileName. The arguments num and name are for debugging purposes only. There is a convenience function Config_getString() for this. Definition at line 695 of file config.cpp. References config_err(), ConfigOption::kind(), and m_dict. |
|
Initialize config variables to their default value Referenced by DoxygenPart::adjustDoxyfile(), DoxygenConfigWidget::loadFile(), and DoxygenPart::slotDoxygen(). |
|
Returns the one and only instance of this class Definition at line 350 of file config.h. Referenced by DoxygenPart::adjustDoxyfile(), DoxygenConfigWidget::DoxygenConfigWidget(), K_EXPORT_COMPONENT_FACTORY(), DoxygenConfigWidget::loadFile(), DoxygenConfigWidget::saveFile(), DoxygenPart::slotDoxygen(), and DoxygenPart::slotRunPreview(). |
|
Returns an iterator that can by used to iterate over the configuration options. Definition at line 364 of file config.h. Referenced by DoxygenConfigWidget::DoxygenConfigWidget(). |
|
Parse a configuration file with name fn.
Referenced by K_EXPORT_COMPONENT_FACTORY(), DoxygenConfigWidget::loadFile(), and DoxygenPart::slotDoxygen(). |
|
Replaces references to environment variable by the actual value of the environment variable. |
|
Writes a template configuration file to f. If shortIndex is Referenced by DoxygenPart::adjustDoxyfile(), DoxygenConfigWidget::saveFile(), and DoxygenPart::slotRunPreview(). |
Member Data Documentation
|
Definition at line 565 of file config.h. Referenced by getBool(), getEnum(), getInt(), getList(), and getString(). |
|
|
|
Definition at line 657 of file config.cpp. |
|
|
|
|
The documentation for this class was generated from the following files:
- parts/doxygen/config.h
- parts/doxygen/config.cpp