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