-
Notifications
You must be signed in to change notification settings - Fork 0
/
polymorphic_derived2.cpp
47 lines (40 loc) · 1.28 KB
/
polymorphic_derived2.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include <boost/serialization/type_info_implementation.hpp>
#include <boost/serialization/extended_type_info_no_rtti.hpp>
#include <boost/serialization/export.hpp>
#include "polymorphic_derived2.hpp"
template<class Archive>
void polymorphic_derived2::serialize(
Archive &ar,
const unsigned int /* file_version */
){
ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(polymorphic_base);
}
// instantiate code for text archives
#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>
template
void polymorphic_derived2::serialize(
boost::archive::text_oarchive & ar,
const unsigned int version
);
template
void polymorphic_derived2::serialize(
boost::archive::text_iarchive & ar,
const unsigned int version
);
// instantiate code for polymorphic archives
#include <boost/archive/polymorphic_iarchive.hpp>
#include <boost/archive/polymorphic_oarchive.hpp>
template
void polymorphic_derived2::serialize(
boost::archive::polymorphic_oarchive & ar,
const unsigned int version
);
template
/*POLYMORPHIC_DERIVED2_DLL_DECL*/
void polymorphic_derived2::serialize(
boost::archive::polymorphic_iarchive & ar,
const unsigned int version
);
// note: export has to be AFTER #includes for all archive classes
BOOST_CLASS_EXPORT_IMPLEMENT(polymorphic_derived2)