00001 // This is really -*- C++ -*- 00002 00003 #ifndef BasicType_h 00004 #define BasicType_h 00005 00006 #include <string> 00007 00008 #include "Serializable.h" 00009 00010 00011 using namespace std; 00012 00013 namespace BIE { 00014 00015 //+ CLICLASS BasicType 00021 class BasicType: public Serializable { 00022 00023 public: 00028 BasicType(string newtypename); 00029 00030 BasicType(); 00031 00032 //+ CLIMETHOD bool equals BasicType* 00034 bool equals(BasicType * type); 00035 00036 //+ CLIMETHOD string toString 00038 string toString(); 00039 00041 string getTypeName() {return type_name;}; 00042 00044 bool isArrayType() {return isArray;}; 00045 00047 static BasicType * String; 00048 00050 static BasicType * Int; 00051 00053 static BasicType * Real; 00054 00056 static BasicType * Bool; 00057 00058 protected: 00060 string type_name; 00061 00063 bool isArray; 00064 00066 00067 static BasicType StringObj; 00068 static BasicType IntObj; 00069 static BasicType RealObj; 00070 static BasicType BoolObj; 00072 00073 // AUTO GENERATED BY ../persistence/autopersist.py 00074 private: 00075 friend class boost::serialization::access; 00076 template<class Archive> 00077 void serialize(Archive & ar, const unsigned int version) { 00078 this->pre_serialize(ar, version); 00079 try { 00080 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Serializable); 00081 BIE_CATCH_BOOST_SERIALIZATION_EXCEPTION; 00082 } 00083 try { 00084 ar & BOOST_SERIALIZATION_NVP(type_name); 00085 BIE_CATCH_BOOST_SERIALIZATION_EXCEPTION; 00086 } 00087 try { 00088 ar & BOOST_SERIALIZATION_NVP(isArray); 00089 BIE_CATCH_BOOST_SERIALIZATION_EXCEPTION; 00090 } 00091 this->post_serialize(ar, version); 00092 } 00093 00094 }; 00095 00096 } // namespace BIE 00097 00098 BIE_CLASS_TYPE_INFO(BIE::BasicType) 00099 BIE_CLASS_EXPORT_KEY(BIE::BasicType) 00100 #endif