pelib  2.0.0
pelib::Scalar< Value > Class Template Reference

#include <Scalar.hpp>

Inheritance diagram for pelib::Scalar< Value >:
[legend]

List of all members.

Public Member Functions

 Scalar (const std::string name, const Value value, precision prec=leave)
 Scalar (const Scalar< Value > *scalar)
virtual Scalarclone () const
virtual const Value & getValue () const
void merge (const AlgebraData *ptr)

Protected Attributes

Value value

Detailed Description

template<class Value>
class pelib::Scalar< Value >

Algebraic scalar value associated to a string name

Definition at line 39 of file Scalar.hpp.


Constructor & Destructor Documentation

template<class Value>
pelib::Scalar< Value >::Scalar ( const std::string  name,
const Value  value,
precision  prec = leave 
) [inline]

Constructor: associates a single value to a string name

Definition at line 43 of file Scalar.hpp.

template<class Value>
pelib::Scalar< Value >::Scalar ( const Scalar< Value > *  scalar) [inline]

Copy constructor

Definition at line 49 of file Scalar.hpp.


Member Function Documentation

template<class Value>
virtual Scalar* pelib::Scalar< Value >::clone ( ) const [inline, virtual]

Returns a pointer to a copy of this scalar

Implements pelib::AlgebraData.

Definition at line 57 of file Scalar.hpp.

template<class Value>
virtual const Value& pelib::Scalar< Value >::getValue ( ) const [inline, virtual]

Return the value associated to this instance

Definition at line 65 of file Scalar.hpp.

template<class Value>
void pelib::Scalar< Value >::merge ( const AlgebraData ) [inline, virtual]

Merge data in this instance and instance given as argument, or replace it if merging is not possible

Implements pelib::AlgebraData.

Definition at line 71 of file Scalar.hpp.


Member Data Documentation

template<class Value>
Value pelib::Scalar< Value >::value [protected]

Value help by this instance

Definition at line 86 of file Scalar.hpp.


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