toycalc::variable< Type > Class Template Reference

An variable. More...

#include <funcvar.hh>

Inheritance diagram for toycalc::variable:

Inheritance graph
[legend]
Collaboration diagram for toycalc::variable< Type >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef Type value_type

Public Methods

 variable (const std::string &n, type *t, value_type v=0)
value_type value () const
 Get the value as a double. More...

value_type value (value_type val)
 Set the value from a double. More...

double from_double (double v)
 From double. More...

double to_double () const
 to double. More...

void show (std::ostream &o) const
 Show this variable on an output stream. More...


Detailed Description

template<typename Type>
class toycalc::variable< Type >

An variable.

Definition at line 75 of file funcvar.hh.


Member Typedef Documentation

template<typename Type>
typedef Type toycalc::variable< Type >::value_type
 

Definition at line 78 of file funcvar.hh.

Referenced by toycalc::variable< Type >::from_double(), toycalc::variable< Type >::value(), and toycalc::variable< Type >::variable().


Constructor & Destructor Documentation

template<typename Type>
toycalc::variable< Type >::variable const std::string   n,
type   t,
value_type    v = 0
[inline]
 

Definition at line 83 of file funcvar.hh.

References toycalc::variable< Type >::value_type.


Member Function Documentation

template<typename Type>
double toycalc::variable< Type >::from_double double    v [inline, virtual]
 

From double.

Implements toycalc::variable_base.

Definition at line 90 of file funcvar.hh.

References toycalc::variable< Type >::value_type.

template<typename Type>
void toycalc::variable< Type >::show std::ostream   o const [inline, virtual]
 

Show this variable on an output stream.

Reimplemented from toycalc::variable_base.

Definition at line 94 of file funcvar.hh.

template<typename Type>
double toycalc::variable< Type >::to_double   const [inline, virtual]
 

to double.

Implements toycalc::variable_base.

Definition at line 92 of file funcvar.hh.

template<typename Type>
value_type toycalc::variable< Type >::value value_type    val [inline]
 

Set the value from a double.

Definition at line 88 of file funcvar.hh.

References toycalc::variable< Type >::value_type.

template<typename Type>
value_type toycalc::variable< Type >::value   const [inline]
 

Get the value as a double.

Definition at line 86 of file funcvar.hh.

References toycalc::variable< Type >::value_type.


The documentation for this class was generated from the following file:
Top of page
Last update Wed Feb 5 03:34:25 2003
Christian Holm
Created by DoxyGen 1.2.15