Doxygen
|
Singleton for configuration variables. 更多...
#include <configimpl.h>
Public 成员函数 | |
void | writeTemplate (TextStream &t, bool shortIndex, bool updateOnly) |
void | compareDoxyfile (TextStream &t) |
void | writeXMLDoxyfile (TextStream &t) |
void | setHeader (const char *header) |
void | convertStrToVal () |
void | emptyValueToDefault () |
void | substituteEnvironmentVars () |
void | init () |
bool | parseString (const QCString &fn, const QCString &str, bool upd=FALSE) |
bool | parse (const QCString &fn, bool upd=FALSE) |
void | create () |
void | appendStartComment (const QCString &u) |
void | appendUserComment (const QCString &u) |
QCString | takeStartComment () |
QCString | takeUserComment () |
Getting configuration values. | |
QCString & | getString (const char *fileName, int num, const char *name) const |
StringVector & | 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 QCString &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, ConfigOption::OptionType orgType) |
ConfigOption * | addDisabled (const char *name) |
静态 Public 成员函数 | |
static ConfigImpl * | instance () |
static void | deleteInstance () |
Protected 成员函数 | |
ConfigImpl () | |
~ConfigImpl () | |
静态 Private 属性 | |
static ConfigImpl * | m_instance |
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()
在文件 configimpl.h 第 335 行定义.
|
inlineprotected |
|
inlineprotected |
在文件 configimpl.h 第 593 行定义.
|
inline |
Adds a new boolean option with name and documentation doc. The boolean has a default value of defVal.
在文件 configimpl.h 第 472 行定义.
|
inline |
Adds an option that has been disabled at compile time.
在文件 configimpl.h 第 490 行定义.
引用了 m_dict , 以及 m_disabled.
|
inline |
Adds a new enumeration option with name and documentation doc and initial value defVal.
在文件 configimpl.h 第 431 行定义.
|
inline |
Starts a new configuration section with name and description doc.
在文件 configimpl.h 第 408 行定义.
引用了 m_options.
|
inline |
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.
在文件 configimpl.h 第 458 行定义.
|
inline |
Adds a new string option with name and documentation doc.
在文件 configimpl.h 第 444 行定义.
|
inline |
|
inline |
Adds a new string option with name and documentation doc.
在文件 configimpl.h 第 418 行定义.
|
inline |
|
inline |
void ConfigImpl::compareDoxyfile | ( | TextStream & | t | ) |
Writes a the differences between the current configuration and the template configuration to stream t.
void ConfigImpl::convertStrToVal | ( | ) |
Converts the string values read from the configuration file to real values for non-string type options (like int, and bools)
void ConfigImpl::create | ( | ) |
Called from the constructor, will add doxygen's default options to the configuration object
被这些函数引用 ConfigImpl().
|
inlinestatic |
void ConfigImpl::emptyValueToDefault | ( | ) |
Sets default value in case value is empty
|
inline |
Returns the ConfigOption corresponding with name or 0 if the option is not supported.
在文件 configimpl.h 第 393 行定义.
引用了 m_dict , 以及 QCString::str().
bool& ConfigImpl::getBool | ( | const char * | fileName, |
int | num, | ||
const char * | name | ||
) | const |
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.
QCString& ConfigImpl::getEnum | ( | const char * | fileName, |
int | num, | ||
const char * | name | ||
) | const |
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.
int& ConfigImpl::getInt | ( | const char * | fileName, |
int | num, | ||
const char * | name | ||
) | const |
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.
StringVector& ConfigImpl::getList | ( | const char * | fileName, |
int | num, | ||
const char * | name | ||
) | const |
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.
QCString& ConfigImpl::getString | ( | const char * | fileName, |
int | num, | ||
const char * | name | ||
) | const |
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.
void ConfigImpl::init | ( | ) |
Initialize config variables to their default value
|
inlinestatic |
Returns the one and only instance of this class
在文件 configimpl.h 第 343 行定义.
引用了 ConfigImpl() , 以及 m_instance.
Parse a configuration file with name fn.
Parse a configuration data in string str.
|
inline |
void ConfigImpl::substituteEnvironmentVars | ( | ) |
Replaces references to environment variable by the actual value of the environment variable.
|
inline |
Take the user start comment and reset it internally
在文件 configimpl.h 第 570 行定义.
引用了 m_startComment, QCString::resize() , 以及 substitute().
|
inline |
Take the user comment and reset it internally
在文件 configimpl.h 第 579 行定义.
引用了 m_userComment, QCString::resize() , 以及 substitute().
void ConfigImpl::writeTemplate | ( | TextStream & | t, |
bool | shortIndex, | ||
bool | updateOnly | ||
) |
Writes a template configuration to stream t. If shortIndex is TRUE
the description of each configuration option will be omitted.
void ConfigImpl::writeXMLDoxyfile | ( | TextStream & | t | ) |
Writes a the used settings of the current configuration as XML format to stream t.
|
private |
在文件 configimpl.h 第 601 行定义.
被这些函数引用 addBool(), addDisabled(), addEnum(), addInt(), addList(), addObsolete(), addString() , 以及 get().
|
private |
在文件 configimpl.h 第 600 行定义.
被这些函数引用 addDisabled().
|
private |
在文件 configimpl.h 第 606 行定义.
被这些函数引用 setHeader().
|
private |
在文件 configimpl.h 第 605 行定义.
被这些函数引用 ConfigImpl().
|
staticprivate |
在文件 configimpl.h 第 602 行定义.
被这些函数引用 deleteInstance() , 以及 instance().
|
private |
在文件 configimpl.h 第 599 行定义.
被这些函数引用 addObsolete().
|
private |
在文件 configimpl.h 第 598 行定义.
被这些函数引用 addBool(), addEnum(), addInfo(), addInt(), addList() , 以及 addString().
|
private |
在文件 configimpl.h 第 603 行定义.
被这些函数引用 appendStartComment() , 以及 takeStartComment().
|
private |
在文件 configimpl.h 第 604 行定义.
被这些函数引用 appendUserComment() , 以及 takeUserComment().