00001 #ifndef SET_INSTRUCTION_H_
00002 #define SET_INSTRUCTION_H_
00003
00004 #include "instruction.h"
00005
00006
00007 namespace il
00008 {
00009
00013 class set_instruction : public il::instruction
00014 {
00015 friend class boost::serialization::access;
00016
00017 template<class Archive>
00018 void serialize(Archive & ar, const unsigned int version)
00019 {
00020 ar & boost::serialization::base_object<il::instruction>(*this);
00021 ar & lvalue;
00022 ar & rhs;
00023 ar & is_declaration;
00024 }
00025 private:
00026 expression* lvalue;
00027 expression* rhs;
00028
00029 bool is_declaration;
00030
00031
00032
00033 public:
00034 set_instruction();
00035 set_instruction(expression* lvalue, expression* rhs, location loc,
00036 bool declaration);
00037 expression* get_lvalue();
00038 expression* get_rhs();
00039 bool is_declaration_inst();
00040 void print();
00041 virtual string to_string() const;
00042 virtual ~set_instruction();
00043 };
00044
00045 }
00046
00047 #endif