]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/serialization/test/polymorphic_base.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / serialization / test / polymorphic_base.hpp
1 #ifndef POLYMORPHIC_BASE_HPP
2 #define POLYMORPHIC_BASE_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_base.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/config.hpp>
20
21 #include <boost/serialization/access.hpp>
22 #include <boost/serialization/assume_abstract.hpp>
23 #include <boost/serialization/export.hpp>
24 #include <boost/serialization/type_info_implementation.hpp>
25 #include <boost/serialization/extended_type_info_no_rtti.hpp>
26
27 #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SERIALIZATION_DYN_LINK)
28 #if defined(POLYMORPHIC_BASE_IMPORT)
29 #define POLYMORPHIC_BASE_DLL_DECL BOOST_SYMBOL_IMPORT
30 #pragma message ("polymorphic_base imported")
31 #elif defined(POLYMORPHIC_BASE_EXPORT)
32 #define POLYMORPHIC_BASE_DLL_DECL BOOST_SYMBOL_EXPORT
33 #pragma message ("polymorphic_base exported")
34 #endif
35 #endif
36
37 #ifndef POLYMORPHIC_BASE_DLL_DECL
38 #define POLYMORPHIC_BASE_DLL_DECL
39 #endif
40
41 class POLYMORPHIC_BASE_DLL_DECL polymorphic_base
42 {
43 friend class boost::serialization::access;
44 template<class Archive>
45 void serialize(
46 Archive & /* ar */,
47 const unsigned int /* file_version */
48 ){}
49 public:
50 // note that since this class uses the "no_rtti"
51 // extended_type_info implementation, it MUST
52 // implement this function
53 virtual const char * get_key() const = 0;
54 virtual ~polymorphic_base(){};
55 };
56
57 BOOST_SERIALIZATION_ASSUME_ABSTRACT(polymorphic_base)
58
59 // the no_rtti system requires this !!!
60 BOOST_CLASS_EXPORT_KEY(polymorphic_base)
61
62
63 BOOST_CLASS_TYPE_INFO(
64 polymorphic_base,
65 extended_type_info_no_rtti<polymorphic_base>
66 )
67
68 #endif // POLYMORPHIC_BASE_HPP