1 #ifndef POLYMORPHIC_DERIVED2_HPP
2 #define POLYMORPHIC_DERIVED2_HPP
4 // MS compatible compilers support #pragma once
9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
10 // polymorphic_derived2.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/nvp.hpp>
23 #include <boost/serialization/base_object.hpp>
24 #include <boost/serialization/type_info_implementation.hpp>
25 #include <boost/serialization/extended_type_info_typeid.hpp>
27 #include <boost/preprocessor/empty.hpp>
29 #include "polymorphic_base.hpp"
31 #if defined(POLYMORPHIC_DERIVED2_IMPORT)
32 #define DLL_DECL BOOST_SYMBOL_IMPORT
33 #elif defined(POLYMORPHIC_DERIVED2_EXPORT)
34 #define DLL_DECL BOOST_SYMBOL_EXPORT
39 class DLL_DECL polymorphic_derived2 :
40 public polymorphic_base
42 friend class boost::serialization::access;
43 template<class Archive>
46 const unsigned int /* file_version */
48 virtual const char * get_key() const {
49 return "polymorphic_derived2";
53 // we use this because we want to assign a key to this type
54 // but we don't want to explicitly instantiate code every time
55 // we do so!!!. If we don't do this, we end up with the same
56 // code in BOTH the DLL which implements polymorphic_derived2
57 // as well as the main program.
58 BOOST_CLASS_EXPORT_KEY(polymorphic_derived2)
60 // note the mixing of type_info systems is supported.
61 BOOST_CLASS_TYPE_INFO(
63 boost::serialization::extended_type_info_typeid<polymorphic_derived2>
68 #endif // POLYMORPHIC_DERIVED2_HPP