sl@0: #ifndef BOOST_ARCHIVE_XML_WIARCHIVE_HPP sl@0: #define BOOST_ARCHIVE_XML_WIARCHIVE_HPP sl@0: sl@0: // MS compatible compilers support #pragma once sl@0: #if defined(_MSC_VER) && (_MSC_VER >= 1020) sl@0: # pragma once sl@0: #endif sl@0: sl@0: /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 sl@0: // xml_wiarchive.hpp sl@0: sl@0: // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . sl@0: // Use, modification and distribution is subject to the Boost Software sl@0: // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at sl@0: // http://www.boost.org/LICENSE_1_0.txt) sl@0: sl@0: // See http://www.boost.org for updates, documentation, and revision history. sl@0: sl@0: #include sl@0: #ifdef BOOST_NO_STD_WSTREAMBUF sl@0: #error "wide char i/o not supported on this platform" sl@0: #else sl@0: sl@0: #include sl@0: sl@0: //#include sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: #include // must be the last header sl@0: sl@0: namespace boost { sl@0: namespace archive { sl@0: sl@0: template sl@0: class basic_xml_grammar; sl@0: typedef basic_xml_grammar xml_wgrammar; sl@0: sl@0: template sl@0: class xml_wiarchive_impl : sl@0: public basic_text_iprimitive, sl@0: public basic_xml_iarchive sl@0: { sl@0: #ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS sl@0: public: sl@0: #else sl@0: friend class detail::interface_iarchive; sl@0: friend class basic_xml_iarchive; sl@0: friend class load_access; sl@0: protected: sl@0: #endif sl@0: // instances of micro xml parser to parse start preambles sl@0: // scoped_ptr doesn't play nice with borland - so use a naked pointer sl@0: // scoped_ptr gimpl; sl@0: xml_wgrammar *gimpl; sl@0: std::wistream & get_is(){ sl@0: return is; sl@0: } sl@0: template sl@0: void load(T & t){ sl@0: basic_text_iprimitive::load(t); sl@0: } sl@0: BOOST_WARCHIVE_DECL(void) sl@0: load(char * t); sl@0: #ifndef BOOST_NO_INTRINSIC_WCHAR_T sl@0: BOOST_WARCHIVE_DECL(void) sl@0: load(wchar_t * t); sl@0: #endif sl@0: BOOST_WARCHIVE_DECL(void) sl@0: load(std::string &s); sl@0: #ifndef BOOST_NO_STD_WSTRING sl@0: BOOST_WARCHIVE_DECL(void) sl@0: load(std::wstring &ws); sl@0: #endif sl@0: template sl@0: void load_override(T & t, BOOST_PFTO int){ sl@0: basic_xml_iarchive::load_override(t, 0); sl@0: } sl@0: BOOST_WARCHIVE_DECL(void) sl@0: load_override(class_name_type & t, int); sl@0: BOOST_WARCHIVE_DECL(void) sl@0: init(); sl@0: BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) sl@0: xml_wiarchive_impl(std::wistream & is, unsigned int flags) ; sl@0: BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) sl@0: ~xml_wiarchive_impl(); sl@0: }; sl@0: sl@0: // we use the following because we can't use sl@0: // typedef xml_wiarchive_impl > xml_wiarchive; sl@0: sl@0: // do not derive from this class. If you want to extend this functionality sl@0: // via inhertance, derived from xml_wiarchive_impl instead. This will sl@0: // preserve correct static polymorphism. sl@0: class xml_wiarchive : sl@0: public xml_wiarchive_impl sl@0: { sl@0: public: sl@0: xml_wiarchive(std::wistream & is, unsigned int flags = 0) : sl@0: xml_wiarchive_impl(is, flags) sl@0: {} sl@0: ~xml_wiarchive(){} sl@0: }; sl@0: sl@0: } // namespace archive sl@0: } // namespace boost sl@0: sl@0: // required by smart_cast for compilers not implementing sl@0: // partial template specialization sl@0: BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(boost::archive::xml_wiarchive) sl@0: sl@0: #include // pops abi_suffix.hpp pragmas sl@0: sl@0: #endif // BOOST_NO_STD_WSTREAMBUF sl@0: #endif // BOOST_ARCHIVE_XML_WIARCHIVE_HPP