00001 #ifndef EXPRESSION_H_
00002 #define EXPRESSION_H_
00003
00004 #include "node.h"
00005 #include <assert.h>
00006
00007 namespace il
00008 {
00009 class type;
00010
00014 class expression : public il::node
00015 {
00016 friend class boost::serialization::access;
00017
00018 template<class Archive>
00019 void save(Archive & ar, const unsigned int version) const
00020 {
00021 ar & boost::serialization::base_object<il::node>(*this);
00022 ar & t;
00023 }
00024
00025 template<class Archive>
00026 void load(Archive & ar, const unsigned int version)
00027 {
00028 ar & boost::serialization::base_object<il::node>(*this);
00029 ar & t;
00030 type::register_loaded_typeref(&t);
00031 }
00032
00033 BOOST_SERIALIZATION_SPLIT_MEMBER()
00034
00035 protected:
00036 type* t;
00037
00038 public:
00039 expression();
00040 virtual ~expression();
00041 virtual string to_string() const = 0;
00042 virtual type* get_type(){return t;};
00043 void print(){};
00044 friend ostream& operator <<(ostream &os, const expression &obj);
00045 };
00046
00047 }
00048
00049 #endif