1 #ifndef PORTABLE_BINARY_IARCHIVE_HPP
2 #define PORTABLE_BINARY_IARCHIVE_HPP
5 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
10 #pragma warning( push )
11 #pragma warning( disable : 4244 )
26 #include <boost/serialization/string.hpp>
27 #include <boost/serialization/item_version_type.hpp>
28 #include <boost/archive/archive_exception.hpp>
29 #include <boost/archive/basic_binary_iprimitive.hpp>
30 #include <boost/archive/detail/common_iarchive.hpp>
31 #include <boost/archive/shared_ptr_helper.hpp>
32 #include <boost/archive/detail/register_archive.hpp>
33 #include <boost/archive/detail/auto_link_archive.hpp>
41 public virtual boost::archive::archive_exception
45 incompatible_integer_size
50 virtual const char *what( )
const throw( )
52 const char *msg =
"programmer error";
54 case incompatible_integer_size:
55 msg =
"integer cannot be represented";
58 msg = boost::archive::archive_exception::what();
71 public boost::archive::basic_binary_iprimitive<
72 portable_binary_iarchive,
73 std::istream::char_type,
74 std::istream::traits_type
76 public boost::archive::detail::common_iarchive<
77 portable_binary_iarchive
80 public boost::archive::detail::shared_ptr_helper
82 typedef boost::archive::basic_binary_iprimitive<
84 std::istream::char_type,
85 std::istream::traits_type
87 typedef boost::archive::detail::common_iarchive<
90 #ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
95 friend class boost::archive::detail::interface_iarchive<
98 friend class boost::archive::load_access;
102 void load_impl(boost::intmax_t & l,
char maxsize);
108 load_impl(l,
sizeof(
T));
113 void load(boost::serialization::item_version_type & t){
115 load_impl(l,
sizeof(boost::serialization::item_version_type));
117 t = boost::serialization::item_version_type(l);
119 void load(boost::archive::version_type & t){
121 load_impl(l,
sizeof(boost::archive::version_type));
123 t = boost::archive::version_type(l);
125 void load(boost::archive::class_id_type & t){
127 load_impl(l,
sizeof(boost::archive::class_id_type));
129 t = boost::archive::class_id_type(static_cast<int>(l));
132 this->primitive_base_t::load(t);
134 #ifndef BOOST_NO_STD_WSTRING
136 this->primitive_base_t::load(t);
140 this->primitive_base_t::load(t);
145 this->primitive_base_t::load(t);
150 this->primitive_base_t::load(t);
153 this->primitive_base_t::load(t);
158 typedef boost::archive::detail::common_iarchive<portable_binary_iarchive>
162 this->detail_common_iarchive::load_override(t, 0);
164 void load_override(boost::archive::class_name_type & t,
int);
167 boost::archive::class_id_optional_type & ,
171 void init(
unsigned int flags);
176 0 != (flags & boost::archive::no_codecvt)
185 std::basic_streambuf<
186 std::istream::char_type,
187 std::istream::traits_type
193 0 != (flags & boost::archive::no_codecvt)
203 #ifdef BOOST_SERIALIZATION_REGISTER_ARCHIVE
208 #define BOOST_ARCHIVE_CUSTOM_IARCHIVE_TYPES portable_binary_iarchive
210 #if defined(_MSC_VER)
211 #pragma warning( pop )
214 #endif // PORTABLE_BINARY_IARCHIVE_HPP