1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/stdapis/boost/archive/xml_iarchive.hpp Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -0,0 +1,111 @@
1.4 +#ifndef BOOST_ARCHIVE_XML_IARCHIVE_HPP
1.5 +#define BOOST_ARCHIVE_XML_IARCHIVE_HPP
1.6 +
1.7 +// MS compatible compilers support #pragma once
1.8 +#if defined(_MSC_VER) && (_MSC_VER >= 1020)
1.9 +# pragma once
1.10 +#endif
1.11 +
1.12 +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
1.13 +// xml_iarchive.hpp
1.14 +
1.15 +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
1.16 +// Use, modification and distribution is subject to the Boost Software
1.17 +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
1.18 +// http://www.boost.org/LICENSE_1_0.txt)
1.19 +
1.20 +// See http://www.boost.org for updates, documentation, and revision history.
1.21 +
1.22 +#include <istream>
1.23 +
1.24 +//#include <boost/scoped_ptr.hpp>
1.25 +#include <boost/archive/detail/auto_link_archive.hpp>
1.26 +#include <boost/archive/basic_text_iprimitive.hpp>
1.27 +#include <boost/archive/basic_xml_iarchive.hpp>
1.28 +
1.29 +#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
1.30 +
1.31 +namespace boost {
1.32 +namespace archive {
1.33 +
1.34 +template<class CharType>
1.35 +class basic_xml_grammar;
1.36 +typedef basic_xml_grammar<char> xml_grammar;
1.37 +
1.38 +template<class Archive>
1.39 +class xml_iarchive_impl :
1.40 + public basic_text_iprimitive<std::istream>,
1.41 + public basic_xml_iarchive<Archive>
1.42 +{
1.43 +#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
1.44 +public:
1.45 +#else
1.46 + friend class detail::interface_iarchive<Archive>;
1.47 + friend class basic_xml_iarchive<Archive>;
1.48 + friend class load_access;
1.49 +protected:
1.50 +#endif
1.51 + // instances of micro xml parser to parse start preambles
1.52 + // scoped_ptr doesn't play nice with borland - so use a naked pointer
1.53 + // scoped_ptr<xml_grammar> gimpl;
1.54 + xml_grammar *gimpl;
1.55 +
1.56 + std::istream & get_is(){
1.57 + return is;
1.58 + }
1.59 + template<class T>
1.60 + void load(T & t){
1.61 + basic_text_iprimitive<std::istream>::load(t);
1.62 + }
1.63 + BOOST_ARCHIVE_DECL(void)
1.64 + load(char * t);
1.65 + #ifndef BOOST_NO_INTRINSIC_WCHAR_T
1.66 + BOOST_ARCHIVE_DECL(void)
1.67 + load(wchar_t * t);
1.68 + #endif
1.69 + BOOST_ARCHIVE_DECL(void)
1.70 + load(std::string &s);
1.71 + #ifndef BOOST_NO_STD_WSTRING
1.72 + BOOST_ARCHIVE_DECL(void)
1.73 + load(std::wstring &ws);
1.74 + #endif
1.75 + template<class T>
1.76 + void load_override(T & t, BOOST_PFTO int){
1.77 + basic_xml_iarchive<Archive>::load_override(t, 0);
1.78 + }
1.79 + BOOST_ARCHIVE_DECL(void)
1.80 + load_override(class_name_type & t, int);
1.81 + BOOST_ARCHIVE_DECL(void)
1.82 + init();
1.83 + BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY())
1.84 + xml_iarchive_impl(std::istream & is, unsigned int flags);
1.85 + BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY())
1.86 + ~xml_iarchive_impl();
1.87 +};
1.88 +
1.89 +// we use the following because we can't use
1.90 +// typedef xml_iarchive_impl<xml_iarchive_impl<...> > xml_iarchive;
1.91 +
1.92 +// do not derive from this class. If you want to extend this functionality
1.93 +// via inhertance, derived from xml_iarchive_impl instead. This will
1.94 +// preserve correct static polymorphism.
1.95 +class xml_iarchive :
1.96 + public xml_iarchive_impl<xml_iarchive>
1.97 +{
1.98 +public:
1.99 + xml_iarchive(std::istream & is, unsigned int flags = 0) :
1.100 + xml_iarchive_impl<xml_iarchive>(is, flags)
1.101 + {}
1.102 + ~xml_iarchive(){};
1.103 +};
1.104 +
1.105 +} // namespace archive
1.106 +} // namespace boost
1.107 +
1.108 +// required by smart_cast for compilers not implementing
1.109 +// partial template specialization
1.110 +BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(boost::archive::xml_iarchive)
1.111 +
1.112 +#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
1.113 +
1.114 +#endif // BOOST_ARCHIVE_XML_IARCHIVE_HPP