The InspIRCd Project
Home | Developers | Wiki | Forums | Bug Tracker | SVN | Download
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

ValueItem Class Reference

Holds a config value, either string, integer or boolean. More...

#include <configreader.h>

Collaboration diagram for ValueItem:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ValueItem (int value)
 Initialize with an int.
 ValueItem (bool value)
 Initialize with a bool.
 ValueItem (const char *value)
 Initialize with a char pointer.
void Set (const char *val)
 Change value to a char pointer.
void Set (int value)
 Change value to an int.
int GetInteger ()
 Get value as an int.
char * GetString ()
 Get value as a string.
bool GetBool ()
 Get value as a bool.

Private Attributes

std::string v
 Actual data.

Detailed Description

Holds a config value, either string, integer or boolean.

Callback functions receive one or more of these, either on their own as a reference, or in a reference to a deque of them. The callback function can then alter the values of the ValueItem classes to validate the settings.

Definition at line 65 of file configreader.h.


Constructor & Destructor Documentation

ValueItem::ValueItem int  value  ) 
 

Initialize with an int.

Definition at line 2144 of file configreader.cpp.

References v.

ValueItem::ValueItem bool  value  ) 
 

Initialize with a bool.

Definition at line 2151 of file configreader.cpp.

References v.

ValueItem::ValueItem const char *  value  ) 
 

Initialize with a char pointer.

Definition at line 2158 of file configreader.cpp.

References v.


Member Function Documentation

bool ValueItem::GetBool  ) 
 

Get value as a bool.

Definition at line 2187 of file configreader.cpp.

References GetInteger(), and v.

Referenced by ServerConfig::Read().

int ValueItem::GetInteger  ) 
 

Get value as an int.

Definition at line 2175 of file configreader.cpp.

References v.

Referenced by GetBool(), ServerConfig::Read(), ValidateMaxConn(), ValidateMaxTargets(), ValidateMaxWho(), ValidateNetBufferSize(), and ValidateSoftLimit().

char * ValueItem::GetString  ) 
 

Get value as a string.

Definition at line 2182 of file configreader.cpp.

References v.

Referenced by ServerConfig::Read(), ValidateDisabledCModes(), ValidateDisabledUModes(), ValidateDnsServer(), ValidateExemptChanOps(), ValidateInvite(), ValidateModeLists(), ValidateMotd(), ValidateNotEmpty(), ValidateRules(), ValidateServerName(), ValidateSID(), and ValidateWhoWas().

void ValueItem::Set int  value  ) 
 

Change value to an int.

Definition at line 2168 of file configreader.cpp.

References v.

void ValueItem::Set const char *  val  ) 
 

Change value to a char pointer.

Definition at line 2163 of file configreader.cpp.

References v.

Referenced by ValidateDnsServer(), ValidateMaxTargets(), ValidateMaxWho(), ValidateNetBufferSize(), ValidateServerName(), and ValidateSoftLimit().


Member Data Documentation

std::string ValueItem::v [private]
 

Actual data.

Definition at line 68 of file configreader.h.

Referenced by GetBool(), GetInteger(), GetString(), Set(), and ValueItem().


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