00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef ADDRESSSTRING_H_
00010 #define ADDRESSSTRING_H_
00011
00012
00013 #include "SaveInstruction.h"
00014
00015 namespace il{class node;}
00016
00017 #include <string>
00018 using namespace std;
00019 namespace il{
00020 class string_const_exp;
00021 class node;
00022 }
00023
00024 namespace sail {
00025
00026 class Variable;
00027 class Symbol;
00028
00032 class AddressString:public SaveInstruction {
00033 friend class boost::serialization::access;
00034
00035 template<class Archive>
00036 void serialize(Archive & ar, const unsigned int version)
00037 {
00038 ar & boost::serialization::base_object<sail::SaveInstruction>(*this);
00039 ar & ce;
00040 ar & v;
00041 }
00042 private:
00043 il::string_const_exp* ce;
00044 Variable* v;
00045 public:
00046 AddressString(){};
00047 AddressString(Variable* v, il::string_const_exp* ce,
00048 il::node* original, int line);
00049 virtual ~AddressString();
00050 virtual string to_string() const;
00051 virtual Variable* get_lhs();
00052 virtual void set_lhs(Variable* v);
00053 string get_string();
00054 virtual string to_string(bool pretty_print) const;
00055 virtual bool is_removable();
00056 };
00057
00058 }
00059 #endif