Ugly, not-to-be-pushed sucking in of all of Boost to get windows to work.
[dyninst.git] / external / boost / archive / detail / basic_iarchive.hpp
1 #ifndef BOOST_ARCHIVE_DETAIL_BASIC_IARCHIVE_HPP
2 #define BOOST_ARCHIVE_DETAIL_BASIC_IARCHIVE_HPP
3
4 // MS compatible compilers support #pragma once
5 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
6 # pragma once
7 #endif
8
9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
10 // basic_iarchive.hpp:
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 // can't use this - much as I'd like to as borland doesn't support it
20 // #include <boost/scoped_ptr.hpp>
21
22 #include <boost/config.hpp>
23 #include <boost/archive/basic_archive.hpp>
24 #include <boost/serialization/tracking_enum.hpp>
25
26 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
27
28 namespace boost {
29 template<class T>
30 class shared_ptr;
31
32 namespace serialization {
33     class extended_type_info;
34 } // namespace serialization
35
36 namespace archive {
37 namespace detail {
38
39 class basic_iarchive_impl;
40 class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iserializer;
41 class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer;
42 //////////////////////////////////////////////////////////////////////
43 // class basic_iarchive - read serialized objects from a input stream
44 class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iarchive 
45 {
46     friend class basic_iarchive_impl;
47     // hide implementation of this class to minimize header conclusion
48     // in client code. I couldn't used scoped pointer with borland
49     // boost::scoped_ptr<basic_iarchive_impl> pimpl;
50     basic_iarchive_impl * pimpl;
51
52     virtual void vload(version_type &t) =  0;
53     virtual void vload(object_id_type &t) =  0;
54     virtual void vload(class_id_type &t) =  0;
55     virtual void vload(class_id_optional_type &t) = 0;
56     virtual void vload(class_name_type &t) = 0;
57     virtual void vload(tracking_type &t) = 0;
58 protected:
59     basic_iarchive(unsigned int flags);
60     // account for bogus gcc warning
61     #if defined(__GNUC__)
62     virtual
63     #endif
64     ~basic_iarchive();
65 public:
66     // note: NOT part of the public API.
67     void next_object_pointer(void *t);
68     void register_basic_serializer(const basic_iserializer & bis);
69     void
70     lookup_basic_helper(
71         const boost::serialization::extended_type_info * const eti,
72         shared_ptr<void> & sph
73     );
74     void 
75     insert_basic_helper(
76         const boost::serialization::extended_type_info * const eti,
77         shared_ptr<void> & sph
78     );
79     void load_object(
80         void *t, 
81         const basic_iserializer & bis
82     );
83     const basic_pointer_iserializer * 
84     load_pointer(
85         void * & t, 
86         const basic_pointer_iserializer * bpis_ptr,
87         const basic_pointer_iserializer * (*finder)(
88             const boost::serialization::extended_type_info & eti
89         )
90     );
91     // real public API starts here
92     void 
93     set_library_version(unsigned int archive_library_version);
94     unsigned int 
95     get_library_version() const;
96     unsigned int
97     get_flags() const;
98     void 
99     reset_object_address(const void * new_address, const void * old_address);
100     void 
101     delete_created_pointers();
102 };
103
104 } // namespace detail
105 } // namespace archive
106 } // namespace boost
107
108 // required by smart_cast for compilers not implementing 
109 // partial template specialization
110 BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(
111     boost::archive::detail::basic_iarchive
112 )
113
114 #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
115
116 #endif //BOOST_ARCHIVE_DETAIL_BASIC_IARCHIVE_HPP