1 | /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 |
---|---|
2 | // dll_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 | // Build a dll which contains the serialization for a class A |
10 | // used in testing distribution of serialization code in DLLS |
11 | |
12 | #include <boost/config.hpp> |
13 | |
14 | #include <boost/serialization/nvp.hpp> |
15 | |
16 | #define DERIVED2_EXPORT |
17 | #include "derived2.hpp" |
18 | |
19 | template<class Archive> |
20 | void derived2::serialize( |
21 | Archive &ar, |
22 | const unsigned int /* file_version */ |
23 | ){ |
24 | ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(base); |
25 | } |
26 | |
27 | // instantiate code for text archives |
28 | #include <boost/archive/text_oarchive.hpp> |
29 | #include <boost/archive/text_iarchive.hpp> |
30 | |
31 | template BOOST_SYMBOL_EXPORT void derived2::serialize( |
32 | boost::archive::text_oarchive & ar, |
33 | const unsigned int version |
34 | ); |
35 | template BOOST_SYMBOL_EXPORT void derived2::serialize( |
36 | boost::archive::text_iarchive & ar, |
37 | const unsigned int version |
38 | ); |
39 | |
40 | #include <boost/archive/polymorphic_oarchive.hpp> |
41 | #include <boost/archive/polymorphic_iarchive.hpp> |
42 | |
43 | template BOOST_SYMBOL_EXPORT void derived2::serialize( |
44 | boost::archive::polymorphic_oarchive & ar, |
45 | const unsigned int version |
46 | ); |
47 | template BOOST_SYMBOL_EXPORT void derived2::serialize( |
48 | boost::archive::polymorphic_iarchive & ar, |
49 | const unsigned int version |
50 | ); |
51 | |
52 | // note: export has to be AFTER #includes for all archive classes |
53 | |
54 | #include <boost/serialization/factory.hpp> |
55 | BOOST_SERIALIZATION_FACTORY_0(derived2) |
56 | BOOST_CLASS_EXPORT(derived2) |
57 |