00001
00002
00003
00004
00005
00006
00007
00008 #ifndef SAIL_TRANSLATIONUNIT_H_
00009 #define SAIL_TRANSLATIONUNIT_H_
00010
00011 #include <boost/serialization/vector.hpp>
00012 #include <boost/serialization/map.hpp>
00013 #include <boost/serialization/list.hpp>
00014 #include <boost/serialization/string.hpp>
00015 #include <boost/serialization/set.hpp>
00016 #include <boost/serialization/version.hpp>
00017 #include <boost/serialization/split_member.hpp>
00018 #include <boost/serialization/shared_ptr.hpp>
00019 #include <boost/serialization/base_object.hpp>
00020 #include <boost/serialization/export.hpp>
00021
00022
00023 #include<string>
00024 #include<vector>
00025 #include "util.h"
00026 #include <typeinfo>
00027
00028
00029 namespace il{class translation_unit;}
00030 using namespace std;
00031
00032 namespace sail {
00033
00034 class Function;
00035
00036
00040 class TranslationUnit {
00041 friend class boost::serialization::access;
00042
00043 template<class Archive>
00044 void serialize(Archive & ar, const unsigned int version)
00045 {
00046 ar & functions;
00047 ar & original;
00048 ar & file_name;
00049 }
00050 private:
00051 vector<Function*> functions;
00052 il::translation_unit* original;
00053 string file_name;
00054
00055
00056 public:
00057
00058 TranslationUnit(il::translation_unit* original, string asm_name);
00059 TranslationUnit(vector<Function*> & functions,
00060 il::translation_unit* original, string asm_name);
00061 TranslationUnit(){};
00062 vector<Function*>& get_functions();
00063 void add_function(Function* f);
00064 il::translation_unit* get_original_translation_unit();
00065 virtual ~TranslationUnit();
00066 string get_file_name();
00067
00068
00069
00070
00071 };
00072
00073 }
00074
00075 #endif