#include <TemplateValue.h>
Inherits IValue.
Inheritance diagram for TemplateValue:
Public Member Functions | |
TemplateValue (Typ value, std::string name="templateValue") | |
constructor needs the value and a name (for IValue -> is default implemented as "templateValue") | |
virtual | ~TemplateValue () |
default destructor | |
Typ | getValue (void) const |
this function can be used to read the standard data type. | |
void | setValue (Typ value) |
this function is to change the value. | |
virtual IValue * | operator * (const IValue &value) const |
the implementation of the mul operator, what is part of the interface. | |
virtual IValue * | operator+ (const IValue &value) const |
the implementation of the add operator what is part of the interface. | |
virtual | operator std::string (void) const |
cast operatot to string use the convert methode. | |
virtual bool | store (FILE *f) const |
store the value in a file | |
virtual bool | restore (FILE *f) |
restore the value from a file | |
Protected Attributes | |
Typ | m_value |
the real value |
All parts are declared and defined in the header because the needed template implementations are needed to the compiling time of the lib. To create new classes in an using program it must be in the header.
TemplateValue | ( | Typ | value, | |
std::string | name = "templateValue" | |||
) | [inline] |
virtual ~TemplateValue | ( | ) | [inline, virtual] |
default destructor
Typ getValue | ( | void | ) | const [inline] |
this function can be used to read the standard data type.
virtual operator std::string | ( | void | ) | const [inline, virtual] |
cast operatot to string use the convert methode.
Reimplemented from IValue.
virtual bool restore | ( | FILE * | f | ) | [inline, virtual] |
restore the value from a file
f | (FILE*) the file where the value inside |
Reimplemented from IValue.
void setValue | ( | Typ | value | ) | [inline] |
this function is to change the value.
value |
virtual bool store | ( | FILE * | f | ) | const [inline, virtual] |
store the value in a file
f | (FILE*) the file to store |
Reimplemented from IValue.
Typ m_value [protected] |
the real value