]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/serialization/test/polymorphic_derived2.hpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / serialization / test / polymorphic_derived2.hpp
1 #ifndef POLYMORPHIC_DERIVED2_HPP
2 #define POLYMORPHIC_DERIVED2_HPP
3
4 // MS compatible compilers support #pragma once
5 #if defined(_MSC_VER)
6 # pragma once
7 #endif
8
9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
10 // polymorphic_derived2.hpp simple class test
11
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)
16
17 // See http://www.boost.org for updates, documentation, and revision history.
18
19 #include <boost/config.hpp>
20
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>
26
27 #include <boost/preprocessor/empty.hpp>
28
29 #include "polymorphic_base.hpp"
30
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
35 #else
36 #define DLL_DECL
37 #endif
38
39 class DLL_DECL polymorphic_derived2 :
40 public polymorphic_base
41 {
42 friend class boost::serialization::access;
43 template<class Archive>
44 void serialize(
45 Archive &ar,
46 const unsigned int /* file_version */
47 );
48 virtual const char * get_key() const {
49 return "polymorphic_derived2";
50 }
51 };
52
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)
59
60 // note the mixing of type_info systems is supported.
61 BOOST_CLASS_TYPE_INFO(
62 polymorphic_derived2,
63 boost::serialization::extended_type_info_typeid<polymorphic_derived2>
64 )
65
66 #undef DLL_DECL
67
68 #endif // POLYMORPHIC_DERIVED2_HPP
69