epoc32/include/stdapis/boost/archive/basic_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/basic_text_iarchive.hpp	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -0,0 +1,94 @@
     1.4 +#ifndef BOOST_ARCHIVE_BASIC_TEXT_IARCHIVE_HPP
     1.5 +#define BOOST_ARCHIVE_BASIC_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 +// basic_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 +// archives stored as text - note these ar templated on the basic
    1.23 +// stream templates to accommodate wide (and other?) kind of characters
    1.24 +//
    1.25 +// note the fact that on libraries without wide characters, ostream is
    1.26 +// is not a specialization of basic_ostream which in fact is not defined
    1.27 +// in such cases.   So we can't use basic_ostream<IStream::char_type> but rather
    1.28 +// use two template parameters
    1.29 +
    1.30 +#include <boost/config.hpp>
    1.31 +#include <boost/pfto.hpp>
    1.32 +#include <boost/detail/workaround.hpp>
    1.33 +
    1.34 +#include <boost/archive/detail/common_iarchive.hpp>
    1.35 +#include <boost/serialization/string.hpp>
    1.36 +
    1.37 +#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
    1.38 +
    1.39 +namespace boost {
    1.40 +namespace archive {
    1.41 +
    1.42 +/////////////////////////////////////////////////////////////////////////
    1.43 +// class basic_text_iarchive - read serialized objects from a input text stream
    1.44 +template<class Archive>
    1.45 +class basic_text_iarchive : 
    1.46 +    public detail::common_iarchive<Archive>
    1.47 +{
    1.48 +protected:
    1.49 +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
    1.50 +public:
    1.51 +#elif defined(BOOST_MSVC)
    1.52 +    // for some inexplicable reason insertion of "class" generates compile erro
    1.53 +    // on msvc 7.1
    1.54 +    friend detail::interface_iarchive<Archive>;
    1.55 +#else
    1.56 +    friend class detail::interface_iarchive<Archive>;
    1.57 +#endif
    1.58 +    // intermediate level to support override of operators
    1.59 +    // fot templates in the absence of partial function 
    1.60 +    // template ordering
    1.61 +    typedef detail::common_iarchive<Archive> detail_common_iarchive;
    1.62 +    template<class T>
    1.63 +    void load_override(T & t, BOOST_PFTO int)
    1.64 +    {
    1.65 +        this->detail_common_iarchive::load_override(t, 0);
    1.66 +    }
    1.67 +
    1.68 +    // Borland compilers has a problem with strong type.  Try to fix this here
    1.69 +    #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
    1.70 +    void load_override(version_type & t, int){ 
    1.71 +        unsigned int x;
    1.72 +        * this->This() >> x;
    1.73 +        t.t = version_type(x);
    1.74 +    }
    1.75 +    #endif
    1.76 +
    1.77 +    // text file don't include the optional information 
    1.78 +    void load_override(class_id_optional_type & /*t*/, int){}
    1.79 +
    1.80 +    BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
    1.81 +    load_override(class_name_type & t, int);
    1.82 +
    1.83 +    BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
    1.84 +    init(void);
    1.85 +
    1.86 +    basic_text_iarchive(unsigned int flags) : 
    1.87 +        detail::common_iarchive<Archive>(flags)
    1.88 +    {}
    1.89 +    ~basic_text_iarchive(){}
    1.90 +};
    1.91 +
    1.92 +} // namespace archive
    1.93 +} // namespace boost
    1.94 +
    1.95 +#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
    1.96 +
    1.97 +#endif // BOOST_ARCHIVE_BASIC_TEXT_IARCHIVE_HPP