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(POLYMORPHIC_BASE_IMPORT)
28 #define POLYMORPHIC_BASE_DLL_DECL BOOST_SYMBOL_IMPORT
29 #pragma message ("polymorphic_base imported")
30 #elif defined(POLYMORPHIC_BASE_EXPORT)
31 #define POLYMORPHIC_BASE_DLL_DECL BOOST_SYMBOL_EXPORT
32 #pragma message ("polymorphic_base exported")
35 #ifndef POLYMORPHIC_BASE_DLL_DECL
36 #define POLYMORPHIC_BASE_DLL_DECL
39 class BOOST_SYMBOL_VISIBLE polymorphic_base
41 friend class boost::serialization::access;
42 template<class Archive>
43 POLYMORPHIC_BASE_DLL_DECL void serialize(
45 const unsigned int /* file_version */
48 // note that since this class uses the "no_rtti"
49 // extended_type_info implementation, it MUST
50 // implement this function
51 virtual const char * get_key() const = 0;
52 POLYMORPHIC_BASE_DLL_DECL polymorphic_base();
53 POLYMORPHIC_BASE_DLL_DECL virtual ~polymorphic_base();
56 BOOST_SERIALIZATION_ASSUME_ABSTRACT(polymorphic_base)
58 // the no_rtti system requires this !!!
59 BOOST_CLASS_EXPORT_KEY(polymorphic_base)
61 BOOST_CLASS_TYPE_INFO(
63 extended_type_info_no_rtti<polymorphic_base>
66 #endif // POLYMORPHIC_BASE_HPP