comparison DEPENDENCIES/generic/include/boost/archive/binary_iarchive.hpp @ 101:c530137014c0

Update Boost headers (1.58.0)
author Chris Cannam
date Mon, 07 Sep 2015 11:12:49 +0100
parents 2665513ce2d3
children
comparison
equal deleted inserted replaced
100:793467b5e61c 101:c530137014c0
1 #ifndef BOOST_ARCHIVE_BINARY_IARCHIVE_HPP 1 #ifndef BOOST_ARCHIVE_BINARY_IARCHIVE_HPP
2 #define BOOST_ARCHIVE_BINARY_IARCHIVE_HPP 2 #define BOOST_ARCHIVE_BINARY_IARCHIVE_HPP
3 3
4 // MS compatible compilers support #pragma once 4 // MS compatible compilers support #pragma once
5 #if defined(_MSC_VER) && (_MSC_VER >= 1020) 5 #if defined(_MSC_VER)
6 # pragma once 6 # pragma once
7 #endif 7 #endif
8 8
9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
10 // binary_iarchive.hpp 10 // binary_iarchive.hpp
23 #ifdef BOOST_MSVC 23 #ifdef BOOST_MSVC
24 # pragma warning(push) 24 # pragma warning(push)
25 # pragma warning(disable : 4511 4512) 25 # pragma warning(disable : 4511 4512)
26 #endif 26 #endif
27 27
28 namespace boost { 28 namespace boost {
29 namespace archive {
30
31 // do not derive from the classes below. If you want to extend this functionality
32 // via inhertance, derived from text_iarchive_impl instead. This will
33 // preserve correct static polymorphism.
34
35 // same as binary_iarchive below - without the shared_ptr_helper
36 class naked_binary_iarchive :
37 public binary_iarchive_impl<
38 boost::archive::naked_binary_iarchive,
39 std::istream::char_type,
40 std::istream::traits_type
41 >
42 {
43 public:
44 naked_binary_iarchive(std::istream & is, unsigned int flags = 0) :
45 binary_iarchive_impl<
46 naked_binary_iarchive, std::istream::char_type, std::istream::traits_type
47 >(is, flags)
48 {}
49 naked_binary_iarchive(std::streambuf & bsb, unsigned int flags = 0) :
50 binary_iarchive_impl<
51 naked_binary_iarchive, std::istream::char_type, std::istream::traits_type
52 >(bsb, flags)
53 {}
54 };
55
56 } // namespace archive
57 } // namespace boost
58
59 // note special treatment of shared_ptr. This type needs a special
60 // structure associated with every archive. We created a "mix-in"
61 // class to provide this functionality. Since shared_ptr holds a
62 // special esteem in the boost library - we included it here by default.
63 #include <boost/archive/shared_ptr_helper.hpp>
64
65 namespace boost {
66 namespace archive { 29 namespace archive {
67 30
68 // do not derive from this class. If you want to extend this functionality 31 // do not derive from this class. If you want to extend this functionality
69 // via inhertance, derived from binary_iarchive_impl instead. This will 32 // via inhertance, derived from binary_iarchive_impl instead. This will
70 // preserve correct static polymorphism. 33 // preserve correct static polymorphism.
71 class binary_iarchive : 34 class binary_iarchive :
72 public binary_iarchive_impl< 35 public binary_iarchive_impl<
73 boost::archive::binary_iarchive, 36 boost::archive::binary_iarchive,
74 std::istream::char_type, 37 std::istream::char_type,
75 std::istream::traits_type 38 std::istream::traits_type
76 >, 39 >{
77 public detail::shared_ptr_helper
78 {
79 public: 40 public:
80 binary_iarchive(std::istream & is, unsigned int flags = 0) : 41 binary_iarchive(std::istream & is, unsigned int flags = 0) :
81 binary_iarchive_impl< 42 binary_iarchive_impl<
82 binary_iarchive, std::istream::char_type, std::istream::traits_type 43 binary_iarchive, std::istream::char_type, std::istream::traits_type
83 >(is, flags) 44 >(is, flags)