1 #ifndef BOOST_ARCHIVE_DETAIL_BASIC_IARCHIVE_HPP
2 #define BOOST_ARCHIVE_DETAIL_BASIC_IARCHIVE_HPP
4 // MS compatible compilers support #pragma once
9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
10 // basic_iarchive.hpp:
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)
17 // See http://www.boost.org for updates, documentation, and revision history.
19 // can't use this - much as I'd like to as borland doesn't support it
21 #include <boost/config.hpp>
22 #include <boost/noncopyable.hpp>
23 #include <boost/scoped_ptr.hpp>
25 #include <boost/serialization/tracking_enum.hpp>
26 #include <boost/archive/basic_archive.hpp>
27 #include <boost/archive/detail/decl.hpp>
28 #include <boost/archive/detail/helper_collection.hpp>
29 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
32 namespace serialization {
33 class extended_type_info;
34 } // namespace serialization
39 class basic_iarchive_impl;
40 class basic_iserializer;
41 class basic_pointer_iserializer;
43 //////////////////////////////////////////////////////////////////////
44 // class basic_iarchive - read serialized objects from a input stream
45 class BOOST_SYMBOL_VISIBLE basic_iarchive :
46 private boost::noncopyable,
47 public boost::archive::detail::helper_collection
49 friend class basic_iarchive_impl;
50 // hide implementation of this class to minimize header conclusion
51 boost::scoped_ptr<basic_iarchive_impl> pimpl;
53 virtual void vload(version_type &t) = 0;
54 virtual void vload(object_id_type &t) = 0;
55 virtual void vload(class_id_type &t) = 0;
56 virtual void vload(class_id_optional_type &t) = 0;
57 virtual void vload(class_name_type &t) = 0;
58 virtual void vload(tracking_type &t) = 0;
60 BOOST_ARCHIVE_DECL basic_iarchive(unsigned int flags);
61 boost::archive::detail::helper_collection &
62 get_helper_collection(){
66 // some msvc versions require that the following function be public
67 // otherwise it should really protected.
68 virtual BOOST_ARCHIVE_DECL ~basic_iarchive();
69 // note: NOT part of the public API.
70 BOOST_ARCHIVE_DECL void next_object_pointer(void *t);
71 BOOST_ARCHIVE_DECL void register_basic_serializer(
72 const basic_iserializer & bis
74 BOOST_ARCHIVE_DECL void load_object(
76 const basic_iserializer & bis
78 BOOST_ARCHIVE_DECL const basic_pointer_iserializer *
81 const basic_pointer_iserializer * bpis_ptr,
82 const basic_pointer_iserializer * (*finder)(
83 const boost::serialization::extended_type_info & eti
86 // real public API starts here
87 BOOST_ARCHIVE_DECL void
88 set_library_version(library_version_type archive_library_version);
89 BOOST_ARCHIVE_DECL library_version_type
90 get_library_version() const;
91 BOOST_ARCHIVE_DECL unsigned int
93 BOOST_ARCHIVE_DECL void
94 reset_object_address(const void * new_address, const void * old_address);
95 BOOST_ARCHIVE_DECL void
96 delete_created_pointers();
100 } // namespace archive
103 #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
105 #endif //BOOST_ARCHIVE_DETAIL_BASIC_IARCHIVE_HPP