Statistics
| Revision:

root / tmp / org.txm.statsengine.r.core.win32 / res / win32 / library / BH / include / boost / archive / xml_wiarchive.hpp @ 2486

History | View | Annotate | Download (4.3 kB)

1 2486 sjacqu01
#ifndef BOOST_ARCHIVE_XML_WIARCHIVE_HPP
2 2486 sjacqu01
#define BOOST_ARCHIVE_XML_WIARCHIVE_HPP
3 2486 sjacqu01
4 2486 sjacqu01
// MS compatible compilers support #pragma once
5 2486 sjacqu01
#if defined(_MSC_VER)
6 2486 sjacqu01
# pragma once
7 2486 sjacqu01
#endif
8 2486 sjacqu01
9 2486 sjacqu01
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
10 2486 sjacqu01
// xml_wiarchive.hpp
11 2486 sjacqu01
12 2486 sjacqu01
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
13 2486 sjacqu01
// Use, modification and distribution is subject to the Boost Software
14 2486 sjacqu01
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
15 2486 sjacqu01
// http://www.boost.org/LICENSE_1_0.txt)
16 2486 sjacqu01
17 2486 sjacqu01
//  See http://www.boost.org for updates, documentation, and revision history.
18 2486 sjacqu01
19 2486 sjacqu01
#include <boost/config.hpp>
20 2486 sjacqu01
#ifdef BOOST_NO_STD_WSTREAMBUF
21 2486 sjacqu01
#error "wide char i/o not supported on this platform"
22 2486 sjacqu01
#else
23 2486 sjacqu01
24 2486 sjacqu01
#include <istream>
25 2486 sjacqu01
26 2486 sjacqu01
#include <boost/smart_ptr/scoped_ptr.hpp>
27 2486 sjacqu01
#include <boost/archive/detail/auto_link_warchive.hpp>
28 2486 sjacqu01
#include <boost/archive/basic_text_iprimitive.hpp>
29 2486 sjacqu01
#include <boost/archive/basic_xml_iarchive.hpp>
30 2486 sjacqu01
#include <boost/archive/detail/register_archive.hpp>
31 2486 sjacqu01
#include <boost/serialization/item_version_type.hpp>
32 2486 sjacqu01
33 2486 sjacqu01
#ifdef BOOST_NO_CXX11_HDR_CODECVT
34 2486 sjacqu01
    #include <boost/archive/detail/utf8_codecvt_facet.hpp>
35 2486 sjacqu01
#else
36 2486 sjacqu01
    #include <codecvt>
37 2486 sjacqu01
    namespace boost { namespace archive { namespace detail {
38 2486 sjacqu01
        typedef std::codecvt_utf8<wchar_t> utf8_codecvt_facet;
39 2486 sjacqu01
    } } }
