Doxygen
Loading...
Searching...
No Matches
ConfigImpl Class Reference

Singleton for configuration variables. More...

#include <src/configimpl.h>

+ Collaboration diagram for ConfigImpl:

Public Member Functions

 ConfigImpl ()
 
void writeTemplate (TextStream &t, bool shortIndex, bool updateOnly)
 
void compareDoxyfile (TextStream &t, Config::CompareMode compareMode)
 
void writeXMLDoxyfile (TextStream &t)
 
void writeXSDDoxyfile (TextStream &t)
 
void setHeader (const char *header)
 
void convertStrToVal (Config::CompareMode compareMode)
 
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 appendStartComment (const QCString &u)
 
void appendUserComment (const QCString &u)
 
void appendStoreRepl (const QCString &u)
 
QCString takeStartComment ()
 
QCString takeUserComment ()
 
QCString takeStoreRepl ()
 
Getting configuration values.
QCStringgetString (const char *fileName, int num, const char *name) const
 
StringVectorgetList (const char *fileName, int num, const char *name) const
 
QCStringgetEnum (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
 
ConfigOptionget (const QCString &name) const
 
Adding configuration options.
ConfigInfoaddInfo (const char *name, const char *doc)
 
ConfigStringaddString (const char *name, const char *doc)
 
ConfigEnumaddEnum (const char *name, const char *doc, const char *defVal)
 
ConfigListaddList (const char *name, const char *doc)
 
ConfigIntaddInt (const char *name, const char *doc, int minVal, int maxVal, int defVal)
 
ConfigBooladdBool (const char *name, const char *doc, bool defVal)
 
ConfigOptionaddObsolete (const char *name, ConfigOption::OptionType orgType)
 
ConfigOptionaddDisabled (const char *name)
 

Static Public Member Functions

static ConfigImplinstance ()
 
static void deleteInstance ()
 
static void config_err_ (fmt::string_view fmt, fmt::format_args args)
 
static void config_term_ (fmt::string_view fmt, fmt::format_args args)
 
static void config_warn_ (fmt::string_view fmt, fmt::format_args args)
 
template<typename ... Args>
static void config_err (fmt::format_string< Args... > fmt, Args &&... args)
 
template<typename ... Args>
static void config_term (fmt::format_string< Args... > fmt, Args &&... args)
 
template<typename ... Args>
static void config_warn (fmt::format_string< Args... > fmt, Args &&... args)
 

Private Attributes

ConfigOptionList m_options
 
ConfigOptionList m_obsolete
 
ConfigOptionList m_disabled
 
ConfigOptionMap m_dict
 
QCString m_startComment
 
QCString m_userComment
 
QCString m_storeRepl
 
QCString m_header
 

Static Private Attributes

static std::unique_ptr< ConfigImplm_instance
 

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 configimpl.h.

Constructor & Destructor Documentation

◆ ConfigImpl()

ConfigImpl::ConfigImpl ( )

Definition at line 1564 of file configimpl.l.

1565{
1566 addConfigOptions(this);
1567}
void addConfigOptions(ConfigImpl *cfg)

References addConfigOptions().

Referenced by instance().

Member Function Documentation

◆ addBool()

ConfigBool * ConfigImpl::addBool ( const char * name,
const char * doc,
bool defVal )
inline

Adds a new boolean option with name and documentation doc. The boolean has a default value of defVal.

Returns
An object representing the option.

Definition at line 479 of file configimpl.h.

482 {
483 ConfigBool *result = new ConfigBool(name,doc,defVal);
484 m_options.push_back(std::unique_ptr<ConfigOption>(result));
485 m_dict.emplace(name,result);
486 return result;
487 }
ConfigOptionList m_options
Definition configimpl.h:633
ConfigOptionMap m_dict
Definition configimpl.h:636

References m_dict, and m_options.

◆ addDisabled()

ConfigOption * ConfigImpl::addDisabled ( const char * name)
inline

Adds an option that has been disabled at compile time.

Definition at line 499 of file configimpl.h.

500 {
501 ConfigDisabled *result = new ConfigDisabled(name);
502 m_disabled.push_back(std::unique_ptr<ConfigOption>(result));
503 m_dict.emplace(name,result);
504 return result;
505 }
ConfigOptionList m_disabled
Definition configimpl.h:635

References m_dict, and m_disabled.

◆ addEnum()

ConfigEnum * ConfigImpl::addEnum ( const char * name,
const char * doc,
const char * defVal )
inline

Adds a new enumeration option with name and documentation doc and initial value defVal.

Returns
An object representing the option.

Definition at line 438 of file configimpl.h.

441 {
442 ConfigEnum *result = new ConfigEnum(name,doc,defVal);
443 m_options.push_back(std::unique_ptr<ConfigOption>(result));
444 m_dict.emplace(name,result);
445 return result;
446 }

References m_dict, and m_options.

◆ addInfo()

ConfigInfo * ConfigImpl::addInfo ( const char * name,
const char * doc )
inline

Starts a new configuration section with name and description doc.

Returns
An object representing the option.

Definition at line 415 of file configimpl.h.

416 {
417 ConfigInfo *result = new ConfigInfo(name,doc);
418 m_options.push_back(std::unique_ptr<ConfigOption>(result));
419 return result;
420 }

References m_options.

◆ addInt()

ConfigInt * ConfigImpl::addInt ( const char * name,
const char * doc,
int minVal,
int maxVal,
int defVal )
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.

Returns
An object representing the option.

Definition at line 465 of file configimpl.h.

468 {
469 ConfigInt *result = new ConfigInt(name,doc,minVal,maxVal,defVal);
470 m_options.push_back(std::unique_ptr<ConfigOption>(result));
471 m_dict.emplace(name,result);
472 return result;
473 }

References m_dict, and m_options.

◆ addList()

ConfigList * ConfigImpl::addList ( const char * name,
const char * doc )
inline

Adds a new string option with name and documentation doc.

Returns
An object representing the option.

Definition at line 451 of file configimpl.h.

453 {
454 ConfigList *result = new ConfigList(name,doc);
455 m_options.push_back(std::unique_ptr<ConfigOption>(result));
456 m_dict.emplace(name,result);
457 return result;
458 }

References m_dict, and m_options.

◆ addObsolete()

ConfigOption * ConfigImpl::addObsolete ( const char * name,
ConfigOption::OptionType orgType )
inline

Adds an option that has become obsolete.

Definition at line 490 of file configimpl.h.

491 {
492 ConfigObsolete *result = new ConfigObsolete(name,orgType);
493 m_obsolete.push_back(std::unique_ptr<ConfigOption>(result));
494 m_dict.emplace(name,result);
495 return result;
496 }
ConfigOptionList m_obsolete
Definition configimpl.h:634

References m_dict, and m_obsolete.

◆ addString()

ConfigString * ConfigImpl::addString ( const char * name,
const char * doc )
inline

Adds a new string option with name and documentation doc.

Returns
An object representing the option.

Definition at line 425 of file configimpl.h.

427 {
428 ConfigString *result = new ConfigString(name,doc);
429 m_options.push_back(std::unique_ptr<ConfigOption>(result));
430 m_dict.emplace(name,result);
431 return result;
432 }

References m_dict, and m_options.

◆ appendStartComment()

void ConfigImpl::appendStartComment ( const QCString & u)
inline

Append user start comment

Definition at line 566 of file configimpl.h.

567 {
568 m_startComment += u;
569 }
QCString m_startComment
Definition configimpl.h:638

References m_startComment.

◆ appendStoreRepl()

void ConfigImpl::appendStoreRepl ( const QCString & u)
inline

Append replacement string

Definition at line 578 of file configimpl.h.

579 {
580 m_storeRepl += u;
581 }
QCString m_storeRepl
Definition configimpl.h:640

References m_storeRepl.

◆ appendUserComment()

void ConfigImpl::appendUserComment ( const QCString & u)
inline

Append user comment

Definition at line 572 of file configimpl.h.

573 {
574 m_userComment += u;
575 }
QCString m_userComment
Definition configimpl.h:639

References m_userComment.

◆ compareDoxyfile()

void ConfigImpl::compareDoxyfile ( TextStream & t,
Config::CompareMode compareMode )

Writes a the differences between the current configuration and the template configuration to stream t.

Definition at line 1334 of file configimpl.l.

1335{
1336 t << "# Difference with default Doxyfile " << getFullVersion();
1337 t << "\n";
1338 for (const auto &option : m_options)
1339 {
1340 option->m_userComment = "";
1341 option->compareDoxyfile(t,compareMode);
1342 }
1343 if (!m_storeRepl.isEmpty())
1344 {
1345 t << "\n";
1346 t << takeStoreRepl() << "\n";
1347 }
1348}
QCString takeStoreRepl()
Definition configimpl.h:603

References ConfigOption::compareDoxyfile(), m_options, m_storeRepl, ConfigOption::m_userComment, and takeStoreRepl().

Referenced by Config::compareDoxyfile().

◆ config_err()

template<typename ... Args>
static void ConfigImpl::config_err ( fmt::format_string< Args... > fmt,
Args &&... args )
inlinestatic

Definition at line 615 of file configimpl.h.

616 {
617 config_err_(fmt,fmt::make_format_args(args...));
618 }
static void config_err_(fmt::string_view fmt, fmt::format_args args)
Definition configimpl.l:59

References config_err_().

Referenced by tryPath().

◆ config_err_()

void ConfigImpl::config_err_ ( fmt::string_view fmt,
fmt::format_args args )
static

Definition at line 59 of file configimpl.l.

60{
61 fmt::print(stderr,"{}{}",error_str,fmt::vformat(fmt,args));
62}
static const char * error_str
Definition configimpl.l:57

References error_str.

Referenced by config_err().

◆ config_term()

template<typename ... Args>
static void ConfigImpl::config_term ( fmt::format_string< Args... > fmt,
Args &&... args )
inlinestatic

Definition at line 621 of file configimpl.h.

622 {
623 config_term_(fmt,fmt::make_format_args(args...));
624 }
static void config_term_(fmt::string_view fmt, fmt::format_args args)
Definition configimpl.l:64

References config_term_().

Referenced by Config::checkAndCorrect(), configFileToString(), configStringRecode(), getBool(), getEnum(), getInt(), getList(), getString(), init(), and readIncludeFile().

◆ config_term_()

void ConfigImpl::config_term_ ( fmt::string_view fmt,
fmt::format_args args )
static

Definition at line 64 of file configimpl.l.

65{
66 fmt::print(stderr,"{}{}",error_str,fmt::vformat(fmt,args));
67 fmt::print(stderr,"{}\n", "Exiting...");
68 exit(1);
69}

References error_str.

Referenced by config_term().

◆ config_warn()

template<typename ... Args>
static void ConfigImpl::config_warn ( fmt::format_string< Args... > fmt,
Args &&... args )
inlinestatic

Definition at line 627 of file configimpl.h.

628 {
629 config_warn_(fmt,fmt::make_format_args(args...));
630 }
static void config_warn_(fmt::string_view fmt, fmt::format_args args)
Definition configimpl.l:71

References config_warn_().

Referenced by ConfigBool::convertStrToVal(), ConfigEnum::convertStrToVal(), ConfigInt::convertStrToVal(), processList(), processString(), and setTranslator().

◆ config_warn_()

void ConfigImpl::config_warn_ ( fmt::string_view fmt,
fmt::format_args args )
static

Definition at line 71 of file configimpl.l.

72{
73 fmt::print(stderr,"{}{}",warning_str,fmt::vformat(fmt,args));
74}
static const char * warning_str
Definition configimpl.l:56

References warning_str.

Referenced by config_warn().

◆ convertStrToVal()

void ConfigImpl::convertStrToVal ( Config::CompareMode compareMode)

Converts the string values read from the configuration file to real values for non-string type options (like int, and bools)

Definition at line 1373 of file configimpl.l.

1374{
1375 for (const auto &option : m_options)
1376 {
1377 option->convertStrToVal(compareMode);
1378 }
1379}

References ConfigOption::convertStrToVal(), and m_options.

◆ deleteInstance()

static void ConfigImpl::deleteInstance ( )
inlinestatic

Delete the instance

Definition at line 357 of file configimpl.h.

358 {
359 m_instance.reset();
360 }
static std::unique_ptr< ConfigImpl > m_instance
Definition configimpl.h:637

References m_instance.

Referenced by Config::deinit().

◆ emptyValueToDefault()

void ConfigImpl::emptyValueToDefault ( )

Sets default value in case value is empty

Definition at line 1380 of file configimpl.l.

1381{
1382 for (const auto &option : m_options)
1383 {
1384 option->emptyValueToDefault();
1385 }
1386}

References ConfigOption::emptyValueToDefault(), and m_options.

◆ get()

ConfigOption * ConfigImpl::get ( const QCString & name) const
inline

Returns the ConfigOption corresponding with name or 0 if the option is not supported.

Definition at line 400 of file configimpl.h.

401 {
402 auto it = m_dict.find(name.str());
403 return it!=m_dict.end() ? it->second : nullptr;
404 }
const std::string & str() const
Definition qcstring.h:537

References m_dict, and QCString::str().

Referenced by DocPara::handleDoxyConfig(), init(), and Config::updateObsolete().

◆ getBool()

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.

Definition at line 341 of file configimpl.l.

342{
343 auto it = m_dict.find(name);
344 if (it==m_dict.end())
345 {
346 config_term("{}<{}>: Internal error: Requested unknown option {}!\n",fileName,num,name);
347 }
348 else if (it->second->kind()!=ConfigOption::O_Bool)
349 {
350 config_term("{}<{}>: Internal error: Requested option {} not of boolean type!\n",fileName,num,name);
351 }
352 return *(dynamic_cast<ConfigBool *>(it->second))->valueRef();
353}
static void config_term(fmt::format_string< Args... > fmt, Args &&... args)
Definition configimpl.h:621
@ O_Bool
A boolean value.
Definition configimpl.h:53

References config_term(), m_dict, and ConfigOption::O_Bool.

◆ getEnum()

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.

Definition at line 313 of file configimpl.l.

314{
315 auto it = m_dict.find(name);
316 if (it==m_dict.end())
317 {
318 config_term("{}<{}>: Internal error: Requested unknown option {}!\n",fileName,num,name);
319 }
320 else if (it->second->kind()!=ConfigOption::O_Enum)
321 {
322 config_term("{}<{}>: Internal error: Requested option {} not of enum type!\n",fileName,num,name);
323 }
324 return *(dynamic_cast<ConfigEnum *>(it->second))->valueRef();
325}
@ O_Enum
A fixed set of items.
Definition configimpl.h:50

References config_term(), m_dict, and ConfigOption::O_Enum.

◆ getInt()

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.

Definition at line 327 of file configimpl.l.

328{
329 auto it = m_dict.find(name);
330 if (it==m_dict.end())
331 {
332 config_term("{}<{}>: Internal error: Requested unknown option {}!\n",fileName,num,name);
333 }
334 else if (it->second->kind()!=ConfigOption::O_Int)
335 {
336 config_term("{}<{}>: Internal error: Requested option {} not of integer type!\n",fileName,num,name);
337 }
338 return *(dynamic_cast<ConfigInt *>(it->second))->valueRef();
339}
@ O_Int
An integer value.
Definition configimpl.h:52

References config_term(), m_dict, and ConfigOption::O_Int.

◆ getList()

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.

Definition at line 299 of file configimpl.l.

300{
301 auto it = m_dict.find(name);
302 if (it==m_dict.end())
303 {
304 config_term("{}<{}>: Internal error: Requested unknown option {}!\n",fileName,num,name);
305 }
306 else if (it->second->kind()!=ConfigOption::O_List)
307 {
308 config_term("{}<{}>: Internal error: Requested option {} not of list type!\n",fileName,num,name);
309 }
310 return *(dynamic_cast<ConfigList *>(it->second))->valueRef();
311}
@ O_List
A list of items.
Definition configimpl.h:49

References config_term(), m_dict, and ConfigOption::O_List.

◆ getString()

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.

Definition at line 285 of file configimpl.l.

286{
287 auto it = m_dict.find(name);
288 if (it==m_dict.end())
289 {
290 config_term("{}<{}>: Internal error: Requested unknown option {}!\n",fileName,num,name);
291 }
292 else if (it->second->kind()!=ConfigOption::O_String)
293 {
294 config_term("{}<{}>: Internal error: Requested option {} not of string type!\n",fileName,num,name);
295 }
296 return *(dynamic_cast<ConfigString *>(it->second))->valueRef();
297}
@ O_String
A single item.
Definition configimpl.h:51

References config_term(), m_dict, and ConfigOption::O_String.

◆ init()

void ConfigImpl::init ( )

Initialize config variables to their default value

Definition at line 1541 of file configimpl.l.

1542{
1543 for (const auto &option : m_options)
1544 {
1545 option->init();
1546 }
1547
1548 // sanity check if all depends relations are valid
1549 for (const auto &option : m_options)
1550 {
1551 QCString depName = option->dependsOn();
1552 if (!depName.isEmpty())
1553 {
1554 ConfigOption * opt = ConfigImpl::instance()->get(depName);
1555 if (opt==0)
1556 {
1557 config_term("Config option '{}' has invalid depends relation on unknown option '{}'\n",
1558 option->name(),depName);
1559 }
1560 }
1561 }
1562}
static ConfigImpl * instance()
Definition configimpl.h:351
ConfigOption * get(const QCString &name) const
Definition configimpl.h:400
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:150

References config_term(), ConfigOption::dependsOn(), get(), ConfigOption::init(), instance(), QCString::isEmpty(), m_options, and ConfigOption::name().

Referenced by Config::init().

◆ instance()

static ConfigImpl * ConfigImpl::instance ( )
inlinestatic

Returns the one and only instance of this class

Definition at line 351 of file configimpl.h.

352 {
353 if (!m_instance) m_instance = std::make_unique<ConfigImpl>();
354 return m_instance.get();
355 }

References ConfigImpl(), and m_instance.

Referenced by Config::compareDoxyfile(), Config::deinit(), DocPara::handleDoxyConfig(), Config::init(), init(), Config::parse(), parseString(), Config::postProcess(), Config::updateObsolete(), Config::writeTemplate(), Config::writeXMLDoxyfile(), and Config::writeXSDDoxyfile().

◆ parse()

bool ConfigImpl::parse ( const QCString & fn,
bool upd = FALSE )

Parse a configuration file with name fn.

Returns
TRUE if successful, FALSE if the file could not be opened or read.

Definition at line 1620 of file configimpl.l.

1621{
1622 g_encoding = "UTF-8";
1623 DebugLex debugLex(Debug::Lex_configimpl, __FILE__, qPrint(fn));
1624 bool retval = parseString(fn,configFileToString(fn), update);
1625 return retval;
1626}
bool parseString(const QCString &fn, const QCString &str, bool upd=FALSE)
@ Lex_configimpl
Definition debug.h:55
static QCString g_encoding
Definition configimpl.l:652
static QCString configFileToString(const QCString &name)
const char * qPrint(const char *s)
Definition qcstring.h:672

References configFileToString(), g_encoding, Debug::Lex_configimpl, parseString(), and qPrint().

Referenced by Config::parse().

◆ parseString()

bool ConfigImpl::parseString ( const QCString & fn,
const QCString & str,
bool upd = FALSE )

Parse a configuration data in string str.

Returns
TRUE if successful, or FALSE if the string could not be parsed.

Definition at line 1600 of file configimpl.l.

1601{
1602#ifdef FLEX_DEBUG
1603 configimplYYset_debug(Debug::isFlagSet(Debug::Lex_configimpl)?1:0);
1604#endif
1606 g_inputString = str.data();
1607 g_inputPosition = 0;
1608 g_yyFileName = fn;
1609 g_yyLineNr = 1;
1611 configimplYYrestart( configimplYYin );
1612 BEGIN( Start );
1613 g_configUpdate = update;
1614 configimplYYlex();
1616 g_inputString = 0;
1617 return TRUE;
1618}
static bool isFlagSet(const DebugMask mask)
Definition debug.cpp:132
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
Definition qcstring.h:159
void clear()
Definition qcstring.h:169
static const char * g_inputString
Definition configimpl.l:641
static std::vector< std::unique_ptr< ConfigFileState > > g_includeStack
Definition configimpl.l:650
static int g_inputPosition
Definition configimpl.l:642
static bool g_configUpdate
Definition configimpl.l:651
static ConfigImpl * g_config
Definition configimpl.l:653
static int g_yyLineNr
Definition configimpl.l:643
static QCString g_yyFileName
Definition configimpl.l:644
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34

References QCString::data(), FALSE, g_config, g_configUpdate, g_includeStack, g_inputPosition, g_inputString, g_yyFileName, g_yyLineNr, instance(), Debug::isFlagSet(), Debug::Lex_configimpl, and TRUE.

Referenced by parse().

◆ setHeader()

void ConfigImpl::setHeader ( const char * header)
inline

Definition at line 529 of file configimpl.h.

529{ m_header = header; }
QCString m_header
Definition configimpl.h:641

References m_header.

◆ substituteEnvironmentVars()

void ConfigImpl::substituteEnvironmentVars ( )

Replaces references to environment variable by the actual value of the environment variable.

Definition at line 1533 of file configimpl.l.

1534{
1535 for (const auto &option : m_options)
1536 {
1537 option->substEnvVars();
1538 }
1539}

References m_options, and ConfigOption::substEnvVars().

◆ takeStartComment()

QCString ConfigImpl::takeStartComment ( )
inline

Take the user start comment and reset it internally

Returns
user start comment

Definition at line 585 of file configimpl.h.

586 {
587 QCString result=m_startComment;
588 m_startComment.clear();
589 return substitute(result,"\r","");
590 }
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
Definition qcstring.cpp:477

References m_startComment, and substitute().

Referenced by writeTemplate().

◆ takeStoreRepl()

QCString ConfigImpl::takeStoreRepl ( )
inline

Take the replacement string

Returns
the replacement string

Definition at line 603 of file configimpl.h.

604 {
605 QCString result=m_storeRepl;
606 m_storeRepl.clear();
607 return substitute(result,"\r","");
608 }

References m_storeRepl, and substitute().

Referenced by compareDoxyfile().

◆ takeUserComment()

QCString ConfigImpl::takeUserComment ( )
inline

Take the user comment and reset it internally

Returns
user comment

Definition at line 594 of file configimpl.h.

595 {
596 QCString result=m_userComment;
597 m_userComment.clear();
598 return substitute(result,"\r","");
599 }

References m_userComment, and substitute().

Referenced by writeTemplate().

◆ writeTemplate()

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.

Definition at line 1310 of file configimpl.l.

1311{
1312 /* print first lines of user comment that were at the beginning of the file, might have special meaning for editors */
1313 if (!m_startComment.isEmpty())
1314 {
1315 t << takeStartComment() << "\n";
1316 }
1317 t << "# Doxyfile " << getDoxygenVersion() << "\n\n";
1318 if (!sl)
1319 {
1320 t << convertToComment(m_header,"");
1321 }
1322 for (const auto &option : m_options)
1323 {
1324 option->writeTemplate(t,sl,upd);
1325 }
1326 /* print last lines of user comment that were at the end of the file */
1327 if (!m_userComment.isEmpty())
1328 {
1329 t << "\n";
1330 t << takeUserComment();
1331 }
1332}
QCString takeStartComment()
Definition configimpl.h:585
QCString takeUserComment()
Definition configimpl.h:594
static QCString convertToComment(const QCString &s, const QCString &u)
Definition configimpl.l:88

References convertToComment(), m_header, m_options, m_startComment, m_userComment, takeStartComment(), takeUserComment(), and ConfigOption::writeTemplate().

Referenced by Config::writeTemplate().

◆ writeXMLDoxyfile()

void ConfigImpl::writeXMLDoxyfile ( TextStream & t)

Writes a the used settings of the current configuration as XML format to stream t.

Definition at line 1350 of file configimpl.l.

1351{
1352 t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n";
1353 t << "<doxyfile xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"doxyfile.xsd\" version=\"" << getDoxygenVersion() << "\" xml:lang=\"" << theTranslator->trISOLang() << "\">\n";
1354 for (const auto &option : m_options)
1355 {
1356 option->writeXMLDoxyfile(t);
1357 }
1358 t << "</doxyfile>\n";
1359}
virtual QCString trISOLang()=0
Translator * theTranslator
Definition language.cpp:71

References m_options, theTranslator, and ConfigOption::writeXMLDoxyfile().

Referenced by Config::writeXMLDoxyfile().

◆ writeXSDDoxyfile()

void ConfigImpl::writeXSDDoxyfile ( TextStream & t)

Writes all possible setting ids to an XSD file for validation through the stream t.

Definition at line 1361 of file configimpl.l.

1362{
1363 for (const auto &option : m_options)
1364 {
1365 option->writeXSDDoxyfile(t);
1366 }
1367 for (const auto &option : m_disabled)
1368 {
1369 option->writeXSDDoxyfile(t);
1370 }
1371}

References m_disabled, m_options, and ConfigOption::writeXSDDoxyfile().

Referenced by Config::writeXSDDoxyfile().

Member Data Documentation

◆ m_dict

ConfigOptionMap ConfigImpl::m_dict
private

◆ m_disabled

ConfigOptionList ConfigImpl::m_disabled
private

Definition at line 635 of file configimpl.h.

Referenced by addDisabled(), and writeXSDDoxyfile().

◆ m_header

QCString ConfigImpl::m_header
private

Definition at line 641 of file configimpl.h.

Referenced by setHeader(), and writeTemplate().

◆ m_instance

std::unique_ptr< ConfigImpl > ConfigImpl::m_instance
staticprivate

Definition at line 637 of file configimpl.h.

Referenced by deleteInstance(), and instance().

◆ m_obsolete

ConfigOptionList ConfigImpl::m_obsolete
private

Definition at line 634 of file configimpl.h.

Referenced by addObsolete().

◆ m_options

◆ m_startComment

QCString ConfigImpl::m_startComment
private

Definition at line 638 of file configimpl.h.

Referenced by appendStartComment(), takeStartComment(), and writeTemplate().

◆ m_storeRepl

QCString ConfigImpl::m_storeRepl
private

Definition at line 640 of file configimpl.h.

Referenced by appendStoreRepl(), compareDoxyfile(), and takeStoreRepl().

◆ m_userComment

QCString ConfigImpl::m_userComment
private

Definition at line 639 of file configimpl.h.

Referenced by appendUserComment(), takeUserComment(), and writeTemplate().


The documentation for this class was generated from the following files: