Value Class Reference

#include <value.h>

Inheritance diagram for Value:

BoxValue Expression ImageValue LineValue PointValue Range Reference Status TextValue ValueArray Variable List of all members.

Public Member Functions

virtual ~Value ()
virtual QString toString ()=0
bool equals (Value *other)
bool equals (Value &other)
void print ()
virtual Data getSaveDescription (QString prefix)=0

Static Public Member Functions

static Valueload (Data from)

Protected Member Functions

virtual bool equals_same_type (Value *other)=0

Detailed Description

Definition at line 17 of file value.h.


Constructor & Destructor Documentation

virtual Value::~Value  )  [inline, virtual]
 

Definition at line 20 of file value.h.

00020 {};


Member Function Documentation

bool Value::equals Value other  )  [inline]
 

Definition at line 23 of file value.h.

References equals().

00024     {
00025       return equals(&other);
00026     };

bool Value::equals Value other  ) 
 

Definition at line 13 of file value.cpp.

References equals_same_type().

Referenced by equals(), equals(), ValueArray::equals_same_type(), Expression::equals_same_type(), LineValue::equals_same_type(), ImageValue::equals_same_type(), and BoxValue::equals_same_type().

00014 {
00015   if (typeid(*other)==typeid(*this))
00016     return equals_same_type(other);
00017   return false;
00018 }

virtual bool Value::equals_same_type Value other  )  [protected, pure virtual]
 

Implemented in BoxValue, ImageValue, LineValue, PointValue, Range, Reference, Status, TextValue, Expression, ValueArray, and Variable.

Referenced by equals().

virtual Data Value::getSaveDescription QString  prefix  )  [pure virtual]
 

Implemented in BoxValue, ImageValue, LineValue, PointValue, Range, Reference, Status, TextValue, Expression, ValueArray, and Variable.

Referenced by IisCell::saveFile().

Value * Value::load Data  from  )  [static]
 

Definition at line 100 of file value.cpp.

Referenced by Expression::Expression(), IisCell::load(), and ValueArray::ValueArray().

00101 {
00102   if (from.type()==Symbol::type())
00103     return new Variable((Symbol)from);
00104   if (from.type()==String::type())
00105     return new TextValue((String)from);
00106   if (from.type()==Token::type())
00107     {
00108       Token compound = from;
00109       Symbol type = compound["type"];
00110       if (type==Symbol("expression"))
00111         return new Expression(compound);
00112       if (type==Symbol("image"))
00113         return new ImageValue(compound);
00114       if (type==Symbol("box"))
00115         return new BoxValue(compound);
00116       if (type==Symbol("point"))
00117         return new PointValue(compound);
00118       if (type==Symbol("line"))
00119         return new LineValue(compound);
00120       if (type==Symbol("reference"))
00121         return new Reference(compound);
00122       if (type==Symbol("range"))
00123         return new Range(compound);
00124     }
00125   printf("Cannot load value with the following text\n");
00126   DataTexter::write(from,stdout);
00127   assert(0);
00128 }

void Value::print  )  [inline]
 

Definition at line 27 of file value.h.

References toString().

00028     {
00029       printf("%s\n",(const char*)toString());
00030     };

virtual QString Value::toString  )  [pure virtual]
 

Implemented in BoxValue, ImageValue, LineValue, PointValue, Range, Reference, Status, TextValue, Expression, ValueArray, and Variable.

Referenced by IisCell::formule_changed(), IisCell::getFormuleTextForCell(), and print().


The documentation for this class was generated from the following files:
Generated on Mon Jun 5 22:08:44 2006 for iis by  doxygen 1.4.6