40 2486 sjacqu01
#endif
41 2486 sjacqu01
42 2486 sjacqu01
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
43 2486 sjacqu01
44 2486 sjacqu01
#ifdef BOOST_MSVC
45 2486 sjacqu01
#  pragma warning(push)
46 2486 sjacqu01
#  pragma warning(disable : 4511 4512)
47 2486 sjacqu01
#endif
48 2486 sjacqu01
49 2486 sjacqu01
namespace boost {
50 2486 sjacqu01
namespace archive {
51 2486 sjacqu01
52 2486 sjacqu01
namespace detail {
53 2486 sjacqu01
    template<class Archive> class interface_iarchive;
54 2486 sjacqu01
} // namespace detail
55 2486 sjacqu01
56 2486 sjacqu01
template<class CharType>
57 2486 sjacqu01
class basic_xml_grammar;
58 2486 sjacqu01
typedef basic_xml_grammar<wchar_t> xml_wgrammar;
59 2486 sjacqu01
60 2486 sjacqu01
template<class Archive>
61 2486 sjacqu01
class BOOST_SYMBOL_VISIBLE xml_wiarchive_impl :
62 2486 sjacqu01
    public basic_text_iprimitive<std::wistream>,
63 2486 sjacqu01
    public basic_xml_iarchive<Archive>
64 2486 sjacqu01
{
65 2486 sjacqu01
#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
66 2486 sjacqu01
public:
67 2486 sjacqu01
#else
68 2486 sjacqu01
protected:
69 2486 sjacqu01
    #if BOOST_WORKAROUND(BOOST_MSVC, < 1500)
70 2486 sjacqu01
        // for some inexplicable reason insertion of "class" generates compile erro
71 2486 sjacqu01
        // on msvc 7.1
72 2486 sjacqu01
        friend detail::interface_iarchive<Archive>;
73 2486 sjacqu01
        friend basic_xml_iarchive<Archive>;
74 2486 sjacqu01
        friend load_access;
75 2486 sjacqu01
    #else
76 2486 sjacqu01
        friend class detail::interface_iarchive<Archive>;
77 2486 sjacqu01
        friend class basic_xml_iarchive<Archive>;
78 2486 sjacqu01
        friend class load_access;
79 2486 sjacqu01
    #endif
80 2486 sjacqu01
#endif
81 2486 sjacqu01
    boost::scoped_ptr<xml_wgrammar> gimpl;
82 2486 sjacqu01
    std::wistream & get_is(){
83 2486 sjacqu01
        return is;
84 2486 sjacqu01
    }
85 2486 sjacqu01
    template<class T>
86 2486 sjacqu01
    void
87 2486 sjacqu01
    load(T & t){
88 2486 sjacqu01
        basic_text_iprimitive<std::wistream>::load(t);
89 2486 sjacqu01
    }
90 2486 sjacqu01
    void
91 2486 sjacqu01
    load(version_type & t){
92 2486 sjacqu01
        unsigned int v;
93 2486 sjacqu01
        load(v);
94 2486 sjacqu01
        t = version_type(v);
95 2486 sjacqu01
    }
96 2486 sjacqu01
    void
97 2486 sjacqu01
    load(boost::serialization::item_version_type & t){
98 2486 sjacqu01
        unsigned int v;
99 2486 sjacqu01
        load(v);
100 2486 sjacqu01
        t = boost::serialization::item_version_type(v);
101 2486 sjacqu01
    }
102 2486 sjacqu01
    BOOST_WARCHIVE_DECL void
103 2486 sjacqu01
    load(char * t);
104 2486 sjacqu01
    #ifndef BOOST_NO_INTRINSIC_WCHAR_T
105 2486 sjacqu01
    BOOST_WARCHIVE_DECL void
106 2486 sjacqu01
    load(wchar_t * t);
107 2486 sjacqu01
    #endif
108 2486 sjacqu01
    BOOST_WARCHIVE_DECL void
109 2486 sjacqu01
    load(std::string &s);
110 2486 sjacqu01
    #ifndef BOOST_NO_STD_WSTRING
111 2486 sjacqu01
    BOOST_WARCHIVE_DECL void
112 2486 sjacqu01
    load(std::wstring &ws);
113 2486 sjacqu01
    #endif
114 2486 sjacqu01
    template<class T>
115 2486 sjacqu01
    void load_override(T & t){
116 2486 sjacqu01
        basic_xml_iarchive<Archive>::load_override(t);
117 2486 sjacqu01
    }
118 2486 sjacqu01
    BOOST_WARCHIVE_DECL void
119 2486 sjacqu01
    load_override(class_name_type & t);
120 2486 sjacqu01
    BOOST_WARCHIVE_DECL void
121 2486 sjacqu01
    init();
122 2486 sjacqu01
    BOOST_WARCHIVE_DECL
123 2486 sjacqu01
    xml_wiarchive_impl(std::wistream & is, unsigned int flags) ;
124 2486 sjacqu01
    BOOST_WARCHIVE_DECL
125 2486 sjacqu01
    ~xml_wiarchive_impl();
126 2486 sjacqu01
};
127 2486 sjacqu01
128 2486 sjacqu01
} // namespace archive
129 2486 sjacqu01
} // namespace boost
130 2486 sjacqu01
131 2486 sjacqu01
#ifdef BOOST_MSVC
132 2486 sjacqu01
#  pragma warning(pop)
133 2486 sjacqu01
#endif
134 2486 sjacqu01
135 2486 sjacqu01
#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
136 2486 sjacqu01
137 2486 sjacqu01
#ifdef BOOST_MSVC
138 2486 sjacqu01
#  pragma warning(push)
139 2486 sjacqu01
#  pragma warning(disable : 4511 4512)
140 2486 sjacqu01
#endif
141 2486 sjacqu01
142 2486 sjacqu01
namespace boost {
143 2486 sjacqu01
namespace archive {
144 2486 sjacqu01
145 2486 sjacqu01
class BOOST_SYMBOL_VISIBLE xml_wiarchive :
146 2486 sjacqu01
    public xml_wiarchive_impl<xml_wiarchive>{
147 2486 sjacqu01
public:
148 2486 sjacqu01
    xml_wiarchive(std::wistream & is, unsigned int flags = 0) :
149 2486 sjacqu01
        xml_wiarchive_impl<xml_wiarchive>(is, flags)
150 2486 sjacqu01
    {}
151 2486 sjacqu01
    ~xml_wiarchive(){}
152 2486 sjacqu01
};
153 2486 sjacqu01
154 2486 sjacqu01
} // namespace archive
155 2486 sjacqu01
} // namespace boost
156 2486 sjacqu01
157 2486 sjacqu01
// required by export
158 2486 sjacqu01
BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::xml_wiarchive)
159 2486 sjacqu01
160 2486 sjacqu01
#ifdef BOOST_MSVC
161 2486 sjacqu01
#pragma warning(pop)
162 2486 sjacqu01
#endif
163 2486 sjacqu01
164 2486 sjacqu01
#endif // BOOST_NO_STD_WSTREAMBUF
165 2486 sjacqu01
#endif // BOOST_ARCHIVE_XML_WIARCHIVE_HPP