00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef LOAD_H_
00011 #define LOAD_H_
00012
00013 #include "SaveInstruction.h"
00014 #include <string>
00015 using namespace std;
00016
00017 namespace il{class node;}
00018
00019 namespace sail {
00020
00021 class Variable;
00022 class Symbol;
00023
00034 class Load: public SaveInstruction {
00035 friend class boost::serialization::access;
00036
00037 template<class Archive>
00038 void serialize(Archive & ar, const unsigned int version)
00039 {
00040 ar & boost::serialization::base_object<sail::SaveInstruction>(*this);
00041 ar & v1;
00042 ar & v2;
00043 ar & offset;
00044 ar & name;
00045 }
00046 private:
00047 Variable* v1;
00048 Symbol* v2;
00049 int offset;
00050 string name;
00051 public:
00052 Load(Variable* v1, Symbol* v2, int offset, string name,
00053 il::node* original, int line);
00054 Load(){};
00055 virtual string to_string() const;
00056 virtual string to_string(bool pretty_print) const;
00057 virtual Variable* get_lhs();
00058 virtual void set_lhs(Variable* v);
00059 Symbol* get_rhs();
00060 int get_offset();
00061 string& get_field_name();
00062 virtual bool is_removable();
00063 virtual ~Load();
00064 };
00065
00066 }
00067
00068 #endif