Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef BOOST_ARCHIVE_BASIC_TEXT_IARCHIVE_HPP
0002 #define BOOST_ARCHIVE_BASIC_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 // basic_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 // archives stored as text - note these ar templated on the basic
0020 // stream templates to accommodate wide (and other?) kind of characters
0021 //
0022 // note the fact that on libraries without wide characters, ostream is
0023 // is not a specialization of basic_ostream which in fact is not defined
0024 // in such cases.   So we can't use basic_istream<IStream::char_type> but rather
0025 // use two template parameters
0026 
0027 #include <boost/config.hpp>
0028 #include <boost/detail/workaround.hpp>
0029 
0030 #include <boost/archive/detail/common_iarchive.hpp>
0031 
0032 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
0033 
0034 #ifdef BOOST_MSVC
0035 #  pragma warning(push)
0036 #  pragma warning(disable : 4511 4512)
0037 #endif
0038 
0039 namespace boost {
0040 namespace archive {
0041 
0042 namespace detail {
0043     template<class Archive> class interface_iarchive;
0044 } // namespace detail
0045 
0046 /////////////////////////////////////////////////////////////////////////
0047 // class basic_text_iarchive - read serialized objects from a input text stream
0048 template<class Archive>
0049 class BOOST_SYMBOL_VISIBLE basic_text_iarchive :
0050     public detail::common_iarchive<Archive>
0051 {
0052 #ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
0053 public:
0054 #else
0055 protected:
0056     #if BOOST_WORKAROUND(BOOST_MSVC, < 1500)
0057         // for some inexplicable reason insertion of "class" generates compile error
0058         // on msvc 7.1
0059         friend detail::interface_iarchive<Archive>;
0060     #else
0061         friend class detail::interface_iarchive<Archive>;
0062     #endif
0063 #endif
0064     // intermediate level to support override of operators
0065     // fot templates in the absence of partial function
0066     // template ordering
0067     typedef detail::common_iarchive<Archive> detail_common_iarchive;
0068     template<class T>
0069     void load_override(T & t){
0070         this->detail_common_iarchive::load_override(t);
0071     }
0072     // text file don't include the optional information
0073     void load_override(class_id_optional_type & /*t*/){}
0074 
0075     BOOST_ARCHIVE_OR_WARCHIVE_DECL void
0076     load_override(class_name_type & t);
0077 
0078     BOOST_ARCHIVE_OR_WARCHIVE_DECL void
0079     init();
0080 
0081     basic_text_iarchive(unsigned int flags) :
0082         detail::common_iarchive<Archive>(flags)
0083     {}
0084     ~basic_text_iarchive() BOOST_OVERRIDE {}
0085 };
0086 
0087 } // namespace archive
0088 } // namespace boost
0089 
0090 #ifdef BOOST_MSVC
0091 #pragma warning(pop)
0092 #endif
0093 
0094 #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
0095 
0096 #endif // BOOST_ARCHIVE_BASIC_TEXT_IARCHIVE_HPP