1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/stdapis/boost/archive/xml_oarchive.hpp Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -0,0 +1,113 @@
1.4 +#ifndef BOOST_ARCHIVE_XML_OARCHIVE_HPP
1.5 +#define BOOST_ARCHIVE_XML_OARCHIVE_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_oarchive.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 <ostream>
1.23 +
1.24 +#include <cstddef> // size_t
1.25 +#include <boost/config.hpp>
1.26 +#if defined(BOOST_NO_STDC_NAMESPACE)
1.27 +namespace std{
1.28 + using ::size_t;
1.29 +} // namespace std
1.30 +#endif
1.31 +
1.32 +#include <boost/archive/detail/auto_link_archive.hpp>
1.33 +#include <boost/archive/basic_text_oprimitive.hpp>
1.34 +#include <boost/archive/basic_xml_oarchive.hpp>
1.35 +
1.36 +#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
1.37 +
1.38 +namespace boost {
1.39 +namespace archive {
1.40 +
1.41 +template<class Archive>
1.42 +class xml_oarchive_impl :
1.43 + public basic_text_oprimitive<std::ostream>,
1.44 + public basic_xml_oarchive<Archive>
1.45 +{
1.46 +#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
1.47 +public:
1.48 +#else
1.49 + friend class detail::interface_oarchive<Archive>;
1.50 + friend class basic_xml_oarchive<Archive>;
1.51 + friend class save_access;
1.52 +protected:
1.53 +#endif
1.54 + void end_preamble(){
1.55 + basic_xml_oarchive<Archive>::end_preamble();
1.56 + }
1.57 + template<class T>
1.58 + void save(const T & t){
1.59 + basic_text_oprimitive<std::ostream>::save(t);
1.60 + }
1.61 + BOOST_ARCHIVE_DECL(void)
1.62 + save(const char * t);
1.63 + #ifndef BOOST_NO_INTRINSIC_WCHAR_T
1.64 + BOOST_ARCHIVE_DECL(void)
1.65 + save(const wchar_t * t);
1.66 + #endif
1.67 + BOOST_ARCHIVE_DECL(void)
1.68 + save(const std::string &s);
1.69 + #ifndef BOOST_NO_STD_WSTRING
1.70 + BOOST_ARCHIVE_DECL(void)
1.71 + save(const std::wstring &ws);
1.72 + #endif
1.73 + BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY())
1.74 + xml_oarchive_impl(std::ostream & os, unsigned int flags);
1.75 + ~xml_oarchive_impl(){}
1.76 +public:
1.77 + void save_binary(const void *address, std::size_t count){
1.78 + this->end_preamble();
1.79 + #if ! defined(__MWERKS__)
1.80 + this->basic_text_oprimitive<std::ostream>::save_binary(
1.81 + #else
1.82 + this->basic_text_oprimitive::save_binary(
1.83 + #endif
1.84 + address,
1.85 + count
1.86 + );
1.87 + this->indent_next = true;
1.88 + }
1.89 +};
1.90 +
1.91 +// we use the following because we can't use
1.92 +// typedef xml_oarchive_impl<xml_oarchive_impl<...> > xml_oarchive;
1.93 +
1.94 +// do not derive from this class. If you want to extend this functionality
1.95 +// via inhertance, derived from xml_oarchive_impl instead. This will
1.96 +// preserve correct static polymorphism.
1.97 +class xml_oarchive :
1.98 + public xml_oarchive_impl<xml_oarchive>
1.99 +{
1.100 +public:
1.101 + xml_oarchive(std::ostream & os, unsigned int flags = 0) :
1.102 + xml_oarchive_impl<xml_oarchive>(os, flags)
1.103 + {}
1.104 + ~xml_oarchive(){}
1.105 +};
1.106 +
1.107 +} // namespace archive
1.108 +} // namespace boost
1.109 +
1.110 +// required by smart_cast for compilers not implementing
1.111 +// partial template specialization
1.112 +BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(boost::archive::xml_oarchive)
1.113 +
1.114 +#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
1.115 +
1.116 +#endif // BOOST_ARCHIVE_XML_OARCHIVE_HPP