os/ossrv/ossrv_pub/boost_apis/boost/archive/text_wiarchive.hpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/ossrv_pub/boost_apis/boost/archive/text_wiarchive.hpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,98 @@
     1.4 +#ifndef BOOST_ARCHIVE_TEXT_WIARCHIVE_HPP
     1.5 +#define BOOST_ARCHIVE_TEXT_WIARCHIVE_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_wiarchive.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 <boost/config.hpp>
    1.23 +#ifdef BOOST_NO_STD_WSTREAMBUF
    1.24 +#error "wide char i/o not supported on this platform"
    1.25 +#else
    1.26 +
    1.27 +#include <istream>
    1.28 +
    1.29 +#include <boost/archive/detail/auto_link_warchive.hpp>
    1.30 +#include <boost/archive/basic_text_iprimitive.hpp>
    1.31 +#include <boost/archive/basic_text_iarchive.hpp>
    1.32 +
    1.33 +#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
    1.34 +
    1.35 +namespace boost { 
    1.36 +namespace archive {
    1.37 +
    1.38 +template<class Archive>
    1.39 +class text_wiarchive_impl : 
    1.40 +    public basic_text_iprimitive<std::wistream>,
    1.41 +    public basic_text_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_text_iarchive<Archive>;
    1.48 +    friend class load_access;
    1.49 +protected:
    1.50 +#endif
    1.51 +    template<class T>
    1.52 +    void load(T & t){
    1.53 +        basic_text_iprimitive<std::wistream>::load(t);
    1.54 +    }
    1.55 +    BOOST_WARCHIVE_DECL(void)
    1.56 +    load(char * t);
    1.57 +    #ifndef BOOST_NO_INTRINSIC_WCHAR_T
    1.58 +    BOOST_WARCHIVE_DECL(void)
    1.59 +    load(wchar_t * t);
    1.60 +    #endif
    1.61 +    BOOST_WARCHIVE_DECL(void)
    1.62 +    load(std::string &s);
    1.63 +    #ifndef BOOST_NO_STD_WSTRING
    1.64 +    BOOST_WARCHIVE_DECL(void)
    1.65 +    load(std::wstring &ws);
    1.66 +    #endif
    1.67 +    // note: the following should not needed - but one compiler (vc 7.1)
    1.68 +    // fails to compile one test (test_shared_ptr) without it !!!
    1.69 +    template<class T>
    1.70 +    void load_override(T & t, BOOST_PFTO int){
    1.71 +        basic_text_iarchive<Archive>::load_override(t, 0);
    1.72 +    }
    1.73 +    BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) 
    1.74 +    text_wiarchive_impl(std::wistream & is, unsigned int flags);
    1.75 +    ~text_wiarchive_impl(){};
    1.76 +};
    1.77 +
    1.78 +// do not derive from this class.  If you want to extend this functionality
    1.79 +// via inhertance, derived from text_wiarchive_impl instead.  This will
    1.80 +// preserve correct static polymorphism.
    1.81 +class text_wiarchive : 
    1.82 +    public text_wiarchive_impl<text_wiarchive>
    1.83 +{
    1.84 +public:
    1.85 +    text_wiarchive(std::wistream & is, unsigned int flags = 0) :
    1.86 +        text_wiarchive_impl<text_wiarchive>(is, flags)
    1.87 +    {}
    1.88 +    ~text_wiarchive(){}
    1.89 +};
    1.90 +
    1.91 +} // namespace archive
    1.92 +} // namespace boost
    1.93 +
    1.94 +// required by smart_cast for compilers not implementing 
    1.95 +// partial template specialization
    1.96 +BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(boost::archive::text_wiarchive)
    1.97 +
    1.98 +#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
    1.99 +
   1.100 +#endif // BOOST_NO_STD_WSTREAMBUF
   1.101 +#endif // BOOST_ARCHIVE_TEXT_WIARCHIVE_HPP