]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | #ifndef POLYMORPHIC_DERIVED1_HPP |
2 | #define POLYMORPHIC_DERIVED1_HPP | |
3 | ||
4 | // MS compatible compilers support #pragma once | |
5 | #if defined(_MSC_VER) | |
6 | # pragma once | |
7 | #endif | |
8 | ||
9 | /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 | |
10 | // polymorphic_derived1.hpp simple class test | |
11 | ||
12 | // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . | |
13 | // Use, modification and distribution is subject to the Boost Software | |
14 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at | |
15 | // http://www.boost.org/LICENSE_1_0.txt) | |
16 | ||
17 | // See http://www.boost.org for updates, documentation, and revision history. | |
18 | ||
19 | #include <boost/serialization/access.hpp> | |
20 | #include <boost/serialization/nvp.hpp> | |
21 | #include <boost/serialization/base_object.hpp> | |
22 | #include <boost/serialization/type_info_implementation.hpp> | |
23 | #include <boost/serialization/extended_type_info_no_rtti.hpp> | |
24 | ||
25 | #include "polymorphic_base.hpp" | |
26 | ||
27 | class polymorphic_derived1 : public polymorphic_base | |
28 | { | |
29 | friend class boost::serialization::access; | |
30 | template<class Archive> | |
31 | void serialize(Archive &ar, const unsigned int /* file_version */){ | |
32 | ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(polymorphic_base); | |
33 | } | |
34 | public: | |
35 | virtual const char * get_key() const ; | |
36 | }; | |
37 | ||
38 | BOOST_CLASS_EXPORT_KEY(polymorphic_derived1) | |
39 | ||
40 | BOOST_CLASS_TYPE_INFO( | |
41 | polymorphic_derived1, | |
42 | extended_type_info_no_rtti<polymorphic_derived1> | |
43 | ) | |
44 | ||
45 | #endif // POLYMORPHIC_DERIVED1_HPP |