Statistics
| Revision:

root / tmp / org.txm.statsengine.r.core.win32 / res / win32 / library / BH / include / boost / archive / detail / basic_iserializer.hpp @ 2486

History | View | Annotate | Download (2.6 kB)

1 2486 sjacqu01
#ifndef BOOST_ARCHIVE_DETAIL_BASIC_ISERIALIZER_HPP
2 2486 sjacqu01
#define BOOST_ARCHIVE_DETAIL_BASIC_ISERIALIZER_HPP
3 2486 sjacqu01
4 2486 sjacqu01
// MS compatible compilers support #pragma once
5 2486 sjacqu01
#if defined(_MSC_VER)
6 2486 sjacqu01
# pragma once
7 2486 sjacqu01
#endif
8 2486 sjacqu01
9 2486 sjacqu01
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
10 2486 sjacqu01
// basic_iserializer.hpp: extenstion of type_info required for serialization.
11 2486 sjacqu01
12 2486 sjacqu01
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
13 2486 sjacqu01
// Use, modification and distribution is subject to the Boost Software
14 2486 sjacqu01
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
15 2486 sjacqu01
// http://www.boost.org/LICENSE_1_0.txt)
16 2486 sjacqu01
17 2486 sjacqu01
//  See http://www.boost.org for updates, documentation, and revision history.
18 2486 sjacqu01
19 2486 sjacqu01
#include <cstdlib> // NULL
20 2486 sjacqu01
#include <boost/config.hpp>
21 2486 sjacqu01
22 2486 sjacqu01
#include <boost/archive/basic_archive.hpp>
23 2486 sjacqu01
#include <boost/archive/detail/decl.hpp>
24 2486 sjacqu01
#include <boost/archive/detail/basic_serializer.hpp>
25 2486 sjacqu01
#include <boost/archive/detail/auto_link_archive.hpp>
26 2486 sjacqu01
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
27 2486 sjacqu01
28 2486 sjacqu01
#ifdef BOOST_MSVC
29 2486 sjacqu01
#  pragma warning(push)
30 2486 sjacqu01
#  pragma warning(disable : 4511 4512)
31 2486 sjacqu01
#endif
32 2486 sjacqu01
33 2486 sjacqu01
namespace boost {
34 2486 sjacqu01
namespace serialization {
35 2486 sjacqu01
    class extended_type_info;
36 2486 sjacqu01
} // namespace serialization
37 2486 sjacqu01
38 2486 sjacqu01
// forward declarations
39 2486 sjacqu01
namespace archive {
40 2486 sjacqu01
namespace detail {
41 2486 sjacqu01
42 2486 sjacqu01
class basic_iarchive;
43 2486 sjacqu01
class basic_pointer_iserializer;
44 2486 sjacqu01
45 2486 sjacqu01
class BOOST_SYMBOL_VISIBLE basic_iserializer :
46 2486 sjacqu01
    public basic_serializer
47 2486 sjacqu01
{
48 2486 sjacqu01
private:
49 2486 sjacqu01
    basic_pointer_iserializer *m_bpis;
50 2486 sjacqu01
protected:
51 2486 sjacqu01
    explicit BOOST_ARCHIVE_DECL basic_iserializer(
52 2486 sjacqu01
        const boost::serialization::extended_type_info & type
53 2486 sjacqu01
    );
54 2486 sjacqu01
    virtual BOOST_ARCHIVE_DECL ~basic_iserializer();
55 2486 sjacqu01
public:
56 2486 sjacqu01
    bool serialized_as_pointer() const {
57 2486 sjacqu01
        return m_bpis != NULL;
58 2486 sjacqu01
    }
59 2486 sjacqu01
    void set_bpis(basic_pointer_iserializer *bpis){
60 2486 sjacqu01
        m_bpis = bpis;
61 2486 sjacqu01
    }
62 2486 sjacqu01
    const basic_pointer_iserializer * get_bpis_ptr() const {
63 2486 sjacqu01
        return m_bpis;
64 2486 sjacqu01
    }
65 2486 sjacqu01
    virtual void load_object_data(
66 2486 sjacqu01
        basic_iarchive & ar,
67 2486 sjacqu01
        void *x,
68 2486 sjacqu01
        const unsigned int file_version
69 2486 sjacqu01
    ) const = 0;
70 2486 sjacqu01
    // returns true if class_info should be saved
71 2486 sjacqu01
    virtual bool class_info() const = 0 ;
72 2486 sjacqu01
    // returns true if objects should be tracked
73 2486 sjacqu01
    virtual bool tracking(const unsigned int) const = 0 ;
74 2486 sjacqu01
    // returns class version
75 2486 sjacqu01
    virtual version_type version() const = 0 ;
76 2486 sjacqu01
    // returns true if this class is polymorphic
77 2486 sjacqu01
    virtual bool is_polymorphic() const = 0;
78 2486 sjacqu01
    virtual void destroy(/*const*/ void *address) const = 0 ;
79 2486 sjacqu01
};
80 2486 sjacqu01
81 2486 sjacqu01
} // namespae detail
82 2486 sjacqu01
} // namespace archive
83 2486 sjacqu01
} // namespace boost
84 2486 sjacqu01
85 2486 sjacqu01
#ifdef BOOST_MSVC
86 2486 sjacqu01
#pragma warning(pop)
87 2486 sjacqu01
#endif
88 2486 sjacqu01
89 2486 sjacqu01
#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
90 2486 sjacqu01
91 2486 sjacqu01
#endif // BOOST_ARCHIVE_DETAIL_BASIC_ISERIALIZER_HPP