]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/serialization/test/polymorphic_derived2.cpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / libs / serialization / test / polymorphic_derived2.cpp
1 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
2 // polymorphic_derived2.cpp
3
4 // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
5 // Use, modification and distribution is subject to the Boost Software
6 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
8
9 // See http://www.boost.org for updates, documentation, and revision history.
10
11 #include <boost/serialization/type_info_implementation.hpp>
12 #include <boost/serialization/extended_type_info_no_rtti.hpp>
13 #include <boost/serialization/export.hpp>
14
15 #include "polymorphic_base.hpp"
16 #include "polymorphic_derived2.hpp"
17
18 template<class Archive>
19 POLYMORPHIC_DERIVED2_DLL_DECL void polymorphic_derived2::serialize(
20 Archive &ar,
21 const unsigned int /* file_version */
22 ){
23 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(polymorphic_base);
24 }
25
26 const char * polymorphic_derived2::get_key() const {
27 return "polymorphic_derived2";
28 }
29 POLYMORPHIC_DERIVED2_DLL_DECL
30 polymorphic_derived2::polymorphic_derived2(){}
31 POLYMORPHIC_DERIVED2_DLL_DECL
32 polymorphic_derived2::~polymorphic_derived2(){}
33
34 #include <boost/archive/polymorphic_oarchive.hpp>
35 #include <boost/archive/polymorphic_iarchive.hpp>
36
37 template
38 POLYMORPHIC_DERIVED2_DLL_DECL void polymorphic_derived2::serialize(
39 boost::archive::polymorphic_oarchive &,
40 const unsigned int /* file_version */
41 );
42 template
43 POLYMORPHIC_DERIVED2_DLL_DECL void polymorphic_derived2::serialize(
44 boost::archive::polymorphic_iarchive &,
45 const unsigned int
46 );
47
48 // MWerks users can do this to make their code work
49 BOOST_SERIALIZATION_MWERKS_BASE_AND_DERIVED(polymorphic_base, polymorphic_derived2)
50
51 // note: export has to be AFTER #includes for all archive classes
52 BOOST_CLASS_EXPORT_IMPLEMENT(polymorphic_derived2)