diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2013-05-12 13:04:34 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2013-05-12 13:04:34 (GMT) |
commit | 8dc4ff6dd22b1603f33537ff03994cc63e658768 (patch) | |
tree | 97f0e23b93d45b7917d965e6d1bb70da6c61831a /src/config.h | |
parent | ebf4b3641c9149eaf4468aa8df64e1c7517e5f0c (diff) | |
download | Doxygen-8dc4ff6dd22b1603f33537ff03994cc63e658768.zip Doxygen-8dc4ff6dd22b1603f33537ff03994cc63e658768.tar.gz Doxygen-8dc4ff6dd22b1603f33537ff03994cc63e658768.tar.bz2 |
Release-1.8.3.1-20130512
Diffstat (limited to 'src/config.h')
-rw-r--r-- | src/config.h | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/src/config.h b/src/config.h index 47bef4c..7d37516 100644 --- a/src/config.h +++ b/src/config.h @@ -42,7 +42,8 @@ class ConfigOption O_String, //<! A single item O_Int, //<! An integer value O_Bool, //<! A boolean value - O_Obsolete //<! An obsolete option + O_Obsolete, //<! An obsolete option + O_Disabled //<! Disabled compile time option }; enum { @@ -355,7 +356,19 @@ class ConfigBool : public ConfigOption class ConfigObsolete : public ConfigOption { public: - ConfigObsolete(const char *name,OptionType t) : ConfigOption(t) + ConfigObsolete(const char *name) : ConfigOption(O_Obsolete) + { m_name = name; } + void writeTemplate(FTextStream &,bool,bool) {} + void substEnvVars() {} + void writeXML(FTextStream&); +}; + +/** Section marker for compile time optional options + */ +class ConfigDisabled : public ConfigOption +{ + public: + ConfigDisabled(const char *name) : ConfigOption(O_Disabled) { m_name = name; } void writeTemplate(FTextStream &,bool,bool) {} void substEnvVars() {} @@ -537,11 +550,19 @@ class Config /*! Adds an option that has become obsolete. */ ConfigOption *addObsolete(const char *name) { - ConfigObsolete *option = new ConfigObsolete(name,ConfigOption::O_Obsolete); + ConfigObsolete *option = new ConfigObsolete(name); m_dict->insert(name,option); m_obsolete->append(option); return option; } + /*! Adds an option that has been disabled at compile time. */ + ConfigOption *addDisabled(const char *name) + { + ConfigDisabled *option = new ConfigDisabled(name); + m_dict->insert(name,option); + m_disabled->append(option); + return option; + } /*! @} */ /*! Writes a template configuration to stream \a t. If \a shortIndex @@ -614,6 +635,7 @@ class Config { m_options = new QList<ConfigOption>; m_obsolete = new QList<ConfigOption>; + m_disabled = new QList<ConfigOption>; m_dict = new QDict<ConfigOption>(257); m_options->setAutoDelete(TRUE); m_obsolete->setAutoDelete(TRUE); @@ -624,12 +646,14 @@ class Config { delete m_options; delete m_obsolete; + delete m_disabled; delete m_dict; } private: QList<ConfigOption> *m_options; QList<ConfigOption> *m_obsolete; + QList<ConfigOption> *m_disabled; QDict<ConfigOption> *m_dict; static Config *m_instance; QCString m_userComment; |