Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:28:30

0001 #ifndef BOOST_ARCHIVE_TEXT_IARCHIVE_HPP
0002 #define BOOST_ARCHIVE_TEXT_IARCHIVE_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 // text_iarchive.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 
0021 #include <boost/config.hpp>
0022 #include <boost/archive/detail/auto_link_archive.hpp>
0023 #include <boost/archive/basic_text_iprimitive.hpp>
0024 #include <boost/archive/basic_text_iarchive.hpp>
0025 #include <boost/archive/detail/register_archive.hpp>
0026 #include <boost/serialization/item_version_type.hpp>
0027 
0028 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
0029 
0030 #ifdef BOOST_MSVC
0031 #  pragma warning(push)
0032 #  pragma warning(disable : 4511 4512)
0033 #endif
0034 
0035 namespace boost {
0036 namespace archive {
0037 
0038 namespace detail {
0039     template<class Archive> class interface_iarchive;
0040 } // namespace detail
0041 
0042 template<class Archive>
0043 class BOOST_SYMBOL_VISIBLE text_iarchive_impl :
0044     public basic_text_iprimitive<std::istream>,
0045     public basic_text_iarchive<Archive>
0046 {
0047 #ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
0048 public:
0049 #else
0050 protected:
0051     friend class detail::interface_iarchive<Archive>;
0052     friend class load_access;
0053 #endif
0054     template<class T>
0055     void load(T & t){
0056         basic_text_iprimitive<std::istream>::load(t);
0057     }
0058     void load(version_type & t){
0059         unsigned int v;
0060         load(v);
0061         t = version_type(v);
0062     }
0063     void load(boost::serialization::item_version_type & t){
0064         unsigned int v;
0065         load(v);
0066         t = boost::serialization::item_version_type(v);
0067     }
0068     BOOST_ARCHIVE_DECL void
0069     load(char * t);
0070     #ifndef BOOST_NO_INTRINSIC_WCHAR_T
0071     BOOST_ARCHIVE_DECL void
0072     load(wchar_t * t);
0073     #endif
0074     BOOST_ARCHIVE_DECL void
0075     load(std::string &s);
0076     #ifndef BOOST_NO_STD_WSTRING
0077     BOOST_ARCHIVE_DECL void
0078     load(std::wstring &ws);
0079     #endif
0080     template<class T>
0081     void load_override(T & t){
0082         basic_text_iarchive<Archive>::load_override(t);
0083     }
0084     BOOST_ARCHIVE_DECL void
0085     load_override(class_name_type & t);
0086     BOOST_ARCHIVE_DECL void
0087     init();
0088     BOOST_ARCHIVE_DECL
0089     text_iarchive_impl(std::istream & is, unsigned int flags);
0090     // don't import inline definitions! leave this as a reminder.
0091     //BOOST_ARCHIVE_DECL
0092     ~text_iarchive_impl() BOOST_OVERRIDE {}
0093 };
0094 
0095 } // namespace archive
0096 } // namespace boost
0097 
0098 #ifdef BOOST_MSVC
0099 #pragma warning(pop)
0100 #endif
0101 
0102 #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
0103 
0104 #ifdef BOOST_MSVC
0105 #  pragma warning(push)
0106 #  pragma warning(disable : 4511 4512)
0107 #endif
0108 
0109 namespace boost {
0110 namespace archive {
0111 
0112 class BOOST_SYMBOL_VISIBLE text_iarchive :
0113     public text_iarchive_impl<text_iarchive>{
0114 public:
0115     text_iarchive(std::istream & is_, unsigned int flags = 0) :
0116         // note: added _ to suppress useless gcc warning
0117         text_iarchive_impl<text_iarchive>(is_, flags)
0118     {
0119         if(0 == (flags & no_header))
0120              init();
0121     }
0122     ~text_iarchive() BOOST_OVERRIDE {}
0123 };
0124 
0125 } // namespace archive
0126 } // namespace boost
0127 
0128 // required by export
0129 BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::text_iarchive)
0130 
0131 #ifdef BOOST_MSVC
0132 #pragma warning(pop)
0133 #endif
0134 
0135 #endif // BOOST_ARCHIVE_TEXT_IARCHIVE_HPP