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