1 #ifndef BOOST_ARCHIVE_TEXT_WIARCHIVE_HPP
2 #define BOOST_ARCHIVE_TEXT_WIARCHIVE_HPP
4 // MS compatible compilers support #pragma once
9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
12 // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
13 // Use, modification and distribution is subject to the Boost Software
14 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
15 // http://www.boost.org/LICENSE_1_0.txt)
17 // See http://www.boost.org for updates, documentation, and revision history.
19 #include <boost/config.hpp>
20 #ifdef BOOST_NO_STD_WSTREAMBUF
21 #error "wide char i/o not supported on this platform"
26 #include <boost/archive/detail/auto_link_warchive.hpp>
27 #include <boost/archive/basic_text_iprimitive.hpp>
28 #include <boost/archive/basic_text_iarchive.hpp>
29 #include <boost/archive/detail/register_archive.hpp>
30 #include <boost/serialization/item_version_type.hpp>
32 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
35 # pragma warning(push)
36 # pragma warning(disable : 4511 4512)
43 template<class Archive> class interface_iarchive;
46 template<class Archive>
47 class BOOST_SYMBOL_VISIBLE text_wiarchive_impl :
48 public basic_text_iprimitive<std::wistream>,
49 public basic_text_iarchive<Archive>
51 #ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
55 #if BOOST_WORKAROUND(BOOST_MSVC, < 1500)
56 // for some inexplicable reason insertion of "class" generates compile erro
58 friend detail::interface_iarchive<Archive>;
61 friend class detail::interface_iarchive<Archive>;
62 friend class load_access;
67 basic_text_iprimitive<std::wistream>::load(t);
69 void load(version_type & t){
74 void load(boost::serialization::item_version_type & t){
77 t = boost::serialization::item_version_type(v);
79 BOOST_WARCHIVE_DECL void
81 #ifndef BOOST_NO_INTRINSIC_WCHAR_T
82 BOOST_WARCHIVE_DECL void
85 BOOST_WARCHIVE_DECL void
87 #ifndef BOOST_NO_STD_WSTRING
88 BOOST_WARCHIVE_DECL void
89 load(std::wstring &ws);
92 void load_override(T & t){
93 basic_text_iarchive<Archive>::load_override(t);
96 text_wiarchive_impl(std::wistream & is, unsigned int flags);
97 ~text_wiarchive_impl(){};
100 } // namespace archive
107 #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
110 # pragma warning(push)
111 # pragma warning(disable : 4511 4512)
117 class BOOST_SYMBOL_VISIBLE text_wiarchive :
118 public text_wiarchive_impl<text_wiarchive>{
120 text_wiarchive(std::wistream & is, unsigned int flags = 0) :
121 text_wiarchive_impl<text_wiarchive>(is, flags)
126 } // namespace archive
129 // required by export
130 BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::text_wiarchive)
136 #endif // BOOST_NO_STD_WSTREAMBUF
137 #endif // BOOST_ARCHIVE_TEXT_WIARCHIVE_HPP