1 #ifndef POLYMORPHIC_BASE_HPP
2 #define POLYMORPHIC_BASE_HPP
4 // MS compatible compilers support #pragma once
9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
10 // polymorphic_base.hpp simple class test
12 // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
13 // Use, modification and distribution is subject to the Boost Software
14 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
15 // http://www.boost.org/LICENSE_1_0.txt)
17 // See http://www.boost.org for updates, documentation, and revision history.
19 #include <boost/config.hpp>
21 #include <boost/serialization/access.hpp>
22 #include <boost/serialization/assume_abstract.hpp>
23 #include <boost/serialization/export.hpp>
24 #include <boost/serialization/type_info_implementation.hpp>
25 #include <boost/serialization/extended_type_info_no_rtti.hpp>
27 #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SERIALIZATION_DYN_LINK)
28 #if defined(POLYMORPHIC_BASE_IMPORT)
29 #define POLYMORPHIC_BASE_DLL_DECL BOOST_SYMBOL_IMPORT
30 #pragma message ("polymorphic_base imported")
31 #elif defined(POLYMORPHIC_BASE_EXPORT)
32 #define POLYMORPHIC_BASE_DLL_DECL BOOST_SYMBOL_EXPORT
33 #pragma message ("polymorphic_base exported")
37 #ifndef POLYMORPHIC_BASE_DLL_DECL
38 #define POLYMORPHIC_BASE_DLL_DECL
41 class POLYMORPHIC_BASE_DLL_DECL polymorphic_base
43 friend class boost::serialization::access;
44 template<class Archive>
47 const unsigned int /* file_version */
50 // note that since this class uses the "no_rtti"
51 // extended_type_info implementation, it MUST
52 // implement this function
53 virtual const char * get_key() const = 0;
54 virtual ~polymorphic_base(){};
57 BOOST_SERIALIZATION_ASSUME_ABSTRACT(polymorphic_base)
59 // the no_rtti system requires this !!!
60 BOOST_CLASS_EXPORT_KEY(polymorphic_base)
63 BOOST_CLASS_TYPE_INFO(
65 extended_type_info_no_rtti<polymorphic_base>
68 #endif // POLYMORPHIC_BASE_HPP