浏览该文件的文档.
23 #include <unordered_map>
314 #define ConfigImpl_getString(val) ConfigImpl::instance()->getString(__FILE__,__LINE__,val)
315 #define ConfigImpl_getInt(val) ConfigImpl::instance()->getInt(__FILE__,__LINE__,val)
316 #define ConfigImpl_getList(val) ConfigImpl::instance()->getList(__FILE__,__LINE__,val)
317 #define ConfigImpl_getEnum(val) ConfigImpl::instance()->getEnum(__FILE__,__LINE__,val)
318 #define ConfigImpl_getBool(val) ConfigImpl::instance()->getBool(__FILE__,__LINE__,val)
376 QCString &
getEnum(
const char *fileName,
int num,
const char *name)
const;
382 int &
getInt(
const char *fileName,
int num,
const char *name)
const;
388 bool &
getBool(
const char *fileName,
int num,
const char *name)
const;
396 return it!=
m_dict.end() ? it->second :
nullptr;
411 m_options.push_back(std::unique_ptr<ConfigOption>(result));
422 m_options.push_back(std::unique_ptr<ConfigOption>(result));
423 m_dict.insert(std::make_pair(name,result));
436 m_options.push_back(std::unique_ptr<ConfigOption>(result));
437 m_dict.insert(std::make_pair(name,result));
448 m_options.push_back(std::unique_ptr<ConfigOption>(result));
449 m_dict.insert(std::make_pair(name,result));
460 int minVal,
int maxVal,
int defVal)
463 m_options.push_back(std::unique_ptr<ConfigOption>(result));
464 m_dict.insert(std::make_pair(name,result));
477 m_options.push_back(std::unique_ptr<ConfigOption>(result));
478 m_dict.insert(std::make_pair(name,result));
485 m_obsolete.push_back(std::unique_ptr<ConfigOption>(result));
486 m_dict.insert(std::make_pair(name,result));
493 m_disabled.push_back(std::unique_ptr<ConfigOption>(result));
494 m_dict.insert(std::make_pair(name,result));
std::vector< std::string > StringVector
QCString * valueStringRef()
StringVector getDefault()
ConfigEnum(const char *name, const char *doc, const char *defVal)
virtual void substEnvVars()=0
void appendUserComment(const QCString &u)
StringVector * valueListRef()
void writeTemplate(TextStream &t, bool sl, bool)
StringVector & getList(const char *fileName, int num, const char *name) const
Class representing a string type option.
QCString takeUserComment()
void addValue(const char *v)
std::vector< QCString > m_valueRange
ConfigList * addList(const char *name, const char *doc)
void setHeader(const char *header)
ConfigObsolete(const char *name, OptionType orgType)
void substituteEnvironmentVars()
bool isEmpty() const
Returns TRUE iff the string is empty
std::vector< std::unique_ptr< ConfigOption > > ConfigOptionList
static void deleteInstance()
void compareDoxyfile(TextStream &t)
void writeBoolValue(TextStream &t, bool v, bool initSpace=true)
StringVector m_defaultValue
QCString * valueStringRef()
ConfigInfo(const char *name, const char *doc)
void setWidgetType(WidgetType w)
ConfigOption * get(const QCString &name) const
Section marker for grouping the configuration options.
void appendStartComment(const QCString &u)
Text streaming class that buffers data.
void setValueString(const QCString &v)
ConfigOptionList m_obsolete
void emptyValueToDefault()
void writeIntValue(TextStream &t, int i, bool initSpace=true)
void addValue(const char *v)
void writeStringList(TextStream &t, const StringVector &l)
Class representing a Boolean type option.
Class respresenting a list type option.
void writeTemplate(TextStream &t, bool sl, bool)
void setUserComment(const QCString &u)
@ O_Obsolete
An obsolete option
QCString & getEnum(const char *fileName, int num, const char *name) const
void writeTemplate(TextStream &, bool, bool)
void compareDoxyfile(TextStream &)
ConfigDisabled(const char *name)
void writeXMLDoxyfile(TextStream &t)
@ O_Enum
A fixed set of items
StringVector * valueRef()
void writeXMLDoxyfile(TextStream &t)
ConfigBool(const char *name, const char *doc, bool defVal)
Class representing a bitmap image generated by doxygen.
void writeXMLDoxyfile(TextStream &)
QCString dependsOn() const
ConfigInfo * addInfo(const char *name, const char *doc)
virtual void convertStrToVal()
void writeTemplate(TextStream &t, bool sl, bool upd)
Singleton for configuration variables.
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
void setDefaultValue(const char *v)
void writeXMLDoxyfile(TextStream &)
Abstract base class for any configuration option.
void emptyValueToDefault()
void writeXMLDoxyfile(TextStream &t)
ConfigOption * addDisabled(const char *name)
const std::vector< QCString > & values() const
ConfigList(const char *name, const char *doc)
QCString takeStartComment()
void compareDoxyfile(TextStream &t)
ConfigString * addString(const char *name, const char *doc)
Class representing an integer type option.
virtual void writeTemplate(TextStream &t, bool sl, bool upd)=0
void writeTemplate(TextStream &t, bool sl, bool)
void compareDoxyfile(TextStream &t)
void compareDoxyfile(TextStream &t)
ConfigString(const char *name, const char *doc)
void writeTemplate(TextStream &t, bool sl, bool upd)
ConfigOption(OptionType t)
ConfigOptionList m_disabled
void setWidgetType(WidgetType w)
void writeXMLDoxyfile(TextStream &)
virtual void compareDoxyfile(TextStream &t)=0
bool fill(char c, int len=-1)
Fills a string with a predefined character
void writeXMLDoxyfile(TextStream &t)
Class representing an enum type option.
ConfigOptionList m_options
void writeXMLDoxyfile(TextStream &t)
void writeTemplate(TextStream &t, bool shortIndex, bool updateOnly)
void writeXMLDoxyfile(TextStream &t)
Section marker for obsolete options
std::unordered_map< std::string, ConfigOption * > ConfigOptionMap
bool parseString(const QCString &fn, const QCString &str, bool upd=FALSE)
void addDependency(const char *dep)
void compareDoxyfile(TextStream &)
OptionType orgType() const
void writeStringValue(TextStream &t, const QCString &s, bool initSpace=true)
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
static ConfigImpl * m_instance
int & getInt(const char *fileName, int num, const char *name) const
void emptyValueToDefault()
static ConfigImpl * instance()
void compareDoxyfile(TextStream &t)
QCString & getString(const char *fileName, int num, const char *name) const
virtual void writeXMLDoxyfile(TextStream &t)=0
QCString * valueStringRef()
ConfigBool * addBool(const char *name, const char *doc, bool defVal)
@ O_Disabled
Disabled compile time option
WidgetType widgetType() const
virtual void emptyValueToDefault()
void compareDoxyfile(TextStream &t)
WidgetType widgetType() const
bool parse(const QCString &fn, bool upd=FALSE)
void writeTemplate(TextStream &, bool, bool)
Section marker for compile time optional options
bool & getBool(const char *fileName, int num, const char *name) const
ConfigInt * addInt(const char *name, const char *doc, int minVal, int maxVal, int defVal)
ConfigOption * addObsolete(const char *name, ConfigOption::OptionType orgType)
void compareDoxyfile(TextStream &)
bool resize(size_t newlen)
Resizes the string to hold newlen characters (this value should also count the 0-terminator).
ConfigInt(const char *name, const char *doc, int minVal, int maxVal, int defVal)
ConfigEnum * addEnum(const char *name, const char *doc, const char *defVal)
void writeTemplate(TextStream &t, bool sl, bool)
void setEncoding(const QCString &e)
This is an alternative implementation of QCString.