williamr@2
|
1 |
#ifndef BOOST_ARCHIVE_ARCHIVE_POINTER_OSERIALIZER_POINTER_HPP
|
williamr@2
|
2 |
#define BOOST_ARCHIVE_ARCHIVE_POINTER_OSERIALIZER_POINTER_HPP
|
williamr@2
|
3 |
|
williamr@2
|
4 |
// MS compatible compilers support #pragma once
|
williamr@2
|
5 |
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
williamr@2
|
6 |
# pragma once
|
williamr@2
|
7 |
#endif
|
williamr@2
|
8 |
|
williamr@2
|
9 |
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
williamr@2
|
10 |
// archive_pointer_oserializer.hpp: extenstion of type_info required for
|
williamr@2
|
11 |
// serialization.
|
williamr@2
|
12 |
|
williamr@2
|
13 |
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
williamr@2
|
14 |
// Use, modification and distribution is subject to the Boost Software
|
williamr@2
|
15 |
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
williamr@2
|
16 |
// http://www.boost.org/LICENSE_1_0.txt)
|
williamr@2
|
17 |
|
williamr@2
|
18 |
// See http://www.boost.org for updates, documentation, and revision history.
|
williamr@2
|
19 |
|
williamr@2
|
20 |
#include <boost/config.hpp>
|
williamr@2
|
21 |
#include <boost/archive/detail/basic_serializer.hpp>
|
williamr@2
|
22 |
#include <boost/archive/detail/basic_pointer_oserializer.hpp>
|
williamr@2
|
23 |
|
williamr@2
|
24 |
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
|
williamr@2
|
25 |
|
williamr@2
|
26 |
namespace boost {
|
williamr@2
|
27 |
|
williamr@2
|
28 |
namespace serialization {
|
williamr@2
|
29 |
class extended_type_info;
|
williamr@2
|
30 |
} // namespace serialization
|
williamr@2
|
31 |
|
williamr@2
|
32 |
namespace archive {
|
williamr@2
|
33 |
namespace detail {
|
williamr@2
|
34 |
|
williamr@2
|
35 |
template<class Archive>
|
williamr@2
|
36 |
class archive_pointer_oserializer :
|
williamr@2
|
37 |
public basic_pointer_oserializer {
|
williamr@2
|
38 |
protected:
|
williamr@2
|
39 |
explicit BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
|
williamr@2
|
40 |
archive_pointer_oserializer(
|
williamr@2
|
41 |
const boost::serialization::extended_type_info & eti
|
williamr@2
|
42 |
);
|
williamr@2
|
43 |
BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
|
williamr@2
|
44 |
// account for bogus gcc warning
|
williamr@2
|
45 |
#if defined(__GNUC__)
|
williamr@2
|
46 |
virtual
|
williamr@2
|
47 |
#endif
|
williamr@2
|
48 |
~archive_pointer_oserializer();
|
williamr@2
|
49 |
public:
|
williamr@2
|
50 |
// return the type_extended save pointer corresponding to a give
|
williamr@2
|
51 |
// type_info. returns NULL, if there is no such instance. This
|
williamr@2
|
52 |
// would indicate that the no object of the specified type was saved
|
williamr@2
|
53 |
// any where in the code.
|
williamr@2
|
54 |
static
|
williamr@2
|
55 |
BOOST_ARCHIVE_OR_WARCHIVE_DECL(const basic_pointer_oserializer *)
|
williamr@2
|
56 |
find(
|
williamr@2
|
57 |
const boost::serialization::extended_type_info & eti
|
williamr@2
|
58 |
);
|
williamr@2
|
59 |
};
|
williamr@2
|
60 |
|
williamr@2
|
61 |
} // namespace detail
|
williamr@2
|
62 |
} // namespace archive
|
williamr@2
|
63 |
} // namespace boost
|
williamr@2
|
64 |
|
williamr@2
|
65 |
#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
|
williamr@2
|
66 |
|
williamr@2
|
67 |
#endif // BOOST_ARCHIVE_ARCHIVE_POINTER_OSERIALIZER_POINTER_HPP
|