1 #ifndef BOOST_SERIALIZATION_STRING_HPP
2 #define BOOST_SERIALIZATION_STRING_HPP
4 // MS compatible compilers support #pragma once
5 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
10 // serialization/string.hpp:
11 // serialization for stl string templates
13 // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
14 // Use, modification and distribution is subject to the Boost Software
15 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
16 // http://www.boost.org/LICENSE_1_0.txt)
18 // See http://www.boost.org for updates, documentation, and revision history.
22 #include <boost/config.hpp>
23 #include <boost/serialization/level.hpp>
25 BOOST_CLASS_IMPLEMENTATION(std::string
, boost::serialization::primitive_type
)
26 #ifndef BOOST_NO_STD_WSTRING
27 BOOST_CLASS_IMPLEMENTATION(std::wstring
, boost::serialization::primitive_type
)
30 // left over from a previous incarnation - strings are now always primitive types
33 #include <boost/serialization/collections_save_imp.hpp>
34 #include <boost/serialization/collections_load_imp.hpp>
35 #include <boost/serialization/split_free.hpp>
38 namespace serialization
{
40 // basic_string - general case
41 template<class Archive
, class U
, class Allocator
>
44 const std::basic_string
<U
, Allocator
> &t
,
45 const unsigned int file_version
47 boost::serialization::stl::save_collection
<
48 Archive
, std::basic_string
<U
, Allocator
>
52 template<class Archive
, class U
, class Allocator
>
55 std::basic_string
<U
, Allocator
> &t
,
56 const unsigned int file_version
58 boost::serialization::stl::load_collection
<
60 std::basic_string
<U
, Allocator
>,
61 boost::serialization::stl::archive_input_seq
<
63 std::basic_string
<U
, Allocator
>
65 boost::serialization::stl::reserve_imp
<
66 std::basic_string
<U
, Allocator
>
71 // split non-intrusive serialization function member into separate
72 // non intrusive save/load member functions
73 template<class Archive
, class U
, class Allocator
>
74 inline void serialize(
76 std::basic_string
<U
, Allocator
> & t
,
77 const unsigned int file_version
79 boost::serialization::split_free(ar
, t
, file_version
);
85 #include <boost/serialization/collection_traits.hpp>
87 BOOST_SERIALIZATION_COLLECTION_TRAITS(std::vector
)
91 #endif // BOOST_SERIALIZATION_STRING_HPP