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


Constructor & Destructor Documentation

Value::Value (  )  [inline]

Default constructor.

Definition at line 42 of file ConfigFile.h.

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

Constructor.

Parameters:
v - a string value.

Definition at line 47 of file ConfigFile.h.

Value::Value ( int  n  )  [inline]

Constructor.

Parameters:
n - an integer value.

Definition at line 52 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 67 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 62 of file ConfigFile.h.

References theValue.

Value::operator string (  )  const [inline]

Converts value into a string.

Returns:
a string value.

Definition at line 72 of file ConfigFile.h.

References theValue.


Friends And Related Function Documentation

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

Input operator.

Definition at line 74 of file ConfigFile.h.


Member Data Documentation

string Value::theValue [private]

Definition at line 80 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:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Mon Sep 26 18:43:52 2011 for CRyptography And Groups (CRAG) by  doxygen 1.6.1