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
0005 #if defined(_MSC_VER)
0006 # pragma once
0007 #endif
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
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 }
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
0091
0092 ~text_iarchive_impl() BOOST_OVERRIDE {}
0093 };
0094
0095 }
0096 }
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
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 }
0126 }
0127
0128
0129 BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::text_iarchive)
0130
0131 #ifdef BOOST_MSVC
0132 #pragma warning(pop)
0133 #endif
0134
0135 #endif