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 )
25 #include <boost/serialization/string.hpp>
26 #include <boost/serialization/item_version_type.hpp>
27 #include <boost/archive/archive_exception.hpp>
28 #include <boost/archive/basic_binary_iprimitive.hpp>
29 #include <boost/archive/detail/common_iarchive.hpp>
30 #include <boost/archive/shared_ptr_helper.hpp>
31 #include <boost/archive/detail/register_archive.hpp>
33 #include "portable_binary_archive.hpp"
39 public boost::archive::archive_exception
43 incompatible_integer_size
46 boost::archive::archive_exception(boost::archive::archive_exception::other_exception)
48 virtual const char *what( )
const throw( )
50 const char *msg =
"programmer error";
52 case incompatible_integer_size:
53 msg =
"integer cannot be represented";
56 msg = boost::archive::archive_exception::what();
69 public boost::archive::basic_binary_iprimitive<
70 portable_binary_iarchive,
71 std::istream::char_type,
72 std::istream::traits_type
74 public boost::archive::detail::common_iarchive<
75 portable_binary_iarchive
78 public boost::archive::detail::shared_ptr_helper
80 typedef boost::archive::basic_binary_iprimitive<
82 std::istream::char_type,
83 std::istream::traits_type
85 typedef boost::archive::detail::common_iarchive<
86 portable_binary_iarchive
88 #ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
91 friend archive_base_t;
92 friend primitive_base_t;
93 friend class boost::archive::detail::interface_iarchive<
94 portable_binary_iarchive
96 friend class boost::archive::load_access;
100 void load_impl(boost::intmax_t & l,
char maxsize);
106 load_impl(l,
sizeof(T));
111 void load(boost::serialization::item_version_type & t){
113 load_impl(l,
sizeof(boost::serialization::item_version_type));
115 t = boost::serialization::item_version_type(l);
117 void load(boost::archive::version_type & t){
119 load_impl(l,
sizeof(boost::archive::version_type));
121 t = boost::archive::version_type(l);
123 void load(boost::archive::class_id_type & t){
125 load_impl(l,
sizeof(boost::archive::class_id_type));
127 t = boost::archive::class_id_type(static_cast<int>(l));
129 void load(std::string & t){
130 this->primitive_base_t::load(t);
132 #ifndef BOOST_NO_STD_WSTRING
133 void load(std::wstring & t){
134 this->primitive_base_t::load(t);
137 void load(
float & t){
138 this->primitive_base_t::load(t);
142 void load(
double & t){
143 this->primitive_base_t::load(t);
148 this->primitive_base_t::load(t);
150 void load(
unsigned char & t){
151 this->primitive_base_t::load(t);
156 typedef boost::archive::detail::common_iarchive<portable_binary_iarchive>
157 detail_common_iarchive;
159 void load_override(T & t, BOOST_PFTO
int){
160 this->detail_common_iarchive::load_override(t, 0);
162 void load_override(boost::archive::class_name_type & t,
int);
165 boost::archive::class_id_optional_type & ,
169 void init(
unsigned int flags);
171 portable_binary_iarchive(std::istream & is,
unsigned flags = 0) :
174 0 != (flags & boost::archive::no_codecvt)
176 archive_base_t(flags),
182 portable_binary_iarchive(
183 std::basic_streambuf<
184 std::istream::char_type,
185 std::istream::traits_type
191 0 != (flags & boost::archive::no_codecvt)
193 archive_base_t(flags),
201 #ifdef BOOST_SERIALIZATION_REGISTER_ARCHIVE
206 #define BOOST_ARCHIVE_CUSTOM_IARCHIVE_TYPES portable_binary_iarchive
208 #if defined(_MSC_VER)
209 #pragma warning( pop )
212 #endif // PORTABLE_BINARY_IARCHIVE_HPP
Definition: portable_binary_iarchive.hpp:38
Definition: portable_binary_iarchive.hpp:68