Skip to main content

The ConfigString Class Reference

Class representing a string type option. More...

Declaration

class ConfigString { ... }

Included Headers

#include <src/configimpl.h>

Base class

classConfigOption

Abstract base class for any configuration option. More...

Enumerations Index

enumWidgetType { ... }

Public Constructors Index

ConfigString (const char *name, const char *doc)

Public Member Functions Index

voidsetWidgetType (WidgetType w)
WidgetTypewidgetType () const
voidsetDefaultValue (const char *v)
QCString *valueRef ()
voidwriteTemplate (TextStream &t, bool sl, bool) override
voidcompareDoxyfile (TextStream &t, Config::CompareMode compareMode) override
voidwriteXMLDoxyfile (TextStream &t) override
voidwriteXSDDoxyfile (TextStream &t) override
voidsubstEnvVars () override
voidinit () override
voidemptyValueToDefault () override
boolisDefault () override

Private Member Attributes Index

QCStringm_value
QCStringm_defValue
WidgetTypem_widgetType

Description

Class representing a string type option.

Definition at line 187 of file configimpl.h.

Enumerations

WidgetType

enum ConfigString::WidgetType
Enumeration values
String
File
Dir
Image
FileAndDir

Definition at line 190 of file configimpl.h.

Public Constructors

ConfigString()

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

Definition at line 191 of file configimpl.h.

191 ConfigString(const char *name,const char *doc)
193 {
194 m_name = name;
195 m_doc = doc;
197 }

References ConfigOption::ConfigOption, ConfigOption::m_doc, ConfigOption::m_name, m_widgetType, ConfigOption::name, ConfigOption::O_String and String.

Public Member Functions

compareDoxyfile()

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

Declaration at line 203 of file configimpl.h, definition at line 502 of file configimpl.l.

References isDefault, TRUE and writeTemplate.

emptyValueToDefault()

void ConfigString::emptyValueToDefault ()
inline virtual

Definition at line 208 of file configimpl.h.

208 void emptyValueToDefault() override { if (m_value.isEmpty()) m_value=m_defValue; };

References m_defValue and m_value.

init()

void ConfigString::init ()
inline virtual

Definition at line 207 of file configimpl.h.

207 void init() override { m_value = m_defValue; }

References m_defValue and m_value.

Referenced by Config::parse.

isDefault()

bool ConfigString::isDefault ()
inline virtual

Definition at line 209 of file configimpl.h.

209 bool isDefault() override { return m_value.stripWhiteSpace() == m_defValue.stripWhiteSpace(); }

References m_defValue and m_value.

Referenced by compareDoxyfile and writeXMLDoxyfile.

setDefaultValue()

void ConfigString::setDefaultValue (const char * v)
inline

Definition at line 200 of file configimpl.h.

200 void setDefaultValue(const char *v) { m_defValue = v; }

Reference m_defValue.

setWidgetType()

void ConfigString::setWidgetType (WidgetType w)
inline

Definition at line 198 of file configimpl.h.

Reference m_widgetType.

substEnvVars()

void ConfigString::substEnvVars ()
virtual

Declaration at line 206 of file configimpl.h, definition at line 1506 of file configimpl.l.

References m_value and substEnvVarsInString.

valueRef()

QCString * ConfigString::valueRef ()
inline

Definition at line 201 of file configimpl.h.

201 QCString *valueRef() { return &m_value; }

Reference m_value.

Referenced by checkEncoding and DocPara::handleDoxyConfig.

widgetType()

WidgetType ConfigString::widgetType ()
inline

Definition at line 199 of file configimpl.h.

Reference m_widgetType.

writeTemplate()

void ConfigString::writeTemplate (TextStream & t, bool sl, bool)
virtual

Declaration at line 202 of file configimpl.h, definition at line 485 of file configimpl.l.

486{
487 if (!sl)
488 {
489 t << "\n";
491 t << "\n";
492 }
493 else if (!m_userComment.isEmpty())
494 {
496 }
497 t << m_name << m_spaces.left(MAX_OPTION_LENGTH-m_name.length()) << "=";
499 t << "\n";
500}

References convertToComment, ConfigOption::m_doc, ConfigOption::m_name, ConfigOption::m_spaces, ConfigOption::m_userComment, m_value, ConfigOption::MAX_OPTION_LENGTH and ConfigOption::writeStringValue.

Referenced by compareDoxyfile.

writeXMLDoxyfile()

void ConfigString::writeXMLDoxyfile (TextStream & t)
virtual

Declaration at line 204 of file configimpl.h, definition at line 507 of file configimpl.l.

508{
509 t << " <option id='" << m_name << "'";
510 t << " default='" << (isDefault() ? "yes" : "no") << "'";
511 t << " type='string'";
512 t << ">";
513 t << "<value>";
514 t << "<![CDATA[";
516 t << "]]>";
517 t << "</value>";
518 t << "</option>\n";
519}

References isDefault, ConfigOption::m_name, m_value and ConfigOption::writeStringValue.

writeXSDDoxyfile()

void ConfigString::writeXSDDoxyfile (TextStream & t)
virtual

Declaration at line 205 of file configimpl.h, definition at line 521 of file configimpl.l.

522{
523 t << " <xsd:enumeration value=\"" << m_name << "\"/>\n";
524}

Reference ConfigOption::m_name.

Private Member Attributes

m_defValue

QCString ConfigString::m_defValue

Definition at line 213 of file configimpl.h.

Referenced by emptyValueToDefault, init, isDefault and setDefaultValue.

m_value

QCString ConfigString::m_value

m_widgetType

WidgetType ConfigString::m_widgetType

Definition at line 214 of file configimpl.h.

Referenced by ConfigString, setWidgetType and widgetType.


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


Generated via doxygen2docusaurus by Doxygen 1.14.0.