Skip to main content

The ConfigImpl Class Reference

Singleton for configuration variables. More...

Declaration

class ConfigImpl { ... }

Included Headers

#include <src/configimpl.h>

Public Constructors Index

ConfigImpl ()

Public Member Functions Index

voidwriteTemplate (TextStream &t, bool shortIndex, bool updateOnly)
voidcompareDoxyfile (TextStream &t, Config::CompareMode compareMode)
voidwriteXMLDoxyfile (TextStream &t)
voidwriteXSDDoxyfile (TextStream &t)
voidsetHeader (const char *header)
voidconvertStrToVal (Config::CompareMode compareMode)
voidemptyValueToDefault ()
voidsubstituteEnvironmentVars ()
voidinit ()
boolparseString (const QCString &fn, const QCString &str, bool upd=FALSE)
boolparse (const QCString &fn, bool upd=FALSE)
voidappendStartComment (const QCString &u)
voidappendUserComment (const QCString &u)
voidappendStoreRepl (const QCString &u)
QCStringtakeStartComment ()
QCStringtakeUserComment ()
QCStringtakeStoreRepl ()

Private Member Attributes Index

ConfigOptionListm_options
ConfigOptionListm_obsolete
ConfigOptionListm_disabled
ConfigOptionMapm_dict
QCStringm_startComment
QCStringm_userComment
QCStringm_storeRepl
QCStringm_header

Public Static Functions Index

static ConfigImpl *instance ()
static voiddeleteInstance ()
static voidconfig_err_ (fmt::string_view fmt, fmt::format_args args)
static voidconfig_term_ (fmt::string_view fmt, fmt::format_args args)
static voidconfig_warn_ (fmt::string_view fmt, fmt::format_args args)
template <typename ... Args>
static voidconfig_err (fmt::format_string< Args... > fmt, Args &&... args)
template <typename ... Args>
static voidconfig_term (fmt::format_string< Args... > fmt, Args &&... args)
template <typename ... Args>
static voidconfig_warn (fmt::format_string< Args... > fmt, Args &&... args)

Private Static Attributes Index

static std::unique_ptr< ConfigImpl >m_instance

Getting configuration values. Index

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. Index

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)

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.

Public Constructors

ConfigImpl()

ConfigImpl::ConfigImpl ()

Declaration at line 348 of file configimpl.h, definition at line 1564 of file configimpl.l.

1565{
1566 addConfigOptions(this);
1567}

Reference addConfigOptions.

Referenced by instance.

Public Member Functions

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 }

Reference 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 }

Reference 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 }

Reference 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.

Declaration at line 517 of file configimpl.h, 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}

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

Referenced by Config::compareDoxyfile.

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)

Declaration at line 538 of file configimpl.h, 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.

emptyValueToDefault()

void ConfigImpl::emptyValueToDefault ()

Sets default value in case value is empty

Declaration at line 542 of file configimpl.h, 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.

init()

void ConfigImpl::init ()

Initialize config variables to their default value

Declaration at line 550 of file configimpl.h, 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}

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

Referenced by Config::init.

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.

Declaration at line 562 of file configimpl.h, definition at line 1620 of file configimpl.l.

1620bool ConfigImpl::parse(const QCString &fn,bool update)
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}

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.

Declaration at line 556 of file configimpl.h, definition at line 1600 of file configimpl.l.

1600bool ConfigImpl::parseString(const QCString &fn,const QCString &str,bool update)
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;
1610 g_includeStack.clear();
1611 configimplYYrestart( configimplYYin );
1612 BEGIN( Start );
1613 g_configUpdate = update;
1614 configimplYYlex();
1616 g_inputString = 0;
1617 return TRUE;
1618}

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 void setHeader(const char *header) { m_header = header; }

Reference m_header.

substituteEnvironmentVars()

void ConfigImpl::substituteEnvironmentVars ()

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

Declaration at line 547 of file configimpl.h, 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 {
588 m_startComment.clear();
589 return substitute(result,"\r","");
590 }

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 {
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.

Declaration at line 512 of file configimpl.h, definition at line 1310 of file configimpl.l.

1310void ConfigImpl::writeTemplate(TextStream &t,bool sl,bool upd)
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}

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.

Declaration at line 522 of file configimpl.h, 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}

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.

Declaration at line 527 of file configimpl.h, 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.

Private Member Attributes

m_dict

ConfigOptionMap ConfigImpl::m_dict

m_disabled

ConfigOptionList ConfigImpl::m_disabled

Definition at line 635 of file configimpl.h.

Referenced by addDisabled and writeXSDDoxyfile.

m_header

QCString ConfigImpl::m_header

Definition at line 641 of file configimpl.h.

Referenced by setHeader and writeTemplate.

m_obsolete

ConfigOptionList ConfigImpl::m_obsolete

Definition at line 634 of file configimpl.h.

Referenced by addObsolete.

m_options

m_startComment

QCString ConfigImpl::m_startComment

Definition at line 638 of file configimpl.h.

Referenced by appendStartComment, takeStartComment and writeTemplate.

