Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:33:01

0001 #ifndef BOOST_ARCHIVE_BINARY_IARCHIVE_IMPL_HPP
0002 #define BOOST_ARCHIVE_BINARY_IARCHIVE_IMPL_HPP
0003 
0004 // MS compatible compilers support #pragma once
0005 #if defined(_MSC_VER)
0006 # pragma once
0007 #endif
0008 
0009 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
0010 // binary_iarchive_impl.hpp
0011 
0012 // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
0013 // Use, modification and distribution is subject to the Boost Software
0014 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0015 // http://www.boost.org/LICENSE_1_0.txt)
0016 
0017 //  See http://www.boost.org for updates, documentation, and revision history.
0018 
0019 #include <istream>
0020 #include <boost/archive/basic_binary_iprimitive.hpp>
0021 #include <boost/archive/basic_binary_iarchive.hpp>
0022 
0023 #ifdef BOOST_MSVC
0024 #  pragma warning(push)
0025 #  pragma warning(disable : 4511 4512)
0026 #endif
0027 
0028 namespace boost {
0029 namespace archive {
0030 
0031 namespace detail {
0032     template<class Archive> class interface_iarchive;
0033 } // namespace detail
0034 
0035 template<class Archive, class Elem, class Tr>
0036 class BOOST_SYMBOL_VISIBLE binary_iarchive_impl :
0037     public basic_binary_iprimitive<Archive, Elem, Tr>,
0038     public basic_binary_iarchive<Archive>
0039 {
0040 #ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
0041 public:
0042 #else
0043 protected:
0044     #if BOOST_WORKAROUND(BOOST_MSVC, < 1500)
0045         // for some inexplicable reason insertion of "class" generates compile erro
0046         // on msvc 7.1
0047         friend detail::interface_iarchive<Archive>;
0048         friend basic_binary_iarchive<Archive>;
0049         friend load_access;
0050     #else
0051         friend class detail::interface_iarchive<Archive>;
0052         friend class basic_binary_iarchive<Archive>;
0053         friend class load_access;
0054     #endif
0055 #endif
0056     template<class T>
0057     void load_override(T & t){
0058         this->basic_binary_iarchive<Archive>::load_override(t);
0059     }
0060     void init(unsigned int flags){
0061         if(0 != (flags & no_header)){
0062             return;
0063         }
0064         #if ! defined(__MWERKS__)
0065             this->basic_binary_iarchive<Archive>::init();
0066             this->basic_binary_iprimitive<Archive, Elem, Tr>::init();
0067         #else
0068             basic_binary_iarchive<Archive>::init();
0069             basic_binary_iprimitive<Archive, Elem, Tr>::init();
0070         #endif
0071     }
0072     binary_iarchive_impl(
0073         std::basic_streambuf<Elem, Tr> & bsb,
0074         unsigned int flags
0075     ) :
0076         basic_binary_iprimitive<Archive, Elem, Tr>(
0077             bsb,
0078             0 != (flags & no_codecvt)
0079         ),
0080         basic_binary_iarchive<Archive>(flags)
0081     {}
0082     binary_iarchive_impl(
0083         std::basic_istream<Elem, Tr> & is,
0084         unsigned int flags
0085     ) :
0086         basic_binary_iprimitive<Archive, Elem, Tr>(
0087             * is.rdbuf(),
0088             0 != (flags & no_codecvt)
0089         ),
0090         basic_binary_iarchive<Archive>(flags)
0091     {}
0092 };
0093 
0094 } // namespace archive
0095 } // namespace boost
0096 
0097 #ifdef BOOST_MSVC
0098 #pragma warning(pop)
0099 #endif
0100 
0101 #endif // BOOST_ARCHIVE_BINARY_IARCHIVE_IMPL_HPP