]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/archive/xml_wiarchive.hpp
bump version to 18.2.2-pve1
[ceph.git] / ceph / src / boost / boost / archive / xml_wiarchive.hpp
CommitLineData
7c673cae
FG
1#ifndef BOOST_ARCHIVE_XML_WIARCHIVE_HPP
2#define BOOST_ARCHIVE_XML_WIARCHIVE_HPP
3
4// MS compatible compilers support #pragma once
5#if defined(_MSC_VER)
6# pragma once
7#endif
8
9/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
10// xml_wiarchive.hpp
11
f67539c2 12// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
7c673cae
FG
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)
16
17// See http://www.boost.org for updates, documentation, and revision history.
18
19#include <boost/config.hpp>
20#ifdef BOOST_NO_STD_WSTREAMBUF
21#error "wide char i/o not supported on this platform"
22#else
23
24#include <istream>
25
26#include <boost/smart_ptr/scoped_ptr.hpp>
27#include <boost/archive/detail/auto_link_warchive.hpp>
28#include <boost/archive/basic_text_iprimitive.hpp>
29#include <boost/archive/basic_xml_iarchive.hpp>
30#include <boost/archive/detail/register_archive.hpp>
31#include <boost/serialization/item_version_type.hpp>
7c673cae
FG
32
33#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
34
35#ifdef BOOST_MSVC
36# pragma warning(push)
37# pragma warning(disable : 4511 4512)
38#endif
39
40namespace boost {
41namespace archive {
42
43namespace detail {
44 template<class Archive> class interface_iarchive;
45} // namespace detail
46
47template<class CharType>
48class basic_xml_grammar;
49typedef basic_xml_grammar<wchar_t> xml_wgrammar;
50
51template<class Archive>
f67539c2 52class BOOST_SYMBOL_VISIBLE xml_wiarchive_impl :
7c673cae
FG
53 public basic_text_iprimitive<std::wistream>,
54 public basic_xml_iarchive<Archive>
55{
56#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
57public:
58#else
59protected:
60 friend class detail::interface_iarchive<Archive>;
61 friend class basic_xml_iarchive<Archive>;
62 friend class load_access;
63#endif
b32b8144 64 std::locale archive_locale;
7c673cae
FG
65 boost::scoped_ptr<xml_wgrammar> gimpl;
66 std::wistream & get_is(){
67 return is;
68 }
69 template<class T>
f67539c2 70 void
7c673cae
FG
71 load(T & t){
72 basic_text_iprimitive<std::wistream>::load(t);
73 }
f67539c2 74 void
7c673cae
FG
75 load(version_type & t){
76 unsigned int v;
77 load(v);
78 t = version_type(v);
79 }
f67539c2 80 void
7c673cae
FG
81 load(boost::serialization::item_version_type & t){
82 unsigned int v;
83 load(v);
84 t = boost::serialization::item_version_type(v);
85 }
86 BOOST_WARCHIVE_DECL void
87 load(char * t);
88 #ifndef BOOST_NO_INTRINSIC_WCHAR_T
89 BOOST_WARCHIVE_DECL void
90 load(wchar_t * t);
91 #endif
92 BOOST_WARCHIVE_DECL void
93 load(std::string &s);
94 #ifndef BOOST_NO_STD_WSTRING
95 BOOST_WARCHIVE_DECL void
96 load(std::wstring &ws);
97 #endif
98 template<class T>
99 void load_override(T & t){
100 basic_xml_iarchive<Archive>::load_override(t);
101 }
102 BOOST_WARCHIVE_DECL void
103 load_override(class_name_type & t);
f67539c2 104 BOOST_WARCHIVE_DECL void
7c673cae 105 init();
f67539c2 106 BOOST_WARCHIVE_DECL
20effc67 107 xml_wiarchive_impl(std::wistream & is, unsigned int flags);
f67539c2 108 BOOST_WARCHIVE_DECL
20effc67 109 ~xml_wiarchive_impl() BOOST_OVERRIDE;
7c673cae
FG
110};
111
112} // namespace archive
113} // namespace boost
114
115#ifdef BOOST_MSVC
f67539c2 116# pragma warning(pop)
7c673cae
FG
117#endif
118
119#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
120
121#ifdef BOOST_MSVC
122# pragma warning(push)
123# pragma warning(disable : 4511 4512)
124#endif
125
f67539c2 126namespace boost {
7c673cae
FG
127namespace archive {
128
129class BOOST_SYMBOL_VISIBLE xml_wiarchive :
130 public xml_wiarchive_impl<xml_wiarchive>{
131public:
132 xml_wiarchive(std::wistream & is, unsigned int flags = 0) :
133 xml_wiarchive_impl<xml_wiarchive>(is, flags)
f67539c2
TL
134 {
135 if(0 == (flags & no_header))
136 init();
137 }
20effc67 138 ~xml_wiarchive() BOOST_OVERRIDE {}
7c673cae
FG
139};
140
141} // namespace archive
142} // namespace boost
143
144// required by export
145BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::xml_wiarchive)
146
147#ifdef BOOST_MSVC
148#pragma warning(pop)
149#endif
150
151#endif // BOOST_NO_STD_WSTREAMBUF
152#endif // BOOST_ARCHIVE_XML_WIARCHIVE_HPP