My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
ConfigOption Class Referenceabstract

#include <configimpl.h>

Inheritance diagram for ConfigOption:
ConfigBool ConfigDisabled ConfigEnum ConfigInfo ConfigInt ConfigList ConfigObsolete ConfigString

Public Types

enum  OptionType {
  O_Info, O_List, O_Enum, O_String,
  O_Int, O_Bool, O_Obsolete, O_Disabled
}
 
enum  { MAX_OPTION_LENGTH = 23 }
 

Public Member Functions

 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)
 

Protected Member Functions

virtual void writeTemplate (FTextStream &t, bool sl, bool upd)=0
 
virtual void convertStrToVal ()
 
virtual void substEnvVars ()=0
 
virtual void init ()
 
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

QCString m_spaces
 
QCString m_name
 
QCString m_doc
 
QCString m_dependency
 
QCString m_encoding
 
QCString m_userComment
 
OptionType m_kind
 

Friends

class ConfigImpl
 

Detailed Description

Abstract base class for any configuration option.

Definition at line 31 of file configimpl.h.

Member Enumeration Documentation

anonymous enum
Enumerator
MAX_OPTION_LENGTH 

Maximum length of an option in the config file. Used for alignment purposes.

Definition at line 49 of file configimpl.h.

{
};

The type of option

Enumerator
O_Info 
O_List 
O_Enum 
O_String 
O_Int 
O_Bool 
O_Obsolete 
O_Disabled 

Definition at line 38 of file configimpl.h.

{
O_Info, //<! A section header
O_List, //<! A list of items
O_Enum, //<! A fixed set of items
O_String, //<! A single item
O_Int, //<! An integer value
O_Bool, //<! A boolean value
O_Obsolete, //<! An obsolete option
O_Disabled //<! Disabled compile time option
};

Constructor & Destructor Documentation

ConfigOption::ConfigOption ( OptionType  t)
inline

Definition at line 56 of file configimpl.h.

References m_spaces.

: m_kind(t)
{
m_spaces.fill(' ',40);
}
virtual ConfigOption::~ConfigOption ( )
inlinevirtual

Definition at line 60 of file configimpl.h.

{
}

Member Function Documentation

void ConfigOption::addDependency ( const char *  dep)
inline

Definition at line 70 of file configimpl.h.

References m_dependency.

{ m_dependency = dep; }
virtual void ConfigOption::convertStrToVal ( )
inlineprotectedvirtual

Reimplemented in ConfigBool, and ConfigInt.

Definition at line 76 of file configimpl.h.

{}
QCString ConfigOption::dependsOn ( ) const
inline

Definition at line 69 of file configimpl.h.

References m_dependency.

{ return m_dependency; }
QCString ConfigOption::docs ( ) const
inline

Definition at line 67 of file configimpl.h.

References m_doc.

{ return m_doc; }
virtual void ConfigOption::init ( )
inlineprotectedvirtual

Reimplemented in ConfigBool, ConfigInt, ConfigString, ConfigEnum, and ConfigList.

Definition at line 78 of file configimpl.h.

{}
OptionType ConfigOption::kind ( ) const
inline

returns the kind of option this is.

Definition at line 65 of file configimpl.h.

References m_kind.

{ return m_kind; }
QCString ConfigOption::name ( ) const
inline
void ConfigOption::setEncoding ( const QCString &  e)
inline

Definition at line 71 of file configimpl.h.

References m_encoding.

{ m_encoding = e; }
void ConfigOption::setUserComment ( const QCString &  u)
inline

Definition at line 72 of file configimpl.h.

References m_userComment.

{ m_userComment += u; }
virtual void ConfigOption::substEnvVars ( )
protectedpure virtual
void ConfigOption::writeBoolValue ( FTextStream t,
bool  v 
)
protected
void ConfigOption::writeIntValue ( FTextStream t,
int  i 
)
protected
void ConfigOption::writeStringList ( FTextStream t,
QStrList &  l 
)
protected
void ConfigOption::writeStringValue ( FTextStream t,
QCString &  s 
)
protected
virtual void ConfigOption::writeTemplate ( FTextStream t,
bool  sl,
bool  upd 
)
protectedpure virtual

Friends And Related Function Documentation

friend class ConfigImpl
friend

Definition at line 33 of file configimpl.h.

Member Data Documentation

QCString ConfigOption::m_dependency
protected

Definition at line 88 of file configimpl.h.

Referenced by addDependency(), and dependsOn().

QCString ConfigOption::m_doc
protected
QCString ConfigOption::m_encoding
protected

Definition at line 89 of file configimpl.h.

Referenced by setEncoding().

OptionType ConfigOption::m_kind
protected

Definition at line 91 of file configimpl.h.

Referenced by kind().

QCString ConfigOption::m_name
protected
QCString ConfigOption::m_spaces
protected

Definition at line 85 of file configimpl.h.

Referenced by ConfigOption().

QCString ConfigOption::m_userComment
protected

Definition at line 90 of file configimpl.h.

Referenced by setUserComment().


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