text.h

Go to the documentation of this file.
00001 #include "value.h"
00002 
00003 class TextValue: public Value
00004 {
00005   QString text;
00006  public:
00007   TextValue(QString t) : text(t) 
00008     {
00009     };
00010   TextValue(double val) : text(QString::number(val)) 
00011     {
00012     };
00013   virtual QString toString() 
00014     {
00015       return text;
00016     };
00017   QString getText() 
00018     {
00019       return text;
00020     };
00021   double number()  
00022     {
00023       return atof(text); 
00024     };
00025   int    integer() 
00026     {
00027       return atol(text); 
00028     };
00029   virtual bool equals_same_type(Value * other) 
00030     {
00031       return ((TextValue*)other)->text == text;
00032     };
00033   virtual Data getSaveDescription(QString) 
00034     {
00035       return String(text);
00036     };
00037 };
00038 

Generated on Mon Jun 5 22:08:42 2006 for iis by  doxygen 1.4.6