1 | /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 |
2 | // test_polymorphic_A.hpp |
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 | // class whose declaration is hidden by a pointer |
10 | // #include <boost/serialization/scoped_ptr.hpp> |
11 | |
12 | #include <boost/archive/polymorphic_oarchive.hpp> |
13 | #include <boost/archive/polymorphic_iarchive.hpp> |
14 | |
15 | class A; |
16 | |
17 | struct data { |
18 | // class a contains a pointer to a "hidden" declaration |
19 | // borland scoped_ptr doesn't work !!! |
20 | // boost::scoped_ptr<A> a; |
21 | A * a; |
22 | // template<class Archive> |
23 | // void serialize(Archive & ar, const unsigned int file_version); |
24 | void serialize(boost::archive::polymorphic_oarchive & ar, const unsigned int file_version); |
25 | void serialize(boost::archive::polymorphic_iarchive & ar, const unsigned int file_version); |
26 | data(); |
27 | ~data(); |
28 | bool operator==(const data & rhs) const; |
29 | }; |
30 | |
31 | |