Implements data types of parameters obtained from a configuration file. More...
#include <ConfigFile.h>
Public Member Functions | |
Value () | |
Default constructor. | |
Value (const char *v) | |
Constructor. | |
Value (int n) | |
Constructor. | |
operator int () const | |
Converts value into an integer. | |
operator double () const | |
Converts value into a double precision number. | |
operator string () const | |
Converts value into a string. | |
Private Attributes | |
string | theValue |
Friends | |
istream & | operator>> (istream &in, Value &v) |
Input operator. |
Implements data types of parameters obtained from a configuration file.
Allows universal handling of parameters with different data types. Usually an instance of this class is returned by ConfigFile::getValue() function.
Definition at line 38 of file ConfigFile.h.
Value::Value | ( | ) | [inline] |
Default constructor.
Definition at line 42 of file ConfigFile.h.
Value::Value | ( | const char * | v | ) | [inline] |
Value::Value | ( | int | n | ) | [inline] |
Constructor.
n | - an integer value. |
Definition at line 52 of file ConfigFile.h.
References theValue.
Value::operator double | ( | ) | const [inline] |
Converts value into a double precision number.
Definition at line 67 of file ConfigFile.h.
References theValue.
Value::operator int | ( | ) | const [inline] |
Converts value into an integer.
Definition at line 62 of file ConfigFile.h.
References theValue.
Value::operator string | ( | ) | const [inline] |
Converts value into a string.
Definition at line 72 of file ConfigFile.h.
References theValue.
istream& operator>> | ( | istream & | in, | |
Value & | v | |||
) | [friend] |
Input operator.
Definition at line 74 of file ConfigFile.h.
string Value::theValue [private] |
Definition at line 80 of file ConfigFile.h.
Referenced by operator double(), operator int(), operator string(), and Value().