]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 |
2 | // dll_base.cpp | |
3 | ||
f67539c2 | 4 | // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . |
7c673cae FG |
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 | #include <boost/serialization/export.hpp> | |
12 | ||
13 | #define BASE_EXPORT | |
14 | #include "base.hpp" | |
15 | ||
16 | template<class Archive> | |
17 | void base::serialize( | |
18 | Archive &ar, | |
19 | const unsigned int /* file_version */){ | |
20 | } | |
21 | ||
22 | // for some reason this is required at least by MSVC | |
f67539c2 | 23 | // given that its declared virtual .. = 0; This |
7c673cae FG |
24 | // seems wrong to me but here it is. |
25 | //polymorphic_base::~polymorphic_base(){} | |
26 | ||
27 | // instantiate code for text archives | |
28 | #include <boost/archive/text_oarchive.hpp> | |
29 | #include <boost/archive/text_iarchive.hpp> | |
30 | ||
31 | // instantiate code for polymorphic archives | |
32 | #include <boost/archive/polymorphic_oarchive.hpp> | |
33 | #include <boost/archive/polymorphic_iarchive.hpp> | |
34 | ||
35 | // note: BOOST_CLASS_EXPORT cannot be used to instantiate | |
36 | // serialization code for an abstract base class. So use | |
37 | // explicit instantiation in this case. | |
38 | //BOOST_CLASS_EXPORT(polymorphic_base) | |
39 | ||
40 | template BOOST_SYMBOL_EXPORT void base::serialize( | |
41 | boost::archive::text_oarchive & ar, | |
42 | const unsigned int version | |
43 | ); | |
44 | template BOOST_SYMBOL_EXPORT void base::serialize( | |
45 | boost::archive::text_iarchive & ar, | |
46 | const unsigned int version | |
47 | ); | |
48 | template BOOST_SYMBOL_EXPORT void base::serialize( | |
49 | boost::archive::polymorphic_oarchive & ar, | |
50 | const unsigned int version | |
51 | ); | |
52 | template BOOST_SYMBOL_EXPORT void base::serialize( | |
53 | boost::archive::polymorphic_iarchive & ar, | |
54 | const unsigned int version | |
55 | ); |