DoubleParameter Class Reference

#include <DoubleParameter.hpp>

Inheritance diagram for DoubleParameter:

Inheritance graph
[legend]
Collaboration diagram for DoubleParameter:

Collaboration graph
[legend]

List of all members.

Public Types

enum  Type { Double, Integer, String, Enum }

Public Member Functions

void get (IdentifierSet &I)
 Does not add other identifiers.
void set (const real_t d)
void set (const int i)
void set (const char *c)
 operator real_t & ()
 operator real_t () const
void reset ()
const std::string typeName () const
 DoubleParameter (const DoubleParameter &dp)
 DoubleParameter (const real_t d, const char *label)
 ~DoubleParameter ()
void set (const std::string &s)
const Typetype () const
const char * label () const

Protected Attributes

Type __type

Private Member Functions

std::ostream & put (std::ostream &os) const

Private Attributes

const real_t __defaultDoubleValue
real_t __realValue

Friends

std::ostream & operator<< (std::ostream &os, const Parameter &P)


Detailed Description

class DoubleParameter This is the base describes Double Parameters.

Author:
Stéphane Del Pino.

Definition at line 35 of file DoubleParameter.hpp.


Member Enumeration Documentation

enum Parameter::Type [inherited]

Enumerator:
Double 
Integer 
String 
Enum 

Definition at line 41 of file Parameter.hpp.

00041             {
00042     Double,
00043     Integer,
00044     String,
00045     Enum
00046   };


Constructor & Destructor Documentation

DoubleParameter::DoubleParameter ( const DoubleParameter dp  )  [inline]

Definition at line 93 of file DoubleParameter.hpp.

00094     : Parameter(dp),
00095       __defaultDoubleValue(dp.__defaultDoubleValue),
00096       __realValue(dp.__realValue)
00097   {
00098     ;
00099   }  

DoubleParameter::DoubleParameter ( const real_t  d,
const char *  label 
) [inline]

Definition at line 101 of file DoubleParameter.hpp.

00102     : Parameter(Parameter::Double, label),
00103       __defaultDoubleValue(d),
00104       __realValue(d)
00105   {
00106     ;
00107   }

DoubleParameter::~DoubleParameter (  )  [inline]

Definition at line 109 of file DoubleParameter.hpp.

00110   {
00111     ;
00112   }


Member Function Documentation

std::ostream& DoubleParameter::put ( std::ostream &  os  )  const [inline, private, virtual]

Implements Parameter.

Definition at line 42 of file DoubleParameter.hpp.

References __realValue.

00043   {
00044     os << __realValue;
00045     return os;
00046   }

void DoubleParameter::get ( IdentifierSet I  )  [inline, virtual]

Does not add other identifiers.

Implements Parameter.

Definition at line 50 of file DoubleParameter.hpp.

00051   {
00052     ;
00053   }

void DoubleParameter::set ( const real_t  d  )  [inline, virtual]

Implements Parameter.

Definition at line 55 of file DoubleParameter.hpp.

References __realValue.

00056   {
00057     __realValue = d;
00058   }

void DoubleParameter::set ( const int  i  )  [inline, virtual]

Implements Parameter.

Definition at line 60 of file DoubleParameter.hpp.

References __realValue.

00061   {
00062     __realValue = (real_t)(i);
00063   }

void DoubleParameter::set ( const char *  c  )  [inline, virtual]

Implements Parameter.

Definition at line 65 of file DoubleParameter.hpp.

References ErrorHandler::normal, and stringify().

00066   {
00067     throw ErrorHandler(__FILE__,__LINE__,
00068                        "cannot assignate the string '"+stringify(c)
00069                        +"' to a real_t parameter\n",
00070                        ErrorHandler::normal);
00071   }

Here is the call graph for this function:

DoubleParameter::operator real_t & (  )  [inline]

Definition at line 73 of file DoubleParameter.hpp.

References __realValue.

00074   {
00075     return __realValue;
00076   }

DoubleParameter::operator real_t (  )  const [inline]

Definition at line 78 of file DoubleParameter.hpp.

References __realValue.

00079   {
00080     return __realValue;
00081   }

void DoubleParameter::reset (  )  [inline, virtual]

Implements Parameter.

Definition at line 83 of file DoubleParameter.hpp.

References __defaultDoubleValue, and __realValue.

00084   {
00085     __realValue = __defaultDoubleValue;
00086   }

const std::string DoubleParameter::typeName (  )  const [inline, virtual]

Implements Parameter.

Definition at line 88 of file DoubleParameter.hpp.

00089   {
00090     return "real";
00091   }

void Parameter::set ( const std::string &  s  )  [inline, inherited]

Definition at line 67 of file Parameter.hpp.

00067                                {
00068     set(s.c_str());
00069   }

const Type& Parameter::type (  )  const [inline, inherited]

Definition at line 74 of file Parameter.hpp.

References Parameter::__type.

00075   {
00076     return __type;
00077   }

const char * Parameter::label (  )  const [inherited]

Definition at line 26 of file Parameter.cpp.

References Parameter::__label.

00027 {
00028   return __label;
00029 }


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const Parameter P 
) [friend, inherited]

Definition at line 79 of file Parameter.hpp.

00081   {
00082     return P.put(os);
00083   }


Member Data Documentation

const real_t DoubleParameter::__defaultDoubleValue [private]

Definition at line 39 of file DoubleParameter.hpp.

Referenced by reset().

real_t DoubleParameter::__realValue [private]

Definition at line 40 of file DoubleParameter.hpp.

Referenced by operator real_t(), operator real_t &(), put(), reset(), and set().

Type Parameter::__type [protected, inherited]

Definition at line 49 of file Parameter.hpp.

Referenced by Parameter::type().


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

Generated on Wed Nov 19 00:05:59 2008 for FreeFEM3D (aka ff3d) by  doxygen 1.5.6