1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/stdapis/boost/serialization/string.hpp Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -0,0 +1,91 @@
1.4 +#ifndef BOOST_SERIALIZATION_STRING_HPP
1.5 +#define BOOST_SERIALIZATION_STRING_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 +// serialization/string.hpp:
1.14 +// serialization for stl string templates
1.15 +
1.16 +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
1.17 +// Use, modification and distribution is subject to the Boost Software
1.18 +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
1.19 +// http://www.boost.org/LICENSE_1_0.txt)
1.20 +
1.21 +// See http://www.boost.org for updates, documentation, and revision history.
1.22 +
1.23 +#include <string>
1.24 +
1.25 +#include <boost/config.hpp>
1.26 +#include <boost/serialization/level.hpp>
1.27 +
1.28 +BOOST_CLASS_IMPLEMENTATION(std::string, boost::serialization::primitive_type)
1.29 +#ifndef BOOST_NO_STD_WSTRING
1.30 +BOOST_CLASS_IMPLEMENTATION(std::wstring, boost::serialization::primitive_type)
1.31 +#endif
1.32 +
1.33 +// left over from a previous incarnation - strings are now always primitive types
1.34 +#if 0
1.35 +#include <string>
1.36 +#include <boost/serialization/collections_save_imp.hpp>
1.37 +#include <boost/serialization/collections_load_imp.hpp>
1.38 +#include <boost/serialization/split_free.hpp>
1.39 +
1.40 +namespace boost {
1.41 +namespace serialization {
1.42 +
1.43 +// basic_string - general case
1.44 +template<class Archive, class U, class Allocator>
1.45 +inline void save(
1.46 + Archive & ar,
1.47 + const std::basic_string<U, Allocator> &t,
1.48 + const unsigned int file_version
1.49 +){
1.50 + boost::serialization::stl::save_collection<
1.51 + Archive, std::basic_string<U, Allocator>
1.52 + >(ar, t);
1.53 +}
1.54 +
1.55 +template<class Archive, class U, class Allocator>
1.56 +inline void load(
1.57 + Archive & ar,
1.58 + std::basic_string<U, Allocator> &t,
1.59 + const unsigned int file_version
1.60 +){
1.61 + boost::serialization::stl::load_collection<
1.62 + Archive,
1.63 + std::basic_string<U, Allocator>,
1.64 + boost::serialization::stl::archive_input_seq<
1.65 + Archive,
1.66 + std::basic_string<U, Allocator>
1.67 + >,
1.68 + boost::serialization::stl::reserve_imp<
1.69 + std::basic_string<U, Allocator>
1.70 + >
1.71 + >(ar, t);
1.72 +}
1.73 +
1.74 +// split non-intrusive serialization function member into separate
1.75 +// non intrusive save/load member functions
1.76 +template<class Archive, class U, class Allocator>
1.77 +inline void serialize(
1.78 + Archive & ar,
1.79 + std::basic_string<U, Allocator> & t,
1.80 + const unsigned int file_version
1.81 +){
1.82 + boost::serialization::split_free(ar, t, file_version);
1.83 +}
1.84 +
1.85 +} // serialization
1.86 +} // namespace boost
1.87 +
1.88 +#include <boost/serialization/collection_traits.hpp>
1.89 +
1.90 +BOOST_SERIALIZATION_COLLECTION_TRAITS(std::vector)
1.91 +
1.92 +#endif
1.93 +
1.94 +#endif // BOOST_SERIALIZATION_STRING_HPP