Value Class Reference

Implements data types of parameters obtained from a configuration file. More...

#include <ConfigFile.h>

List of all members.

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.


Detailed Description

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 37 of file ConfigFile.h.


Constructor & Destructor Documentation

Value::Value  )  [inline]
 

Default constructor.

Definition at line 41 of file ConfigFile.h.

Value::Value const char *  v  )  [inline]
 

Constructor.

Parameters:
v - a string value.

Definition at line 46 of file ConfigFile.h.

Value::Value int  n  )  [inline]
 

Constructor.

Parameters:
n - an integer value.

Definition at line 51 of file ConfigFile.h.

References theValue.


Member Function Documentation

Value::operator double  )  const [inline]
 

Converts value into a double precision number.

Returns:
a double value. 0 if an error.

Definition at line 66 of file ConfigFile.h.

References theValue.

Value::operator int  )  const [inline]
 

Converts value into an integer.

Returns:
an integer value. 0 if an error.

Definition at line 61 of file ConfigFile.h.

References theValue.

Value::operator string  )  const [inline]
 

Converts value into a string.

Returns:
a string value.

Definition at line 71 of file ConfigFile.h.

References theValue.


Friends And Related Function Documentation

istream& operator>> istream &  in,
Value v
[friend]
 

Input operator.

Definition at line 73 of file ConfigFile.h.


Member Data Documentation

string Value::theValue [private]
 

Definition at line 79 of file ConfigFile.h.

Referenced by operator double(), operator int(), operator string(), and Value().


The documentation for this class was generated from the following file:
Generated on Mon Feb 27 22:47:19 2006 for CRyptography And Groups (CRAG) by  doxygen 1.4.4