Debian Codegraph @

cmake/configure/TestBoostBug/polymorphic_base.hpp

raw
1 #ifndef POLYMORPHIC_BASE_HPP
2 #define POLYMORPHIC_BASE_HPP
3
4 #include <boost/config.hpp>
5
6 #include <boost/serialization/access.hpp>
7 #include <boost/serialization/assume_abstract.hpp>
8 #include <boost/serialization/export.hpp>
9 #include <boost/serialization/type_info_implementation.hpp>
10 #include <boost/serialization/extended_type_info_no_rtti.hpp>
11
12 class BOOST_SYMBOL_VISIBLE polymorphic_base
13 {
14 friend class boost::serialization::access;
15 template<class Archive>
16 void serialize(
17 Archive & /* ar */,
18 const unsigned int /* file_version */
19 ){}
20 public:
21 // note that since this class uses the "no_rtti"
22 // extended_type_info implementation, it MUST
23 // implement this function
24 virtual const char * get_key() const = 0;
25 virtual ~polymorphic_base(){};
26 };
27
28 BOOST_SERIALIZATION_ASSUME_ABSTRACT(polymorphic_base)
29
30 // the no_rtti system requires this !!!
31 BOOST_CLASS_EXPORT_KEY(polymorphic_base)
32
33 BOOST_CLASS_TYPE_INFO(
34 polymorphic_base,
35 boost::serialization::extended_type_info_no_rtti<polymorphic_base>
36 )
37
38 #endif // POLYMORPHIC_BASE_HPP