ranges.cpp

Go to the documentation of this file.
00001 #include "ranges.h"
00002 
00003 Range::Range(Reference * f, Reference *t)
00004 {
00005   from = f;
00006   to = t;
00007 }
00008 
00009 Range::Range(Token compound)
00010 {
00011   from = new Reference(compound["from"]);
00012   to = new Reference(compound["to"]);
00013 }
00014 
00015 Data Range::getSaveDescription(QString ignore) 
00016 {
00017   Token compound;
00018   compound["type"]=Symbol("range");
00019   compound["from"]=from->getSaveDescription(ignore);
00020   compound["to"]=to->getSaveDescription(ignore);
00021   return compound;
00022 };
00023 
00024 QString Range::toString()
00025 {
00026   return from->toString()+":"+to->toString();
00027 }
00028 
00029 bool Range::equals_same_type(Value * other) 
00030 {
00031   return from->equals_same_type(((Range*)other)->from) &&
00032     to->equals_same_type(((Range*)other)->to);
00033 };

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