Public Member Functions | Private Attributes | List of all members
ConfigEnum Class Reference

#include <config.h>

Inheritance diagram for ConfigEnum:
ConfigOption

Public Member Functions

 ConfigEnum (const char *name, const char *doc, const char *defVal)
 
void addValue (const char *v)
 
QStrListIterator iterator ()
 
QCStringvalueRef ()
 
void substEnvVars ()
 
void writeTemplate (FTextStream &t, bool sl, bool)
 
void init ()
 
- Public Member Functions inherited from ConfigOption
 ConfigOption (OptionType t)
 
virtual ~ConfigOption ()
 
OptionType kind () const
 
QCString name () const
 
QCString docs () const
 
QCString dependsOn () const
 
void addDependency (const char *dep)
 
void setEncoding (const QCString &e)
 
void setUserComment (const QCString &u)
 

Private Attributes

QStrList m_valueRange
 
QCString m_value
 
QCString m_defValue
 

Additional Inherited Members

- Public Types inherited from ConfigOption
enum  OptionType {
  O_Info, O_List, O_Enum, O_String,
  O_Int, O_Bool, O_Obsolete, O_Disabled
}
 
enum  { MAX_OPTION_LENGTH = 23 }
 
- Protected Member Functions inherited from ConfigOption
virtual void convertStrToVal ()
 
void writeBoolValue (FTextStream &t, bool v)
 
void writeIntValue (FTextStream &t, int i)
 
void writeStringValue (FTextStream &t, QCString &s)
 
void writeStringList (FTextStream &t, QStrList &l)
 
- Protected Attributes inherited from ConfigOption
QCString m_spaces
 
QCString m_name
 
QCString m_doc
 
QCString m_dependency
 
QCString m_encoding
 
QCString m_userComment
 
OptionType m_kind
 

Detailed Description

Class representing an enum type option.

Definition at line 136 of file config.h.

Constructor & Destructor Documentation

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

Definition at line 139 of file config.h.

141  {
142  m_name = name;
143  m_doc = doc;
144  m_value = defVal;
145  m_defValue = defVal;
146  }
QCString m_name
Definition: config.h:86
ConfigOption(OptionType t)
Definition: config.h:56
QCString m_defValue
Definition: config.h:160
QCString m_doc
Definition: config.h:87
QCString m_value
Definition: config.h:159
QCString name() const
Definition: config.h:66
QCString doc

Member Function Documentation

void ConfigEnum::addValue ( const char *  v)
inline

Definition at line 147 of file config.h.

147 { m_valueRange.append(v); }
QStrList m_valueRange
Definition: config.h:158
void append(const type *d)
Definition: qinternallist.h:61
void ConfigEnum::init ( )
inlinevirtual

Reimplemented from ConfigOption.

Definition at line 155 of file config.h.

155 { m_value = m_defValue.copy(); }
QCString copy() const
Definition: qcstring.h:250
QCString m_defValue
Definition: config.h:160
QCString m_value
Definition: config.h:159
QStrListIterator ConfigEnum::iterator ( )
inline

Definition at line 148 of file config.h.

149  {
151  }
QStrList m_valueRange
Definition: config.h:158
QInternalListIterator< char > QStrListIterator
Definition: qstrlist.h:54
void ConfigEnum::substEnvVars ( )
virtual

Implements ConfigOption.

Definition at line 3022 of file config.cpp.

3023 {
3025 }
QCString m_value
Definition: config.h:159
static void substEnvVarsInString(QCString &s)
Definition: config.cpp:2897
QCString* ConfigEnum::valueRef ( )
inline

Definition at line 152 of file config.h.

152 { return &m_value; }
QCString m_value
Definition: config.h:159
void ConfigEnum::writeTemplate ( FTextStream t,
bool  sl,
bool   
)
virtual

Implements ConfigOption.

Definition at line 938 of file config.cpp.

939 {
940  if (!sl)
941  {
942  t << endl;
944  t << endl;
945  }
946  else if (!m_userComment.isEmpty())
947  {
949  }
952  t << "\n";
953 }
QCString m_spaces
Definition: config.h:85
QCString m_name
Definition: config.h:86
bool isEmpty() const
Definition: qcstring.h:189
QCString m_userComment
Definition: config.h:90
static QCString convertToComment(const QCString &s, const QCString &u)
Definition: config.cpp:694
uint length() const
Definition: qcstring.h:195
void writeStringValue(FTextStream &t, QCString &s)
Definition: config.cpp:737
QCString left(uint len) const
Definition: qcstring.cpp:213
QCString m_doc
Definition: config.h:87
QCString m_value
Definition: config.h:159
QTextStream & endl(QTextStream &s)

Member Data Documentation

QCString ConfigEnum::m_defValue
private

Definition at line 160 of file config.h.

QCString ConfigEnum::m_value
private

Definition at line 159 of file config.h.

QStrList ConfigEnum::m_valueRange
private

Definition at line 158 of file config.h.


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