epoc32/include/stdapis/boost/archive/text_iarchive.hpp
branchSymbian2
changeset 2 2fe1408b6811
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/stdapis/boost/archive/text_iarchive.hpp	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -0,0 +1,99 @@
     1.4 +#ifndef BOOST_ARCHIVE_TEXT_IARCHIVE_HPP
     1.5 +#define BOOST_ARCHIVE_TEXT_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 +// text_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/archive/detail/auto_link_archive.hpp>
    1.25 +#include <boost/archive/basic_text_iprimitive.hpp>
    1.26 +#include <boost/archive/basic_text_iarchive.hpp>
    1.27 +
    1.28 +#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
    1.29 +
    1.30 +namespace boost { 
    1.31 +namespace archive {
    1.32 +
    1.33 +template<class Archive>
    1.34 +class text_iarchive_impl : 
    1.35 +    public basic_text_iprimitive<std::istream>,
    1.36 +    public basic_text_iarchive<Archive>
    1.37 +{
    1.38 +#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
    1.39 +public:
    1.40 +#else
    1.41 +    friend class detail::interface_iarchive<Archive>;
    1.42 +    friend class basic_text_iarchive<Archive>;
    1.43 +    friend class load_access;
    1.44 +protected:
    1.45 +#endif
    1.46 +    template<class T>
    1.47 +    void load(T & t){
    1.48 +        basic_text_iprimitive<std::istream>::load(t);
    1.49 +    }
    1.50 +    BOOST_ARCHIVE_DECL(void) 
    1.51 +    load(char * t);
    1.52 +    #ifndef BOOST_NO_INTRINSIC_WCHAR_T
    1.53 +    BOOST_ARCHIVE_DECL(void) 
    1.54 +    load(wchar_t * t);
    1.55 +    #endif
    1.56 +    BOOST_ARCHIVE_DECL(void) 
    1.57 +    load(std::string &s);
    1.58 +    #ifndef BOOST_NO_STD_WSTRING
    1.59 +    BOOST_ARCHIVE_DECL(void) 
    1.60 +    load(std::wstring &ws);
    1.61 +    #endif
    1.62 +    // note: the following should not needed - but one compiler (vc 7.1)
    1.63 +    // fails to compile one test (test_shared_ptr) without it !!!
    1.64 +    // make this protected so it can be called from a derived archive
    1.65 +    template<class T>
    1.66 +    void load_override(T & t, BOOST_PFTO int){
    1.67 +        basic_text_iarchive<Archive>::load_override(t, 0);
    1.68 +    }
    1.69 +    BOOST_ARCHIVE_DECL(void)
    1.70 +    load_override(class_name_type & t, int);
    1.71 +    BOOST_ARCHIVE_DECL(void)
    1.72 +    init();
    1.73 +    BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) 
    1.74 +    text_iarchive_impl(std::istream & is, unsigned int flags);
    1.75 +    BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) 
    1.76 +    ~text_iarchive_impl(){};
    1.77 +};
    1.78 +
    1.79 +// do not derive from this class.  If you want to extend this functionality
    1.80 +// via inhertance, derived from text_iarchive_impl instead.  This will
    1.81 +// preserve correct static polymorphism.
    1.82 +class text_iarchive : 
    1.83 +    public text_iarchive_impl<text_iarchive>
    1.84 +{
    1.85 +public:
    1.86 +     
    1.87 +    text_iarchive(std::istream & is, unsigned int flags = 0) :
    1.88 +        text_iarchive_impl<text_iarchive>(is, flags)
    1.89 +    {}
    1.90 +    ~text_iarchive(){}
    1.91 +};
    1.92 +
    1.93 +} // namespace archive
    1.94 +} // namespace boost
    1.95 +
    1.96 +// required by smart_cast for compilers not implementing 
    1.97 +// partial template specialization
    1.98 +BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(boost::archive::text_iarchive)
    1.99 +
   1.100 +#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
   1.101 +
   1.102 +#endif // BOOST_ARCHIVE_TEXT_IARCHIVE_HPP