00001 #ifndef TRY_FINALLY_STATEMENT_H_
00002 #define TRY_FINALLY_STATEMENT_H_
00003
00004 #include "control_statement.h"
00005
00006 #include <vector>
00007
00008 namespace il
00009 {
00010
00014 class try_finally_statement : public il::control_statement
00015 {
00016 friend class boost::serialization::access;
00017
00018 template<class Archive>
00019 void serialize(Archive & ar, const unsigned int version)
00020 {
00021 ar & boost::serialization::base_object<il::control_statement>(*this);
00022 ar & try_statement;
00023 ar & exit_statement;
00024 }
00025 private:
00026 statement *try_statement;
00027 statement *exit_statement;
00028
00029 public:
00030 try_finally_statement(statement *try_stmt,
00031 statement *exit_stmt,
00032 location loc);
00033 try_finally_statement();
00034 virtual ~try_finally_statement();
00035 void print();
00036
00037 statement *get_try_statement();
00038 statement *get_exit_statement();
00039
00040 virtual string to_string() const;
00041
00042 };
00043
00044 }
00045
00046 #endif