m_storeRepl

QCString ConfigImpl::m_storeRepl

Definition at line 640 of file configimpl.h.

Referenced by appendStoreRepl, compareDoxyfile and takeStoreRepl.

m_userComment

QCString ConfigImpl::m_userComment

Definition at line 639 of file configimpl.h.

Referenced by appendUserComment, takeUserComment and writeTemplate.

Public Static Functions

config_err()

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

Definition at line 615 of file configimpl.h.

615 static void config_err(fmt::format_string<Args...> fmt, Args&&... args)
616 {
617 config_err_(fmt,fmt::make_format_args(args...));
618 }

Reference config_err_.

Referenced by tryPath.

config_err_()

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

Declaration at line 610 of file configimpl.h, definition at line 59 of file configimpl.l.

59void ConfigImpl::config_err_(fmt::string_view fmt, fmt::format_args args)
60{
61 fmt::print(stderr,"{}{}",error_str,fmt::vformat(fmt,args));
62}

Reference error_str.

Referenced by config_err.

config_term()

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

Definition at line 621 of file configimpl.h.

621 static void config_term(fmt::format_string<Args...> fmt, Args&&... args)
622 {
623 config_term_(fmt,fmt::make_format_args(args...));
624 }

Reference 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

Declaration at line 611 of file configimpl.h, definition at line 64 of file configimpl.l.

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

Reference error_str.

Referenced by config_term.

config_warn()

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

Definition at line 627 of file configimpl.h.

627 static void config_warn(fmt::format_string<Args...> fmt, Args&&... args)
628 {
629 config_warn_(fmt,fmt::make_format_args(args...));
630 }

Reference 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

Declaration at line 612 of file configimpl.h, definition at line 71 of file configimpl.l.

71void ConfigImpl::config_warn_(fmt::string_view fmt, fmt::format_args args)
72{
73 fmt::print(stderr,"{}{}",warning_str,fmt::vformat(fmt,args));
74}

Reference warning_str.

Referenced by config_warn.

deleteInstance()

void ConfigImpl::deleteInstance ()
inline static

Delete the instance

Definition at line 357 of file configimpl.h.

357 static void deleteInstance()
358 {
359 m_instance.reset();
360 }

Reference m_instance.

Referenced by Config::deinit.

instance()

ConfigImpl * ConfigImpl::instance ()
inline static

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.

Private Static Attributes

m_instance

std::unique_ptr< ConfigImpl > ConfigImpl::m_instance
static

Definition at line 637 of file configimpl.h.

637 static std::unique_ptr<ConfigImpl> m_instance;

Referenced by deleteInstance and instance.

Getting configuration values.

get

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

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

Definition at line 400 of file configimpl.h.

400 ConfigOption *get(const QCString &name) const
401 {
402 auto it = m_dict.find(name.str());
403 return it!=m_dict.end() ? it->second : nullptr;
404 }

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)

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.

Declaration at line 395 of file configimpl.h, definition at line 341 of file configimpl.l.

341bool &ConfigImpl::getBool(const char *fileName,int num,const char *name) const
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}

References config_term, m_dict and ConfigOption::O_Bool.

getEnum

QCString & ConfigImpl::getEnum (const char * fileName, int num, const char * name)

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.

Declaration at line 383 of file configimpl.h, definition at line 313 of file configimpl.l.

313QCString &ConfigImpl::getEnum(const char *fileName,int num,const char *name) const
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}

References config_term, m_dict and ConfigOption::O_Enum.

getInt

int & ConfigImpl::getInt (const char * fileName, int num, const char * name)

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.

Declaration at line 389 of file configimpl.h, definition at line 327 of file configimpl.l.

327int &ConfigImpl::getInt(const char *fileName,int num,const char *name) const
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}

References config_term, m_dict and ConfigOption::O_Int.

getList

StringVector & ConfigImpl::getList (const char * fileName, int num, const char * name)

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.

Declaration at line 377 of file configimpl.h, definition at line 299 of file configimpl.l.

299StringVector &ConfigImpl::getList(const char *fileName,int num,const char *name) const
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}

References config_term, m_dict and ConfigOption::O_List.

getString

QCString & ConfigImpl::getString (const char * fileName, int num, const char * name)

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.

Declaration at line 371 of file configimpl.h, definition at line 285 of file configimpl.l.

285QCString &ConfigImpl::getString(const char *fileName,int num,const char *name) const
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}

References config_term, m_dict and ConfigOption::O_String.

Adding configuration options.

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.

479 ConfigBool *addBool(const char *name,
480 const char *doc,
481 bool defVal)
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 }

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.

499 ConfigOption *addDisabled(const char *name)
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 }

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.

438 ConfigEnum *addEnum(const char *name,
439 const char *doc,
440 const char *defVal)
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.

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

Reference 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.

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

451 ConfigList *addList(const char *name,
452 const char *doc)
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 }

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.

425 ConfigString *addString(const char *name,
426 const char *doc)
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.


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


Generated via doxygen2docusaurus by Doxygen 1.14.0.