1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/stdapis/boost/archive/text_oarchive.hpp Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -0,0 +1,100 @@
1.4 +#ifndef BOOST_ARCHIVE_TEXT_OARCHIVE_HPP
1.5 +#define BOOST_ARCHIVE_TEXT_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 +// text_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 +#include <cstddef> // std::size_t
1.24 +
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_text_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 text_oarchive_impl :
1.43 + /* protected ? */ public basic_text_oprimitive<std::ostream>,
1.44 + public basic_text_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_text_oarchive<Archive>;
1.51 + friend class save_access;
1.52 +protected:
1.53 +#endif
1.54 + template<class T>
1.55 + void save(const T & t){
1.56 + this->newtoken();
1.57 + basic_text_oprimitive<std::ostream>::save(t);
1.58 + }
1.59 + BOOST_ARCHIVE_DECL(void)
1.60 + save(const char * t);
1.61 + #ifndef BOOST_NO_INTRINSIC_WCHAR_T
1.62 + BOOST_ARCHIVE_DECL(void)
1.63 + save(const wchar_t * t);
1.64 + #endif
1.65 + BOOST_ARCHIVE_DECL(void)
1.66 + save(const std::string &s);
1.67 + #ifndef BOOST_NO_STD_WSTRING
1.68 + BOOST_ARCHIVE_DECL(void)
1.69 + save(const std::wstring &ws);
1.70 + #endif
1.71 + BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY())
1.72 + text_oarchive_impl(std::ostream & os, unsigned int flags);
1.73 + BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY())
1.74 + ~text_oarchive_impl(){};
1.75 +public:
1.76 + BOOST_ARCHIVE_DECL(void)
1.77 + save_binary(const void *address, std::size_t count);
1.78 +};
1.79 +
1.80 +// do not derive from this class. If you want to extend this functionality
1.81 +// via inhertance, derived from text_oarchive_impl instead. This will
1.82 +// preserve correct static polymorphism.
1.83 +class text_oarchive :
1.84 + public text_oarchive_impl<text_oarchive>
1.85 +{
1.86 +public:
1.87 +
1.88 + text_oarchive(std::ostream & os, unsigned int flags = 0) :
1.89 + text_oarchive_impl<text_oarchive>(os, flags)
1.90 + {}
1.91 + ~text_oarchive(){}
1.92 +};
1.93 +
1.94 +} // namespace archive
1.95 +} // namespace boost
1.96 +
1.97 +// required by smart_cast for compilers not implementing
1.98 +// partial template specialization
1.99 +BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(boost::archive::text_oarchive)
1.100 +
1.101 +#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
1.102 +
1.103 +#endif // BOOST_ARCHIVE_TEXT_OARCHIVE_HPP