00001 #ifndef THROW_EXPRESSION_H_
00002 #define THROW_EXPRESSION_H_
00003
00004 #include "expression.h"
00005 #include "location.h"
00006 #include <string>
00007 using namespace std;
00008
00009 namespace il
00010 {
00011
00012 class type;
00013
00017 class throw_expression : public il::expression
00018 {
00019 friend class boost::serialization::access;
00020
00021 template<class Archive>
00022 void save(Archive & ar, const unsigned int version) const
00023 {
00024 ar & boost::serialization::base_object<il::expression>(*this);
00025 ar & thrown_type;
00026 ar & full_throw_expr;
00027 }
00028
00029 template<class Archive>
00030 void load(Archive & ar, const unsigned int version)
00031 {
00032 ar & boost::serialization::base_object<il::expression>(*this);
00033 ar & thrown_type;
00034 type::register_loaded_typeref(&thrown_type);
00035 ar & full_throw_expr;
00036 }
00037
00038 BOOST_SERIALIZATION_SPLIT_MEMBER()
00039 private:
00040 type *thrown_type;
00041 expression *full_throw_expr;
00042
00043 public:
00044 throw_expression(type *thrown_type, expression *full_throw_expr, type *t, location loc);
00045 throw_expression();
00046 virtual ~throw_expression();
00047
00048 virtual type *get_thrown_type();
00049 virtual expression *get_full_throw_expression();
00050
00051 virtual string to_string() const;
00052 };
00053
00054 }
00055
00056 #endif