00001
00002
00003
00004
00005
00006
00007
00008 #ifndef CALL_ID_H_
00009 #define CALL_ID_H_
00010
00011 #include <string>
00012 using namespace std;
00013
00014
00015 #include <boost/archive/binary_iarchive.hpp>
00016 #include <boost/archive/binary_oarchive.hpp>
00017
00018 #include <boost/archive/text_iarchive.hpp>
00019 #include <boost/archive/text_oarchive.hpp>
00020
00021 #include "namespace_context.h"
00022 #include "language.h"
00023
00024 class call_id;
00025 namespace il {
00026 class type;
00027
00028 }
00029
00030 class Identifier;
00031
00032 struct call_id
00033 {
00034 friend class boost::serialization::access;
00035
00036 call_id(const Identifier& id);
00037 call_id(const call_id & other);
00038 call_id(const string & name, const il::namespace_context& ns, il::type* sig,
00039 language_type language);
00040 call_id();
00041
00042
00043 call_id(int loop_id, const string& fn_name, const il::namespace_context& ns,
00044 il::type* sig, language_type language);
00045 string name;
00046 il::type* sig;
00047 int loop_id;
00048 il::namespace_context ns;
00049 language_type language;
00050
00051 const string& get_function_name();
00052 il::type* get_signature();
00053 const il::namespace_context& get_namespace();
00054
00055 bool operator==(const call_id & other) const;
00056 bool operator<(const call_id& other) const;
00057 string to_string() const;
00058
00059 template<class Archive>
00060 void save(Archive & ar, const unsigned int version) const
00061 {
00062 ar & name;
00063 ar & ns;
00064 ar & sig;
00065 ar & loop_id;
00066 ar & language;
00067 }
00068 template<class Archive>
00069 void load(Archive & ar, const unsigned int version)
00070 {
00071 ar & name;
00072 ar & ns;
00073 ar & sig;
00074 ar & loop_id;
00075 ar & language;
00076 }
00077 BOOST_SERIALIZATION_SPLIT_MEMBER()
00078
00079 };
00080
00081 #endif