00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef ARRAYREFWRITE_H_
00011 #define ARRAYREFWRITE_H_
00012
00013 #include "Instruction.h"
00014
00015 #include <string>
00016 using namespace std;
00017
00018 namespace il{class node;}
00019
00020 namespace sail {
00021
00022 class Variable;
00023 class Symbol;
00024
00039 class ArrayRefWrite:public Instruction {
00040 friend class boost::serialization::access;
00041
00042 template<class Archive>
00043 void serialize(Archive & ar, const unsigned int version)
00044 {
00045 ar & boost::serialization::base_object<sail::Instruction>(*this);
00046 ar & v1;
00047 ar & v2;
00048 ar & index;
00049 ar & offset;
00050 ar & name;
00051 }
00052
00053 private:
00054 Variable* v1;
00055 Symbol* v2;
00056 Symbol* index;
00057 int offset;
00058 string name;
00059 public:
00060 ArrayRefWrite(Variable* v1, Symbol* v2, Symbol* index,
00061 int offset, string name, il::node* original, int line);
00062 ArrayRefWrite(){};
00063 virtual string to_string() const;
00064
00068 Variable* get_lhs();
00069
00073 Symbol* get_rhs();
00074
00079 Symbol* get_index();
00080
00084 int get_offset();
00085
00090 string get_field_name();
00091 virtual bool is_removable();
00092 virtual string to_string(bool pretty_print) const;
00093 virtual ~ArrayRefWrite();
00094 };
00095
00096 }
00097
00098 #endif