Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

typeless.h

Go to the documentation of this file.
00001 
00007 #ifndef ___TYPELESS_H___
00008 #define ___TYPELESS_H___
00009 
00010 #include <string>
00011 using std::string;
00012 #include <iostream>
00013 
00014 #include "../src/stringutils.h"
00015 #include "../src/ind_types.h"
00016 
00017 
00018 
00027 class Typeless {
00028 public:
00029   typedef  Typeless self;
00030   virtual ~Typeless() { }
00031   
00033   virtual string stringrep(String::StreamFormat format=String::StreamFormat()) const=0;
00034   
00040   virtual string prettyprint(String::StreamFormat format=String::StreamFormat()) const
00041     {  return stringrep(format);  }
00042   
00047   virtual string typestring() const {  return "Unspecified";  }
00048 
00049   virtual bool operator<  (const Typeless& o) const=0;
00050   virtual bool operator>  (const Typeless& o) const=0;
00051   virtual bool operator== (const Typeless& o) const
00052     {  return !(*this < o || *this > o);  }
00053   virtual bool operator!= (const Typeless& o) const
00054     {  return !(*this == o);  }
00055 
00056   virtual Typeless& set(const Typeless& o) =0;
00057   
00059   typedef
00060 #ifndef LONG_DOUBLE_UNAVAILABLE
00061   long
00062 #endif
00063   double exprtype;
00064 
00066   virtual bool isnumeric() const {  return false;  }
00067 
00069   virtual exprtype numericvalue() const {  return 0;  }
00070 
00072   virtual Typeless* parse(const StringParser& parser, const string& s) const =0;
00073   
00075   virtual Typeless* clone() const=0;
00076 
00079   virtual Typeless* duplicate() const=0;
00080 };
00081 
00082 
00083 
00084 #endif /* ___TYPELESS_H___ */

Generated on Mon Jan 20 02:35:45 2003 for RF-LISSOM by doxygen1.3-rc2