update boost
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// access.hpp: interface for serialization system.
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -41,8 +41,8 @@ namespace detail {
|
||||
struct member_loader;
|
||||
} // namespace detail
|
||||
|
||||
// use an "accessor class so that we can use:
|
||||
// "friend class boost::serialization::access;"
|
||||
// use an "accessor class so that we can use:
|
||||
// "friend class boost::serialization::access;"
|
||||
// in any serialized class to permit clean, safe access to private class members
|
||||
// by the serialization system
|
||||
|
||||
@@ -62,20 +62,20 @@ public:
|
||||
friend class archive::detail::oserializer;
|
||||
template<class Archive, class T>
|
||||
friend inline void serialize(
|
||||
Archive & ar,
|
||||
T & t,
|
||||
Archive & ar,
|
||||
T & t,
|
||||
const unsigned int file_version
|
||||
);
|
||||
template<class Archive, class T>
|
||||
friend inline void save_construct_data(
|
||||
Archive & ar,
|
||||
const T * t,
|
||||
Archive & ar,
|
||||
const T * t,
|
||||
const unsigned int file_version
|
||||
);
|
||||
template<class Archive, class T>
|
||||
friend inline void load_construct_data(
|
||||
Archive & ar,
|
||||
T * t,
|
||||
Archive & ar,
|
||||
T * t,
|
||||
const unsigned int file_version
|
||||
);
|
||||
#endif
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
// pass calls to users's class implementation
|
||||
template<class Archive, class T>
|
||||
static void member_save(
|
||||
Archive & ar,
|
||||
Archive & ar,
|
||||
//const T & t,
|
||||
T & t,
|
||||
const unsigned int file_version
|
||||
@@ -92,7 +92,7 @@ public:
|
||||
}
|
||||
template<class Archive, class T>
|
||||
static void member_load(
|
||||
Archive & ar,
|
||||
Archive & ar,
|
||||
T & t,
|
||||
const unsigned int file_version
|
||||
){
|
||||
@@ -100,15 +100,15 @@ public:
|
||||
}
|
||||
template<class Archive, class T>
|
||||
static void serialize(
|
||||
Archive & ar,
|
||||
T & t,
|
||||
Archive & ar,
|
||||
T & t,
|
||||
const unsigned int file_version
|
||||
){
|
||||
// note: if you get a compile time error here with a
|
||||
// message something like:
|
||||
// cannot convert parameter 1 from <file type 1> to <file type 2 &>
|
||||
// a likely possible cause is that the class T contains a
|
||||
// serialize function - but that serialize function isn't
|
||||
// a likely possible cause is that the class T contains a
|
||||
// serialize function - but that serialize function isn't
|
||||
// a template and corresponds to a file type different than
|
||||
// the class Archive. To resolve this, don't include an
|
||||
// archive type other than that for which the serialization
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
// serialization/unordered_map.hpp:
|
||||
// serialization for stl unordered_map templates
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2014 Jim Bell
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <boost/serialization/utility.hpp>
|
||||
#include <boost/move/utility_core.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
namespace stl {
|
||||
|
||||
@@ -33,18 +33,18 @@ template<class Archive, class Container>
|
||||
struct archive_input_unordered_map
|
||||
{
|
||||
inline void operator()(
|
||||
Archive &ar,
|
||||
Container &s,
|
||||
Archive &ar,
|
||||
Container &s,
|
||||
const unsigned int v
|
||||
){
|
||||
typedef typename Container::value_type type;
|
||||
detail::stack_construct<Archive, type> t(ar, v);
|
||||
ar >> boost::serialization::make_nvp("item", t.reference());
|
||||
std::pair<typename Container::const_iterator, bool> result =
|
||||
std::pair<typename Container::const_iterator, bool> result =
|
||||
s.insert(boost::move(t.reference()));
|
||||
// note: the following presumes that the map::value_type was NOT tracked
|
||||
// in the archive. This is the usual case, but here there is no way
|
||||
// to determine that.
|
||||
// to determine that.
|
||||
if(result.second){
|
||||
ar.reset_object_address(
|
||||
& (result.first->second),
|
||||
@@ -59,8 +59,8 @@ template<class Archive, class Container>
|
||||
struct archive_input_unordered_multimap
|
||||
{
|
||||
inline void operator()(
|
||||
Archive &ar,
|
||||
Container &s,
|
||||
Archive &ar,
|
||||
Container &s,
|
||||
const unsigned int v
|
||||
){
|
||||
typedef typename Container::value_type type;
|
||||
@@ -70,7 +70,7 @@ struct archive_input_unordered_multimap
|
||||
s.insert(t.reference());
|
||||
// note: the following presumes that the map::value_type was NOT tracked
|
||||
// in the archive. This is the usual case, but here there is no way
|
||||
// to determine that.
|
||||
// to determine that.
|
||||
ar.reset_object_address(
|
||||
& result->second,
|
||||
& t.reference()
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// archive_input_unordered_set.hpp
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2014 Jim Bell
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -32,15 +32,15 @@ template<class Archive, class Container>
|
||||
struct archive_input_unordered_set
|
||||
{
|
||||
inline void operator()(
|
||||
Archive &ar,
|
||||
Container &s,
|
||||
Archive &ar,
|
||||
Container &s,
|
||||
const unsigned int v
|
||||
){
|
||||
typedef typename Container::value_type type;
|
||||
detail::stack_construct<Archive, type> t(ar, v);
|
||||
// borland fails silently w/o full namespace
|
||||
ar >> boost::serialization::make_nvp("item", t.reference());
|
||||
std::pair<typename Container::const_iterator, bool> result =
|
||||
std::pair<typename Container::const_iterator, bool> result =
|
||||
s.insert(boost::move(t.reference()));
|
||||
if(result.second)
|
||||
ar.reset_object_address(& (* result.first), & t.reference());
|
||||
@@ -52,8 +52,8 @@ template<class Archive, class Container>
|
||||
struct archive_input_unordered_multiset
|
||||
{
|
||||
inline void operator()(
|
||||
Archive &ar,
|
||||
Container &s,
|
||||
Archive &ar,
|
||||
Container &s,
|
||||
const unsigned int v
|
||||
){
|
||||
typedef typename Container::value_type type;
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <cstddef> // std::size_t
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
} // namespace std
|
||||
#endif
|
||||
|
||||
@@ -39,7 +39,7 @@ void serialize(Archive& ar, std::array<T,N>& a, const unsigned int /* version */
|
||||
"elems",
|
||||
*static_cast<T (*)[N]>(static_cast<void *>(a.data()))
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
} } // end namespace boost::serialization
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef BOOST_SERIALIZATION_ARRAY_OPTIMIZATON_HPP
|
||||
#define BOOST_SERIALIZATION_ARRAY_OPTIMIZATON_HPP
|
||||
#ifndef BOOST_SERIALIZATION_ARRAY_OPTIMIZATION_HPP
|
||||
#define BOOST_SERIALIZATION_ARRAY_OPTIMIZATION_HPP
|
||||
|
||||
// (C) Copyright 2005 Matthias Troyer and Dave Abrahams
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
@@ -9,8 +9,8 @@
|
||||
#include <boost/config.hpp> // msvc 6.0 needs this for warning suppression
|
||||
|
||||
#if defined(BOOST_NO_STDC_NAMESPACE)
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
} // namespace std
|
||||
#endif
|
||||
|
||||
@@ -34,4 +34,4 @@ template <> struct use_array_optimization<Archive> { \
|
||||
>::type {}; \
|
||||
}; }}
|
||||
|
||||
#endif //BOOST_SERIALIZATION_ARRAY_OPTIMIZATON_HPP
|
||||
#endif //BOOST_SERIALIZATION_ARRAY_OPTIMIZATION_HPP
|
||||
|
||||
@@ -6,13 +6,11 @@
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
//#include <iostream>
|
||||
|
||||
#include <boost/config.hpp> // msvc 6.0 needs this for warning suppression
|
||||
|
||||
#if defined(BOOST_NO_STDC_NAMESPACE)
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
} // namespace std
|
||||
#endif
|
||||
|
||||
@@ -81,18 +79,18 @@ public:
|
||||
{
|
||||
ar.load_array(*this,version);
|
||||
}
|
||||
|
||||
|
||||
// default implementation
|
||||
template<class Archive>
|
||||
void serialize(Archive &ar, const unsigned int version)
|
||||
{
|
||||
typedef typename
|
||||
typedef typename
|
||||
boost::serialization::use_array_optimization<Archive>::template apply<
|
||||
typename remove_const< T >::type
|
||||
typename remove_const< T >::type
|
||||
>::type use_optimized;
|
||||
serialize_optimized(ar,version,use_optimized());
|
||||
}
|
||||
|
||||
|
||||
T * address() const
|
||||
{
|
||||
return m_t;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// base_object.hpp:
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -17,7 +17,7 @@
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
|
||||
// if no archive headers have been included this is a no op
|
||||
// this is to permit BOOST_EXPORT etc to be included in a
|
||||
// this is to permit BOOST_EXPORT etc to be included in a
|
||||
// file declaration header
|
||||
|
||||
#include <boost/config.hpp>
|
||||
@@ -84,7 +84,7 @@ namespace detail
|
||||
|
||||
} // namespace detail
|
||||
template<class Base, class Derived>
|
||||
typename detail::base_cast<Base, Derived>::type &
|
||||
typename detail::base_cast<Base, Derived>::type &
|
||||
base_object(Derived &d)
|
||||
{
|
||||
BOOST_STATIC_ASSERT(( is_base_and_derived<Base,Derived>::value));
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// nvp.hpp: interface for serialization system.
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -21,8 +21,8 @@
|
||||
#include <cstddef> // std::size_t
|
||||
#include <boost/config.hpp>
|
||||
#if defined(BOOST_NO_STDC_NAMESPACE)
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
} // namespace std
|
||||
#endif
|
||||
|
||||
@@ -67,7 +67,7 @@ struct binary_object :
|
||||
|
||||
// just a little helper to support the convention that all serialization
|
||||
// wrappers follow the naming convention make_xxxxx
|
||||
inline
|
||||
inline
|
||||
const binary_object
|
||||
make_binary_object(const void * t, std::size_t size){
|
||||
return binary_object(t, size);
|
||||
|
||||
@@ -6,13 +6,11 @@
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
//#include <iostream>
|
||||
|
||||
#include <boost/config.hpp> // msvc 6.0 needs this for warning suppression
|
||||
|
||||
#if defined(BOOST_NO_STDC_NAMESPACE)
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
} // namespace std
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef BOOST_SERIALIZATION_UNORDERED_MAP_HPP
|
||||
#define BOOST_SERIALIZATION_UNORDERED_MAP_HPP
|
||||
#ifndef BOOST_SERIALIZATION_BOOST_SERIALIZATION_UNORDERED_MAP_HPP
|
||||
#define BOOST_SERIALIZATION_BOOST_SERIALIZATION_UNORDERED_MAP_HPP
|
||||
|
||||
// MS compatible compilers support #pragma once
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
||||
@@ -10,7 +10,7 @@
|
||||
// serialization/unordered_map.hpp:
|
||||
// serialization for stl unordered_map templates
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2014 Jim Bell
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -28,45 +28,47 @@
|
||||
#include <boost/serialization/archive_input_unordered_map.hpp>
|
||||
#include <boost/serialization/split_free.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class T,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
inline void save(
|
||||
Archive & ar,
|
||||
const boost::unordered_map<Key, HashFcn, EqualKey, Allocator> &t,
|
||||
const boost::unordered_map<Key, T, HashFcn, EqualKey, Allocator> &t,
|
||||
const unsigned int /*file_version*/
|
||||
){
|
||||
boost::serialization::stl::save_unordered_collection<
|
||||
Archive,
|
||||
boost::unordered_map<Key, HashFcn, EqualKey, Allocator>
|
||||
Archive,
|
||||
boost::unordered_map<Key, T, HashFcn, EqualKey, Allocator>
|
||||
>(ar, t);
|
||||
}
|
||||
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class T,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
inline void load(
|
||||
Archive & ar,
|
||||
boost::unordered_map<Key, HashFcn, EqualKey, Allocator> &t,
|
||||
boost::unordered_map<Key, T, HashFcn, EqualKey, Allocator> &t,
|
||||
const unsigned int /*file_version*/
|
||||
){
|
||||
boost::serialization::stl::load_unordered_collection<
|
||||
Archive,
|
||||
boost::unordered_map<Key, HashFcn, EqualKey, Allocator>,
|
||||
boost::unordered_map<Key, T, HashFcn, EqualKey, Allocator>,
|
||||
boost::serialization::stl::archive_input_unordered_map<
|
||||
Archive,
|
||||
boost::unordered_map<Key, HashFcn, EqualKey, Allocator>
|
||||
Archive,
|
||||
boost::unordered_map<Key, T, HashFcn, EqualKey, Allocator>
|
||||
>
|
||||
>(ar, t);
|
||||
}
|
||||
@@ -74,15 +76,16 @@ inline void load(
|
||||
// split non-intrusive serialization function member into separate
|
||||
// non intrusive save/load member functions
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class T,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
inline void serialize(
|
||||
Archive & ar,
|
||||
boost::unordered_map<Key, HashFcn, EqualKey, Allocator> &t,
|
||||
boost::unordered_map<Key, T, HashFcn, EqualKey, Allocator> &t,
|
||||
const unsigned int file_version
|
||||
){
|
||||
boost::serialization::split_free(ar, t, file_version);
|
||||
@@ -90,43 +93,45 @@ inline void serialize(
|
||||
|
||||
// unordered_multimap
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class T,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
inline void save(
|
||||
Archive & ar,
|
||||
const boost::unordered_multimap<Key, HashFcn, EqualKey, Allocator> &t,
|
||||
const boost::unordered_multimap<Key, T, HashFcn, EqualKey, Allocator> &t,
|
||||
const unsigned int /*file_version*/
|
||||
){
|
||||
boost::serialization::stl::save_unordered_collection<
|
||||
Archive,
|
||||
boost::unordered_multimap<Key, HashFcn, EqualKey, Allocator>
|
||||
Archive,
|
||||
boost::unordered_multimap<Key, T, HashFcn, EqualKey, Allocator>
|
||||
>(ar, t);
|
||||
}
|
||||
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class T,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
inline void load(
|
||||
Archive & ar,
|
||||
boost::unordered_multimap<
|
||||
Key, HashFcn, EqualKey, Allocator
|
||||
Key, T, HashFcn, EqualKey, Allocator
|
||||
> &t,
|
||||
const unsigned int /*file_version*/
|
||||
){
|
||||
boost::serialization::stl::load_unordered_collection<
|
||||
Archive,
|
||||
boost::unordered_multimap<Key, HashFcn, EqualKey, Allocator>,
|
||||
boost::unordered_multimap<Key, T, HashFcn, EqualKey, Allocator>,
|
||||
boost::serialization::stl::archive_input_unordered_multimap<
|
||||
Archive,
|
||||
boost::unordered_multimap<Key, HashFcn, EqualKey, Allocator>
|
||||
Archive,
|
||||
boost::unordered_multimap<Key, T, HashFcn, EqualKey, Allocator>
|
||||
>
|
||||
>(ar, t);
|
||||
}
|
||||
@@ -134,15 +139,16 @@ inline void load(
|
||||
// split non-intrusive serialization function member into separate
|
||||
// non intrusive save/load member functions
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class T,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
inline void serialize(
|
||||
Archive & ar,
|
||||
boost::unordered_multimap<Key, HashFcn, EqualKey, Allocator> &t,
|
||||
boost::unordered_multimap<Key, T, HashFcn, EqualKey, Allocator> &t,
|
||||
const unsigned int file_version
|
||||
){
|
||||
boost::serialization::split_free(ar, t, file_version);
|
||||
@@ -151,4 +157,4 @@ inline void serialize(
|
||||
} // namespace serialization
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_SERIALIZATION_UNORDERED_MAP_HPP
|
||||
#endif // BOOST_SERIALIZATION_BOOST_SERIALIZATION_UNORDERED_MAP_HPP
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// unordered_set.hpp: serialization for boost unordered_set templates
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2014 Jim Bell
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -26,13 +26,13 @@
|
||||
#include <boost/serialization/archive_input_unordered_set.hpp>
|
||||
#include <boost/serialization/split_free.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
@@ -42,15 +42,15 @@ inline void save(
|
||||
const unsigned int /*file_version*/
|
||||
){
|
||||
boost::serialization::stl::save_unordered_collection<
|
||||
Archive,
|
||||
Archive,
|
||||
boost::unordered_set<Key, HashFcn, EqualKey, Allocator>
|
||||
>(ar, t);
|
||||
}
|
||||
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
@@ -63,7 +63,7 @@ inline void load(
|
||||
Archive,
|
||||
boost::unordered_set<Key, HashFcn, EqualKey, Allocator>,
|
||||
boost::serialization::stl::archive_input_unordered_set<
|
||||
Archive,
|
||||
Archive,
|
||||
boost::unordered_set<Key, HashFcn, EqualKey, Allocator>
|
||||
>
|
||||
>(ar, t);
|
||||
@@ -72,9 +72,9 @@ inline void load(
|
||||
// split non-intrusive serialization function member into separate
|
||||
// non intrusive save/load member functions
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
@@ -88,9 +88,9 @@ inline void serialize(
|
||||
|
||||
// unordered_multiset
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
@@ -100,15 +100,15 @@ inline void save(
|
||||
const unsigned int /*file_version*/
|
||||
){
|
||||
boost::serialization::stl::save_unordered_collection<
|
||||
Archive,
|
||||
Archive,
|
||||
boost::unordered_multiset<Key, HashFcn, EqualKey, Allocator>
|
||||
>(ar, t);
|
||||
}
|
||||
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
@@ -130,9 +130,9 @@ inline void load(
|
||||
// split non-intrusive serialization function member into separate
|
||||
// non intrusive save/load member functions
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
|
||||
125
linx64/include/boost/serialization/collection_size_type copy.hpp
Normal file
125
linx64/include/boost/serialization/collection_size_type copy.hpp
Normal file
@@ -0,0 +1,125 @@
|
||||
#ifndef BOOST_SERIALIZATION_COLLECTION_SIZE_TYPE_HPP
|
||||
#define BOOST_SERIALIZATION_COLLECTION_SIZE_TYPE_HPP
|
||||
|
||||
// (C) Copyright 2005 Matthias Troyer
|
||||
// (C) Copyright 2020 Robert Ramey
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <cstddef> // size_t
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/operators.hpp>
|
||||
#include <boost/serialization/level.hpp>
|
||||
#include <boost/serialization/is_bitwise_serializable.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
template<typename T> // T is the basic type holding the integer
|
||||
struct cardinal_number : private
|
||||
boost::totally_ordered<cardinal_number<T> >,
|
||||
boost::additive<cardinal_number<T> >,
|
||||
boost::unit_steppable<cardinal_number<T> >
|
||||
{
|
||||
private:
|
||||
template<typename CharType, typename Traits>
|
||||
friend std::basic_ostream<CharType, Traits> & operator<<(
|
||||
const std::basic_ostream<CharType, Traits> & bos,
|
||||
const cardinal_number & rhs
|
||||
);
|
||||
template<typename CharType, typename Traits>
|
||||
friend std::basic_istream<CharType, Traits> & operator>>(
|
||||
std::basic_istream<CharType, Traits> & bis,
|
||||
const cardinal_number & rhs
|
||||
);
|
||||
public:
|
||||
T m_t;
|
||||
cardinal_number(T t = 0) :
|
||||
m_t(t)
|
||||
{}
|
||||
cardinal_number(unsigned int t) :
|
||||
m_t(t)
|
||||
{}
|
||||
cardinal_number(int t) :
|
||||
m_t(t)
|
||||
{
|
||||
BOOST_ASSERT(t >= 0);
|
||||
}
|
||||
operator const T (){
|
||||
return m_t;
|
||||
}
|
||||
// assignment operator
|
||||
cardinal_number & operator=(const cardinal_number & rhs){
|
||||
m_t = rhs.m_t;
|
||||
return *this;
|
||||
}
|
||||
// basic operations upon which others depend
|
||||
// totally ordered / less_than_comparable
|
||||
bool operator<(const cardinal_number & rhs) const {
|
||||
return m_t < rhs.m_t;
|
||||
}
|
||||
bool operator==(const cardinal_number & rhs) const {
|
||||
return m_t == rhs.m_t;
|
||||
}
|
||||
// additive
|
||||
cardinal_number & operator+=(const cardinal_number & rhs){
|
||||
m_t += rhs.m_t;
|
||||
return *this;
|
||||
}
|
||||
// subtractive
|
||||
cardinal_number & operator-=(const cardinal_number & rhs){
|
||||
BOOST_ASSERT(m_t >= rhs.m_t);
|
||||
m_t -= rhs.m_t;
|
||||
return *this;
|
||||
}
|
||||
// increment
|
||||
cardinal_number operator++(){
|
||||
++m_t;
|
||||
return *this;
|
||||
}
|
||||
// decrement
|
||||
cardinal_number operator--(){
|
||||
BOOST_ASSERT(m_t > T(0));
|
||||
--m_t;
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
typedef cardinal_number<std::size_t> collection_size_type;
|
||||
|
||||
} } // end namespace boost::serialization
|
||||
|
||||
#include <ostream>
|
||||
#include <istream>
|
||||
|
||||
namespace std {
|
||||
|
||||
template<typename CharType, typename Traits>
|
||||
basic_ostream<CharType, Traits> & operator<<(
|
||||
std::basic_ostream<CharType, Traits> & bos,
|
||||
const boost::serialization::collection_size_type & rhs
|
||||
){
|
||||
bos << rhs.m_t;
|
||||
return bos;
|
||||
}
|
||||
|
||||
template<typename CharType, typename Traits>
|
||||
basic_istream<CharType, Traits> & operator>>(
|
||||
std::basic_istream<CharType, Traits> & bis,
|
||||
boost::serialization::collection_size_type & rhs
|
||||
){
|
||||
bis >> rhs.m_t;
|
||||
return bis;
|
||||
}
|
||||
|
||||
} // std
|
||||
|
||||
BOOST_CLASS_IMPLEMENTATION( \
|
||||
boost::serialization::collection_size_type, \
|
||||
primitive_type \
|
||||
)
|
||||
BOOST_IS_BITWISE_SERIALIZABLE(boost::serialization::collection_size_type)
|
||||
|
||||
#endif //BOOST_SERIALIZATION_COLLECTION_SIZE_TYPE_HPP
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <boost/serialization/split_free.hpp>
|
||||
#include <boost/serialization/is_bitwise_serializable.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
//BOOST_STRONG_TYPEDEF(std::size_t, collection_size_type)
|
||||
@@ -22,35 +22,35 @@ private:
|
||||
typedef std::size_t base_type;
|
||||
base_type t;
|
||||
public:
|
||||
collection_size_type(): t(0) {};
|
||||
explicit collection_size_type(const std::size_t & t_) :
|
||||
collection_size_type(): t(0) {}
|
||||
explicit collection_size_type(const std::size_t & t_) :
|
||||
t(t_)
|
||||
{}
|
||||
collection_size_type(const collection_size_type & t_) :
|
||||
collection_size_type(const collection_size_type & t_) :
|
||||
t(t_.t)
|
||||
{}
|
||||
collection_size_type & operator=(const collection_size_type & rhs){
|
||||
t = rhs.t;
|
||||
t = rhs.t;
|
||||
return *this;
|
||||
}
|
||||
collection_size_type & operator=(const unsigned int & rhs){
|
||||
t = rhs;
|
||||
t = rhs;
|
||||
return *this;
|
||||
}
|
||||
// used for text output
|
||||
operator base_type () const {
|
||||
return t;
|
||||
}
|
||||
}
|
||||
// used for text input
|
||||
operator base_type & () {
|
||||
return t;
|
||||
}
|
||||
}
|
||||
bool operator==(const collection_size_type & rhs) const {
|
||||
return t == rhs.t;
|
||||
}
|
||||
}
|
||||
bool operator<(const collection_size_type & rhs) const {
|
||||
return t < rhs.t;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// collection_traits.hpp:
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -23,7 +23,6 @@
|
||||
// exists for archives to be non-portable if class information for primitive
|
||||
// types is included. This is addressed by the following macros.
|
||||
#include <boost/config.hpp>
|
||||
//#include <boost/mpl/integral_c.hpp>
|
||||
#include <boost/mpl/integral_c_tag.hpp>
|
||||
|
||||
#include <boost/cstdint.hpp>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// collections_load_imp.hpp: serialization for loading stl collections
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -26,13 +26,12 @@
|
||||
#include <cstddef> // size_t
|
||||
#include <boost/config.hpp> // msvc 6.0 needs this for warning suppression
|
||||
#if defined(BOOST_NO_STDC_NAMESPACE)
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
} // namespace std
|
||||
#endif
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
#include <boost/archive/detail/basic_iarchive.hpp>
|
||||
#include <boost/serialization/access.hpp>
|
||||
#include <boost/serialization/nvp.hpp>
|
||||
#include <boost/serialization/detail/stack_constructor.hpp>
|
||||
@@ -95,11 +94,11 @@ collection_load_impl(
|
||||
detail::stack_construct<Archive, typename T::value_type> u(ar, item_version);
|
||||
ar >> boost::serialization::make_nvp("item", u.reference());
|
||||
t.push_back(boost::move(u.reference()));
|
||||
ar.reset_object_address(& t.back() , & u.reference());
|
||||
ar.reset_object_address(& t.back() , u.address());
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace stl
|
||||
} // namespace stl
|
||||
} // namespace serialization
|
||||
} // namespace boost
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// collections_save_imp.hpp: serialization for stl collections
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -45,22 +45,14 @@ inline void save_collection(
|
||||
const item_version_type item_version(
|
||||
version<typename Container::value_type>::value
|
||||
);
|
||||
#if 0
|
||||
boost::archive::library_version_type library_version(
|
||||
ar.get_library_version()
|
||||
);
|
||||
if(boost::archive::library_version_type(3) < library_version){
|
||||
ar << BOOST_SERIALIZATION_NVP(item_version);
|
||||
}
|
||||
#else
|
||||
ar << BOOST_SERIALIZATION_NVP(item_version);
|
||||
#endif
|
||||
|
||||
ar << BOOST_SERIALIZATION_NVP(item_version);
|
||||
|
||||
typename Container::const_iterator it = s.begin();
|
||||
while(count-- > 0){
|
||||
// note borland emits a no-op without the explicit namespace
|
||||
boost::serialization::save_construct_data_adl(
|
||||
ar,
|
||||
ar,
|
||||
boost::addressof(*it),
|
||||
item_version
|
||||
);
|
||||
@@ -76,7 +68,7 @@ inline void save_collection(Archive & ar, const Container &s)
|
||||
save_collection(ar, s, count);
|
||||
}
|
||||
|
||||
} // namespace stl
|
||||
} // namespace stl
|
||||
} // namespace serialization
|
||||
} // namespace boost
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
// serialization/utility.hpp:
|
||||
// serialization for stl utility templates
|
||||
|
||||
// (C) Copyright 2007 Matthias Troyer .
|
||||
// (C) Copyright 2007 Matthias Troyer .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -24,14 +24,14 @@
|
||||
#include <boost/serialization/is_bitwise_serializable.hpp>
|
||||
#include <boost/serialization/split_free.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
template<class Archive, class T>
|
||||
inline void serialize(
|
||||
Archive & ar,
|
||||
std::complex< T > & t,
|
||||
const unsigned int file_version
|
||||
const unsigned int file_version
|
||||
){
|
||||
boost::serialization::split_free(ar, t, file_version);
|
||||
}
|
||||
@@ -52,7 +52,7 @@ template<class Archive, class T>
|
||||
inline void load(
|
||||
Archive & ar,
|
||||
std::complex< T >& t,
|
||||
const unsigned int /* file_version */
|
||||
const unsigned int /* file_version */
|
||||
){
|
||||
T re;
|
||||
T im;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
// See library home page at http://www.boost.org/libs/serialization
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
// This header implements separate compilation features as described in
|
||||
// http://www.boost.org/more/separate_compilation.html
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
// note: this version incorporates the related code into the the
|
||||
// note: this version incorporates the related code into the the
|
||||
// the same library as BOOST_ARCHIVE. This could change some day in the
|
||||
// future
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
#define BOOST_SERIALIZATION_DECL
|
||||
#endif
|
||||
|
||||
// enable automatic library variant selection ------------------------------//
|
||||
// enable automatic library variant selection ------------------------------//
|
||||
|
||||
#if !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_SERIALIZATION_NO_LIB) \
|
||||
&& !defined(BOOST_ARCHIVE_SOURCE) && !defined(BOOST_WARCHIVE_SOURCE) \
|
||||
@@ -69,6 +69,6 @@
|
||||
//
|
||||
#include <boost/config/auto_link.hpp>
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // BOOST_SERIALIZATION_CONFIG_HPP
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// deque.hpp
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -20,13 +20,12 @@
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#include <boost/archive/basic_archive.hpp>
|
||||
|
||||
#include <boost/serialization/library_version_type.hpp>
|
||||
#include <boost/serialization/collections_save_imp.hpp>
|
||||
#include <boost/serialization/collections_load_imp.hpp>
|
||||
#include <boost/serialization/split_free.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
template<class Archive, class U, class Allocator>
|
||||
@@ -36,7 +35,7 @@ inline void save(
|
||||
const unsigned int /* file_version */
|
||||
){
|
||||
boost::serialization::stl::save_collection<
|
||||
Archive, std::deque<U, Allocator>
|
||||
Archive, std::deque<U, Allocator>
|
||||
>(ar, t);
|
||||
}
|
||||
|
||||
@@ -46,14 +45,14 @@ inline void load(
|
||||
std::deque<U, Allocator> &t,
|
||||
const unsigned int /* file_version */
|
||||
){
|
||||
const boost::archive::library_version_type library_version(
|
||||
const boost::serialization::library_version_type library_version(
|
||||
ar.get_library_version()
|
||||
);
|
||||
// retrieve number of elements
|
||||
item_version_type item_version(0);
|
||||
collection_size_type count;
|
||||
ar >> BOOST_SERIALIZATION_NVP(count);
|
||||
if(boost::archive::library_version_type(3) < library_version){
|
||||
if(boost::serialization::library_version_type(3) < library_version){
|
||||
ar >> BOOST_SERIALIZATION_NVP(item_version);
|
||||
}
|
||||
stl::collection_load_impl(ar, t, count, item_version);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// is_default_constructible.hpp: serialization for loading stl collections
|
||||
//
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
|
||||
#include <boost/config.hpp> // msvc 6.0 needs this for warning suppression
|
||||
#if defined(BOOST_NO_STDC_NAMESPACE)
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
} // namespace std
|
||||
#endif
|
||||
|
||||
@@ -357,7 +357,7 @@ public:
|
||||
template<class Y>
|
||||
explicit shared_count(std::auto_ptr<Y> & r): pi_(
|
||||
new sp_counted_base_impl<
|
||||
Y *,
|
||||
Y *,
|
||||
boost::checked_deleter<Y>
|
||||
>(r.get(), boost::checked_deleter<Y>()))
|
||||
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
|
||||
@@ -367,7 +367,7 @@ public:
|
||||
r.release();
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
~shared_count() // nothrow
|
||||
{
|
||||
|
||||
@@ -251,7 +251,7 @@ public:
|
||||
BOOST_ASSERT(px != 0);
|
||||
return px;
|
||||
}
|
||||
|
||||
|
||||
T * get() const // never throws
|
||||
{
|
||||
return px;
|
||||
@@ -268,13 +268,13 @@ public:
|
||||
|
||||
#elif defined(__MWERKS__) && BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003))
|
||||
typedef T * (this_type::*unspecified_bool_type)() const;
|
||||
|
||||
|
||||
operator unspecified_bool_type() const // never throws
|
||||
{
|
||||
return px == 0? 0: &this_type::get;
|
||||
}
|
||||
|
||||
#else
|
||||
#else
|
||||
|
||||
typedef T * this_type::*unspecified_bool_type;
|
||||
|
||||
@@ -436,7 +436,7 @@ template<class D, class T> D * get_deleter(shared_ptr< T > const & p)
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // #if defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(BOOST_MSVC6_MEMBER_TEMPLATES)
|
||||
|
||||
|
||||
@@ -92,10 +92,10 @@ public:
|
||||
#ifndef BOOST_NO_AUTO_PTR
|
||||
|
||||
explicit shared_ptr(std::auto_ptr< T > & r)
|
||||
{
|
||||
{
|
||||
pn = new count_type(1); // may throw
|
||||
px = r.release(); // fix: moved here to stop leak if new throws
|
||||
}
|
||||
}
|
||||
|
||||
shared_ptr & operator=(std::auto_ptr< T > & r)
|
||||
{
|
||||
@@ -137,7 +137,7 @@ public:
|
||||
{
|
||||
return *pn == 1;
|
||||
}
|
||||
|
||||
|
||||
void swap(shared_ptr< T > & other) // never throws
|
||||
{
|
||||
std::swap(px, other.px);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// stack_constructor.hpp: serialization for loading stl collections
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -25,18 +25,18 @@ namespace detail {
|
||||
|
||||
// reserve space on stack for an object of type T without actually
|
||||
// construction such an object
|
||||
template<typename T >
|
||||
template<typename T >
|
||||
struct stack_allocate
|
||||
{
|
||||
T * address() {
|
||||
return static_cast<T*>(storage_.address());
|
||||
return static_cast<T*>(storage_.address());
|
||||
}
|
||||
T & reference() {
|
||||
return * address();
|
||||
}
|
||||
private:
|
||||
typedef typename boost::aligned_storage<
|
||||
sizeof(T),
|
||||
sizeof(T),
|
||||
boost::alignment_of<T>::value
|
||||
> type;
|
||||
type storage_;
|
||||
@@ -49,8 +49,8 @@ struct stack_construct : public stack_allocate<T>
|
||||
stack_construct(Archive & ar, const unsigned int version){
|
||||
// note borland emits a no-op without the explicit namespace
|
||||
boost::serialization::load_construct_data_adl(
|
||||
ar,
|
||||
this->address(),
|
||||
ar,
|
||||
this->address(),
|
||||
version
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
#ifndef BOOST_SERIALIZATION_EPHEMERAL_HPP
|
||||
#define BOOST_SERIALIZATION_EPHEMERAL_HPP
|
||||
|
||||
// MS compatible compilers support
|
||||
#if defined(_MSC_VER)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// ephemeral_object.hpp: interface for serialization system.
|
||||
|
||||
// (C) Copyright 2007 Matthias Troyer.
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
#include <boost/mpl/integral_c.hpp>
|
||||
#include <boost/mpl/integral_c_tag.hpp>
|
||||
|
||||
#include <boost/serialization/level.hpp>
|
||||
#include <boost/serialization/tracking.hpp>
|
||||
#include <boost/serialization/split_member.hpp>
|
||||
#include <boost/serialization/base_object.hpp>
|
||||
#include <boost/serialization/traits.hpp>
|
||||
#include <boost/serialization/wrapper.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
template<class T>
|
||||
struct ephemeral_object :
|
||||
public wrapper_traits<ephemeral_object<T> >
|
||||
{
|
||||
explicit ephemeral_object(T& t) :
|
||||
val(t)
|
||||
{}
|
||||
|
||||
T & value() const {
|
||||
return val;
|
||||
}
|
||||
|
||||
const T & const_value() const {
|
||||
return val;
|
||||
}
|
||||
|
||||
template<class Archive>
|
||||
void serialize(Archive &ar, const unsigned int) const
|
||||
{
|
||||
ar & val;
|
||||
}
|
||||
|
||||
private:
|
||||
T & val;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
inline
|
||||
const ephemeral_object<T> ephemeral(const char * name, T & t){
|
||||
return ephemeral_object<T>(name, t);
|
||||
}
|
||||
|
||||
} // seralization
|
||||
} // boost
|
||||
|
||||
#endif // BOOST_SERIALIZATION_EPHEMERAL_HPP
|
||||
@@ -60,14 +60,14 @@ struct export_impl
|
||||
static const basic_pointer_iserializer &
|
||||
enable_load(mpl::true_){
|
||||
return boost::serialization::singleton<
|
||||
pointer_iserializer<Archive, Serializable>
|
||||
pointer_iserializer<Archive, Serializable>
|
||||
>::get_const_instance();
|
||||
}
|
||||
|
||||
static const basic_pointer_oserializer &
|
||||
enable_save(mpl::true_){
|
||||
return boost::serialization::singleton<
|
||||
pointer_oserializer<Archive, Serializable>
|
||||
pointer_oserializer<Archive, Serializable>
|
||||
>::get_const_instance();
|
||||
}
|
||||
inline static void enable_load(mpl::false_) {}
|
||||
@@ -93,7 +93,7 @@ struct ptr_serialization_support
|
||||
};
|
||||
|
||||
template <class Archive, class Serializable>
|
||||
BOOST_DLLEXPORT void
|
||||
BOOST_DLLEXPORT void
|
||||
ptr_serialization_support<Archive,Serializable>::instantiate()
|
||||
{
|
||||
export_impl<Archive,Serializable>::enable_save(
|
||||
@@ -199,7 +199,7 @@ namespace { \
|
||||
|
||||
# define BOOST_SERIALIZATION_MWERKS_BASE_AND_DERIVED(Base,Derived)
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// check for unnecessary export. T isn't polymorphic so there is no
|
||||
// need to export it.
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// extended_type_info.hpp: interface for portable version of type_info
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
#define BOOST_SERIALIZATION_MAX_KEY_SIZE 128
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
namespace void_cast_detail{
|
||||
@@ -58,7 +58,7 @@ private:
|
||||
protected:
|
||||
BOOST_SERIALIZATION_DECL void key_unregister() const;
|
||||
BOOST_SERIALIZATION_DECL void key_register() const;
|
||||
// this class can't be used as is. It's just the
|
||||
// this class can't be used as is. It's just the
|
||||
// common functionality for all type_info replacement
|
||||
// systems. Hence, make these protected
|
||||
BOOST_SERIALIZATION_DECL extended_type_info(
|
||||
@@ -104,7 +104,7 @@ inline const char * guid(){
|
||||
return ext::guid_impl<T>::call();
|
||||
}
|
||||
|
||||
} // namespace serialization
|
||||
} // namespace serialization
|
||||
} // namespace boost
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
// on runtime typing (rtti - typeid) but uses a user specified string
|
||||
// as the portable class identifier.
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -50,25 +50,25 @@ namespace serialization {
|
||||
|
||||
namespace no_rtti_system {
|
||||
|
||||
// common base class to share type_info_key. This is used to
|
||||
// common base class to share type_info_key. This is used to
|
||||
// identify the method used to keep track of the extended type
|
||||
class BOOST_SYMBOL_VISIBLE extended_type_info_no_rtti_0 :
|
||||
public extended_type_info
|
||||
{
|
||||
protected:
|
||||
BOOST_SERIALIZATION_DECL extended_type_info_no_rtti_0(const char * key);
|
||||
BOOST_SERIALIZATION_DECL ~extended_type_info_no_rtti_0();
|
||||
BOOST_SERIALIZATION_DECL ~extended_type_info_no_rtti_0() BOOST_OVERRIDE;
|
||||
public:
|
||||
virtual BOOST_SERIALIZATION_DECL bool
|
||||
is_less_than(const boost::serialization::extended_type_info &rhs) const ;
|
||||
virtual BOOST_SERIALIZATION_DECL bool
|
||||
is_equal(const boost::serialization::extended_type_info &rhs) const ;
|
||||
BOOST_SERIALIZATION_DECL bool
|
||||
is_less_than(const boost::serialization::extended_type_info &rhs) const BOOST_OVERRIDE;
|
||||
BOOST_SERIALIZATION_DECL bool
|
||||
is_equal(const boost::serialization::extended_type_info &rhs) const BOOST_OVERRIDE;
|
||||
};
|
||||
|
||||
} // no_rtti_system
|
||||
|
||||
template<class T>
|
||||
class extended_type_info_no_rtti :
|
||||
class extended_type_info_no_rtti :
|
||||
public no_rtti_system::extended_type_info_no_rtti_0,
|
||||
public singleton<extended_type_info_no_rtti< T > >
|
||||
{
|
||||
@@ -80,7 +80,7 @@ class extended_type_info_no_rtti :
|
||||
}
|
||||
};
|
||||
struct undefined {
|
||||
// if your program traps here - you failed to
|
||||
// if your program traps here - you failed to
|
||||
// export a guid for this type. the no_rtti
|
||||
// system requires export for types serialized
|
||||
// as pointers.
|
||||
@@ -88,7 +88,7 @@ class extended_type_info_no_rtti :
|
||||
static const char * invoke();
|
||||
};
|
||||
static const char * invoke(){
|
||||
typedef
|
||||
typedef
|
||||
typename boost::mpl::if_c<
|
||||
tf,
|
||||
defined,
|
||||
@@ -103,7 +103,7 @@ public:
|
||||
{
|
||||
key_register();
|
||||
}
|
||||
~extended_type_info_no_rtti(){
|
||||
~extended_type_info_no_rtti() BOOST_OVERRIDE {
|
||||
key_unregister();
|
||||
}
|
||||
const extended_type_info *
|
||||
@@ -112,7 +112,7 @@ public:
|
||||
// this implementation doesn't depend on typeid() but assumes
|
||||
// that the specified type has a function of the following signature.
|
||||
// A common implemention of such a function is to define as a virtual
|
||||
// function. So if the is not a polymporphic type it's likely an error
|
||||
// function. So if the is not a polymorphic type it's likely an error
|
||||
BOOST_STATIC_WARNING(boost::is_polymorphic< T >::value);
|
||||
const char * derived_key = t.get_key();
|
||||
BOOST_ASSERT(NULL != derived_key);
|
||||
@@ -121,10 +121,10 @@ public:
|
||||
const char * get_key() const{
|
||||
return action<guid_defined< T >::value >::invoke();
|
||||
}
|
||||
virtual const char * get_debug_info() const{
|
||||
const char * get_debug_info() const BOOST_OVERRIDE {
|
||||
return action<guid_defined< T >::value >::invoke();
|
||||
}
|
||||
virtual void * construct(unsigned int count, ...) const{
|
||||
void * construct(unsigned int count, ...) const BOOST_OVERRIDE {
|
||||
// count up the arguments
|
||||
std::va_list ap;
|
||||
va_start(ap, count);
|
||||
@@ -145,7 +145,7 @@ public:
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
virtual void destroy(void const * const p) const{
|
||||
void destroy(void const * const p) const BOOST_OVERRIDE {
|
||||
boost::serialization::access::destroy(
|
||||
static_cast<T const *>(p)
|
||||
);
|
||||
@@ -157,7 +157,7 @@ public:
|
||||
} // namespace boost
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// If no other implementation has been designated as default,
|
||||
// If no other implementation has been designated as default,
|
||||
// use this one. To use this implementation as the default, specify it
|
||||
// before any of the other headers.
|
||||
|
||||
@@ -167,7 +167,7 @@ public:
|
||||
namespace serialization {
|
||||
template<class T>
|
||||
struct extended_type_info_impl {
|
||||
typedef typename
|
||||
typedef typename
|
||||
boost::serialization::extended_type_info_no_rtti< T > type;
|
||||
};
|
||||
} // namespace serialization
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
// on runtime typing (rtti - typeid) but uses a user specified string
|
||||
// as the portable class identifier.
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -52,7 +52,7 @@ namespace typeid_system {
|
||||
class BOOST_SYMBOL_VISIBLE extended_type_info_typeid_0 :
|
||||
public extended_type_info
|
||||
{
|
||||
virtual const char * get_debug_info() const {
|
||||
const char * get_debug_info() const BOOST_OVERRIDE {
|
||||
if(static_cast<const std::type_info *>(0) == m_ti)
|
||||
return static_cast<const char *>(0);
|
||||
return m_ti->name();
|
||||
@@ -60,16 +60,16 @@ class BOOST_SYMBOL_VISIBLE extended_type_info_typeid_0 :
|
||||
protected:
|
||||
const std::type_info * m_ti;
|
||||
BOOST_SERIALIZATION_DECL extended_type_info_typeid_0(const char * key);
|
||||
BOOST_SERIALIZATION_DECL ~extended_type_info_typeid_0();
|
||||
BOOST_SERIALIZATION_DECL ~extended_type_info_typeid_0() BOOST_OVERRIDE;
|
||||
BOOST_SERIALIZATION_DECL void type_register(const std::type_info & ti);
|
||||
BOOST_SERIALIZATION_DECL void type_unregister();
|
||||
BOOST_SERIALIZATION_DECL const extended_type_info *
|
||||
get_extended_type_info(const std::type_info & ti) const;
|
||||
public:
|
||||
virtual BOOST_SERIALIZATION_DECL bool
|
||||
is_less_than(const extended_type_info &rhs) const;
|
||||
virtual BOOST_SERIALIZATION_DECL bool
|
||||
is_equal(const extended_type_info &rhs) const;
|
||||
BOOST_SERIALIZATION_DECL bool
|
||||
is_less_than(const extended_type_info &rhs) const BOOST_OVERRIDE;
|
||||
BOOST_SERIALIZATION_DECL bool
|
||||
is_equal(const extended_type_info &rhs) const BOOST_OVERRIDE;
|
||||
const std::type_info & get_typeid() const {
|
||||
return *m_ti;
|
||||
}
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
} // typeid_system
|
||||
|
||||
template<class T>
|
||||
class extended_type_info_typeid :
|
||||
class extended_type_info_typeid :
|
||||
public typeid_system::extended_type_info_typeid_0,
|
||||
public singleton<extended_type_info_typeid< T > >
|
||||
{
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
type_register(typeid(T));
|
||||
key_register();
|
||||
}
|
||||
~extended_type_info_typeid(){
|
||||
~extended_type_info_typeid() BOOST_OVERRIDE {
|
||||
key_unregister();
|
||||
type_unregister();
|
||||
}
|
||||
@@ -102,7 +102,7 @@ public:
|
||||
// note: this implementation - based on usage of typeid (rtti)
|
||||
// only does something if the class has at least one virtual function.
|
||||
BOOST_STATIC_WARNING(boost::is_polymorphic< T >::value);
|
||||
return
|
||||
return
|
||||
typeid_system::extended_type_info_typeid_0::get_extended_type_info(
|
||||
typeid(t)
|
||||
);
|
||||
@@ -110,7 +110,7 @@ public:
|
||||
const char * get_key() const {
|
||||
return boost::serialization::guid< T >();
|
||||
}
|
||||
virtual void * construct(unsigned int count, ...) const{
|
||||
void * construct(unsigned int count, ...) const BOOST_OVERRIDE {
|
||||
// count up the arguments
|
||||
std::va_list ap;
|
||||
va_start(ap, count);
|
||||
@@ -131,7 +131,7 @@ public:
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
virtual void destroy(void const * const p) const {
|
||||
void destroy(void const * const p) const BOOST_OVERRIDE {
|
||||
boost::serialization::access::destroy(
|
||||
static_cast<T const *>(p)
|
||||
);
|
||||
@@ -143,7 +143,7 @@ public:
|
||||
} // namespace boost
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// If no other implementation has been designated as default,
|
||||
// If no other implementation has been designated as default,
|
||||
// use this one. To use this implementation as the default, specify it
|
||||
// before any of the other headers.
|
||||
#ifndef BOOST_SERIALIZATION_DEFAULT_TYPE_INFO
|
||||
@@ -152,7 +152,7 @@ public:
|
||||
namespace serialization {
|
||||
template<class T>
|
||||
struct extended_type_info_impl {
|
||||
typedef typename
|
||||
typedef typename
|
||||
boost::serialization::extended_type_info_typeid< T > type;
|
||||
};
|
||||
} // namespace serialization
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
// factory.hpp: create an instance from an extended_type_info instance.
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <cstdarg> // valist
|
||||
#include <cstddef> // NULL
|
||||
|
||||
#include <boost/preprocessor/control/if.hpp>
|
||||
#include <boost/preprocessor/control/if.hpp>
|
||||
#include <boost/preprocessor/comparison/greater.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// force_include.hpp:
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// forward_list.hpp
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -23,16 +23,16 @@
|
||||
|
||||
#include <boost/serialization/collections_save_imp.hpp>
|
||||
#include <boost/serialization/collections_load_imp.hpp>
|
||||
#include <boost/archive/detail/basic_iarchive.hpp>
|
||||
#include <boost/serialization/nvp.hpp>
|
||||
#include <boost/serialization/collection_size_type.hpp>
|
||||
#include <boost/serialization/item_version_type.hpp>
|
||||
#include <boost/serialization/library_version_type.hpp>
|
||||
#include <boost/serialization/split_free.hpp>
|
||||
#include <boost/serialization/detail/stack_constructor.hpp>
|
||||
#include <boost/serialization/detail/is_default_constructible.hpp>
|
||||
#include <boost/move/utility_core.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
template<class Archive, class U, class Allocator>
|
||||
@@ -90,14 +90,14 @@ inline void load(
|
||||
std::forward_list<U, Allocator> &t,
|
||||
const unsigned int /*file_version*/
|
||||
){
|
||||
const boost::archive::library_version_type library_version(
|
||||
const boost::serialization::library_version_type library_version(
|
||||
ar.get_library_version()
|
||||
);
|
||||
// retrieve number of elements
|
||||
item_version_type item_version(0);
|
||||
collection_size_type count;
|
||||
ar >> BOOST_SERIALIZATION_NVP(count);
|
||||
if(boost::archive::library_version_type(3) < library_version){
|
||||
if(boost::serialization::library_version_type(3) < library_version){
|
||||
ar >> BOOST_SERIALIZATION_NVP(item_version);
|
||||
}
|
||||
stl::collection_load_impl(ar, t, count, item_version);
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// hash_collections_load_imp.hpp: serialization for loading stl collections
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -19,10 +19,10 @@
|
||||
|
||||
// helper function templates for serialization of hashed collections
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/archive/detail/basic_iarchive.hpp>
|
||||
#include <boost/serialization/nvp.hpp>
|
||||
#include <boost/serialization/collection_size_type.hpp>
|
||||
#include <boost/serialization/item_version_type.hpp>
|
||||
#include <boost/serialization/library_version_type.hpp>
|
||||
|
||||
namespace boost{
|
||||
namespace serialization {
|
||||
@@ -37,11 +37,11 @@ inline void load_hash_collection(Archive & ar, Container &s)
|
||||
collection_size_type count;
|
||||
collection_size_type bucket_count;
|
||||
boost::serialization::item_version_type item_version(0);
|
||||
boost::archive::library_version_type library_version(
|
||||
boost::serialization::library_version_type library_version(
|
||||
ar.get_library_version()
|
||||
);
|
||||
// retrieve number of elements
|
||||
if(boost::archive::library_version_type(6) != library_version){
|
||||
if(boost::serialization::library_version_type(6) != library_version){
|
||||
ar >> BOOST_SERIALIZATION_NVP(count);
|
||||
ar >> BOOST_SERIALIZATION_NVP(bucket_count);
|
||||
}
|
||||
@@ -57,7 +57,7 @@ inline void load_hash_collection(Archive & ar, Container &s)
|
||||
ar >> BOOST_SERIALIZATION_NVP(bc);
|
||||
bucket_count = bc;
|
||||
}
|
||||
if(boost::archive::library_version_type(3) < library_version){
|
||||
if(boost::serialization::library_version_type(3) < library_version){
|
||||
ar >> BOOST_SERIALIZATION_NVP(item_version);
|
||||
}
|
||||
s.clear();
|
||||
@@ -70,7 +70,7 @@ inline void load_hash_collection(Archive & ar, Container &s)
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace stl
|
||||
} // namespace stl
|
||||
} // namespace serialization
|
||||
} // namespace boost
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// hash_collections_save_imp.hpp: serialization for stl collections
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -21,9 +21,9 @@
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/serialization/nvp.hpp>
|
||||
#include <boost/serialization/serialization.hpp>
|
||||
#include <boost/serialization/version.hpp>
|
||||
#include <boost/serialization/collection_size_type.hpp>
|
||||
#include <boost/serialization/item_version_type.hpp>
|
||||
#include <boost/serialization/library_version_type.hpp>
|
||||
|
||||
namespace boost{
|
||||
namespace serialization {
|
||||
@@ -46,11 +46,11 @@ inline void save_hash_collection(Archive & ar, const Container &s)
|
||||
/* should only be necessary to create archives of previous versions
|
||||
* which is not currently supported. So for now comment this out
|
||||
*/
|
||||
boost::archive::library_version_type library_version(
|
||||
boost::serialization::library_version_type library_version(
|
||||
ar.get_library_version()
|
||||
);
|
||||
// retrieve number of elements
|
||||
if(boost::archive::library_version_type(6) != library_version){
|
||||
if(boost::serialization::library_version_type(6) != library_version){
|
||||
ar << BOOST_SERIALIZATION_NVP(count);
|
||||
ar << BOOST_SERIALIZATION_NVP(bucket_count);
|
||||
}
|
||||
@@ -64,7 +64,7 @@ inline void save_hash_collection(Archive & ar, const Container &s)
|
||||
ar << BOOST_SERIALIZATION_NVP(c);
|
||||
ar << BOOST_SERIALIZATION_NVP(bc);
|
||||
}
|
||||
if(boost::archive::library_version_type(3) < library_version){
|
||||
if(boost::serialization::library_version_type(3) < library_version){
|
||||
// record number of elements
|
||||
// make sure the target type is registered so we can retrieve
|
||||
// the version when we load
|
||||
@@ -80,8 +80,8 @@ inline void save_hash_collection(Archive & ar, const Container &s)
|
||||
while(count-- > 0){
|
||||
// note borland emits a no-op without the explicit namespace
|
||||
boost::serialization::save_construct_data_adl(
|
||||
ar,
|
||||
&(*it),
|
||||
ar,
|
||||
&(*it),
|
||||
boost::serialization::version<
|
||||
typename Container::value_type
|
||||
>::value
|
||||
@@ -90,7 +90,7 @@ inline void save_hash_collection(Archive & ar, const Container &s)
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace stl
|
||||
} // namespace stl
|
||||
} // namespace serialization
|
||||
} // namespace boost
|
||||
|
||||
|
||||
@@ -7,10 +7,9 @@
|
||||
#endif
|
||||
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// serialization/hash_map.hpp:
|
||||
// serialization for stl hash_map templates
|
||||
// hash_map.hpp: serialization for stl hash_map templates
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -21,35 +20,36 @@
|
||||
#ifdef BOOST_HAS_HASH
|
||||
#include BOOST_HASH_MAP_HEADER
|
||||
|
||||
#include <boost/serialization/utility.hpp>
|
||||
#include <boost/serialization/utility.hpp> // pair
|
||||
#include <boost/serialization/hash_collections_save_imp.hpp>
|
||||
#include <boost/serialization/hash_collections_load_imp.hpp>
|
||||
#include <boost/serialization/split_free.hpp>
|
||||
#include <boost/serialization/detail/stack_constructor.hpp>
|
||||
#include <boost/move/utility_core.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
namespace stl {
|
||||
|
||||
// map input
|
||||
// hash_map input
|
||||
template<class Archive, class Container>
|
||||
struct archive_input_hash_map
|
||||
{
|
||||
inline void operator()(
|
||||
Archive &ar,
|
||||
Container &s,
|
||||
Archive &ar,
|
||||
Container &s,
|
||||
const unsigned int v
|
||||
){
|
||||
typedef typename Container::value_type type;
|
||||
detail::stack_construct<Archive, type> t(ar, v);
|
||||
// borland fails silently w/o full namespace
|
||||
ar >> boost::serialization::make_nvp("item", t.reference());
|
||||
std::pair<typename Container::const_iterator, bool> result =
|
||||
std::pair<typename Container::const_iterator, bool> result =
|
||||
s.insert(boost::move(t.reference()));
|
||||
// note: the following presumes that the map::value_type was NOT tracked
|
||||
// in the archive. This is the usual case, but here there is no way
|
||||
// to determine that.
|
||||
// to determine that.
|
||||
if(result.second){
|
||||
ar.reset_object_address(
|
||||
& (result.first->second),
|
||||
@@ -59,24 +59,24 @@ struct archive_input_hash_map
|
||||
}
|
||||
};
|
||||
|
||||
// multimap input
|
||||
// hash_multimap input
|
||||
template<class Archive, class Container>
|
||||
struct archive_input_hash_multimap
|
||||
{
|
||||
inline void operator()(
|
||||
Archive &ar,
|
||||
Container &s,
|
||||
Archive &ar,
|
||||
Container &s,
|
||||
const unsigned int v
|
||||
){
|
||||
typedef typename Container::value_type type;
|
||||
detail::stack_construct<Archive, type> t(ar, v);
|
||||
// borland fails silently w/o full namespace
|
||||
ar >> boost::serialization::make_nvp("item", t.reference());
|
||||
typename Container::const_iterator result
|
||||
typename Container::const_iterator result
|
||||
= s.insert(boost::move(t.reference()));
|
||||
// note: the following presumes that the map::value_type was NOT tracked
|
||||
// in the archive. This is the usual case, but here there is no way
|
||||
// to determine that.
|
||||
// to determine that.
|
||||
ar.reset_object_address(
|
||||
& result->second,
|
||||
& t.reference()
|
||||
@@ -87,50 +87,52 @@ struct archive_input_hash_multimap
|
||||
} // stl
|
||||
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class T,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
inline void save(
|
||||
Archive & ar,
|
||||
const BOOST_STD_EXTENSION_NAMESPACE::hash_map<
|
||||
Key, HashFcn, EqualKey, Allocator
|
||||
Key, T, HashFcn, EqualKey, Allocator
|
||||
> &t,
|
||||
const unsigned int file_version
|
||||
){
|
||||
boost::serialization::stl::save_hash_collection<
|
||||
Archive,
|
||||
Archive,
|
||||
BOOST_STD_EXTENSION_NAMESPACE::hash_map<
|
||||
Key, HashFcn, EqualKey, Allocator
|
||||
Key, T, HashFcn, EqualKey, Allocator
|
||||
>
|
||||
>(ar, t);
|
||||
}
|
||||
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class T,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
inline void load(
|
||||
Archive & ar,
|
||||
BOOST_STD_EXTENSION_NAMESPACE::hash_map<
|
||||
Key, HashFcn, EqualKey, Allocator
|
||||
Key, T, HashFcn, EqualKey, Allocator
|
||||
> &t,
|
||||
const unsigned int file_version
|
||||
){
|
||||
boost::serialization::stl::load_hash_collection<
|
||||
Archive,
|
||||
BOOST_STD_EXTENSION_NAMESPACE::hash_map<
|
||||
Key, HashFcn, EqualKey, Allocator
|
||||
Key, T, HashFcn, EqualKey, Allocator
|
||||
>,
|
||||
boost::serialization::stl::archive_input_hash_map<
|
||||
Archive,
|
||||
Archive,
|
||||
BOOST_STD_EXTENSION_NAMESPACE::hash_map<
|
||||
Key, HashFcn, EqualKey, Allocator
|
||||
Key, T, HashFcn, EqualKey, Allocator
|
||||
>
|
||||
>
|
||||
>(ar, t);
|
||||
@@ -139,16 +141,17 @@ inline void load(
|
||||
// split non-intrusive serialization function member into separate
|
||||
// non intrusive save/load member functions
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class T,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
inline void serialize(
|
||||
Archive & ar,
|
||||
BOOST_STD_EXTENSION_NAMESPACE::hash_map<
|
||||
Key, HashFcn, EqualKey, Allocator
|
||||
Key, T, HashFcn, EqualKey, Allocator
|
||||
> &t,
|
||||
const unsigned int file_version
|
||||
){
|
||||
@@ -157,50 +160,52 @@ inline void serialize(
|
||||
|
||||
// hash_multimap
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class T,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
inline void save(
|
||||
Archive & ar,
|
||||
const BOOST_STD_EXTENSION_NAMESPACE::hash_multimap<
|
||||
Key, HashFcn, EqualKey, Allocator
|
||||
Key, T, HashFcn, EqualKey, Allocator
|
||||
> &t,
|
||||
const unsigned int file_version
|
||||
){
|
||||
boost::serialization::stl::save_hash_collection<
|
||||
Archive,
|
||||
Archive,
|
||||
BOOST_STD_EXTENSION_NAMESPACE::hash_multimap<
|
||||
Key, HashFcn, EqualKey, Allocator
|
||||
Key, T, HashFcn, EqualKey, Allocator
|
||||
>
|
||||
>(ar, t);
|
||||
}
|
||||
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class T,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
inline void load(
|
||||
Archive & ar,
|
||||
BOOST_STD_EXTENSION_NAMESPACE::hash_multimap<
|
||||
Key, HashFcn, EqualKey, Allocator
|
||||
Key, T, HashFcn, EqualKey, Allocator
|
||||
> &t,
|
||||
const unsigned int file_version
|
||||
){
|
||||
boost::serialization::stl::load_hash_collection<
|
||||
Archive,
|
||||
BOOST_STD_EXTENSION_NAMESPACE::hash_multimap<
|
||||
Key, HashFcn, EqualKey, Allocator
|
||||
Key, T, HashFcn, EqualKey, Allocator
|
||||
>,
|
||||
boost::serialization::stl::archive_input_hash_multimap<
|
||||
Archive,
|
||||
Archive,
|
||||
BOOST_STD_EXTENSION_NAMESPACE::hash_multimap<
|
||||
Key, HashFcn, EqualKey, Allocator
|
||||
Key, T, HashFcn, EqualKey, Allocator
|
||||
>
|
||||
>
|
||||
>(ar, t);
|
||||
@@ -209,16 +214,17 @@ inline void load(
|
||||
// split non-intrusive serialization function member into separate
|
||||
// non intrusive save/load member functions
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class T,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
inline void serialize(
|
||||
Archive & ar,
|
||||
BOOST_STD_EXTENSION_NAMESPACE::hash_multimap<
|
||||
Key, HashFcn, EqualKey, Allocator
|
||||
Key, T, HashFcn, EqualKey, Allocator
|
||||
> &t,
|
||||
const unsigned int file_version
|
||||
){
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// hash_set.hpp: serialization for stl hash_set templates
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -23,9 +23,10 @@
|
||||
#include <boost/serialization/hash_collections_save_imp.hpp>
|
||||
#include <boost/serialization/hash_collections_load_imp.hpp>
|
||||
#include <boost/serialization/split_free.hpp>
|
||||
#include <boost/serialization/detail/stack_constructor.hpp>
|
||||
#include <boost/move/utility_core.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
namespace stl {
|
||||
@@ -35,15 +36,15 @@ template<class Archive, class Container>
|
||||
struct archive_input_hash_set
|
||||
{
|
||||
inline void operator()(
|
||||
Archive &ar,
|
||||
Container &s,
|
||||
Archive &ar,
|
||||
Container &s,
|
||||
const unsigned int v
|
||||
){
|
||||
typedef typename Container::value_type type;
|
||||
detail::stack_construct<Archive, type> t(ar, v);
|
||||
// borland fails silently w/o full namespace
|
||||
ar >> boost::serialization::make_nvp("item", t.reference());
|
||||
std::pair<typename Container::const_iterator, bool> result =
|
||||
std::pair<typename Container::const_iterator, bool> result =
|
||||
s.insert(boost::move(t.reference()));
|
||||
if(result.second)
|
||||
ar.reset_object_address(& (* result.first), & t.reference());
|
||||
@@ -55,15 +56,15 @@ template<class Archive, class Container>
|
||||
struct archive_input_hash_multiset
|
||||
{
|
||||
inline void operator()(
|
||||
Archive &ar,
|
||||
Container &s,
|
||||
Archive &ar,
|
||||
Container &s,
|
||||
const unsigned int v
|
||||
){
|
||||
typedef typename Container::value_type type;
|
||||
detail::stack_construct<Archive, type> t(ar, v);
|
||||
// borland fails silently w/o full namespace
|
||||
ar >> boost::serialization::make_nvp("item", t.reference());
|
||||
typename Container::const_iterator result
|
||||
typename Container::const_iterator result
|
||||
= s.insert(boost::move(t.reference()));
|
||||
ar.reset_object_address(& (* result), & t.reference());
|
||||
}
|
||||
@@ -72,9 +73,9 @@ struct archive_input_hash_multiset
|
||||
} // stl
|
||||
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
@@ -86,17 +87,17 @@ inline void save(
|
||||
const unsigned int file_version
|
||||
){
|
||||
boost::serialization::stl::save_hash_collection<
|
||||
Archive,
|
||||
Archive,
|
||||
BOOST_STD_EXTENSION_NAMESPACE::hash_set<
|
||||
Key, HashFcn, EqualKey, Allocator
|
||||
>
|
||||
>
|
||||
>(ar, t);
|
||||
}
|
||||
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
@@ -113,7 +114,7 @@ inline void load(
|
||||
Key, HashFcn, EqualKey, Allocator
|
||||
>,
|
||||
boost::serialization::stl::archive_input_hash_set<
|
||||
Archive,
|
||||
Archive,
|
||||
BOOST_STD_EXTENSION_NAMESPACE::hash_set<
|
||||
Key, HashFcn, EqualKey, Allocator
|
||||
>
|
||||
@@ -124,9 +125,9 @@ inline void load(
|
||||
// split non-intrusive serialization function member into separate
|
||||
// non intrusive save/load member functions
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
@@ -142,9 +143,9 @@ inline void serialize(
|
||||
|
||||
// hash_multiset
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
@@ -156,17 +157,17 @@ inline void save(
|
||||
const unsigned int file_version
|
||||
){
|
||||
boost::serialization::stl::save_hash_collection<
|
||||
Archive,
|
||||
Archive,
|
||||
BOOST_STD_EXTENSION_NAMESPACE::hash_multiset<
|
||||
Key, HashFcn, EqualKey, Allocator
|
||||
>
|
||||
>
|
||||
>(ar, t);
|
||||
}
|
||||
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
@@ -186,7 +187,7 @@ inline void load(
|
||||
Archive,
|
||||
BOOST_STD_EXTENSION_NAMESPACE::hash_multiset<
|
||||
Key, HashFcn, EqualKey, Allocator
|
||||
>
|
||||
>
|
||||
>
|
||||
>(ar, t);
|
||||
}
|
||||
@@ -194,9 +195,9 @@ inline void load(
|
||||
// split non-intrusive serialization function member into separate
|
||||
// non intrusive save/load member functions
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// fixes broken example build on x86_64-linux-gnu-gcc-4.6.0
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
@@ -28,28 +28,28 @@ private:
|
||||
base_type t;
|
||||
public:
|
||||
// should be private - but MPI fails if it's not!!!
|
||||
item_version_type(): t(0) {};
|
||||
item_version_type(): t(0) {}
|
||||
explicit item_version_type(const unsigned int t_) : t(t_){
|
||||
BOOST_ASSERT(t_ <= boost::integer_traits<base_type>::const_max);
|
||||
}
|
||||
item_version_type(const item_version_type & t_) :
|
||||
item_version_type(const item_version_type & t_) :
|
||||
t(t_.t)
|
||||
{}
|
||||
item_version_type & operator=(item_version_type rhs){
|
||||
t = rhs.t;
|
||||
t = rhs.t;
|
||||
return *this;
|
||||
}
|
||||
// used for text output
|
||||
operator base_type () const {
|
||||
return t;
|
||||
}
|
||||
}
|
||||
// used for text input
|
||||
operator base_type & () {
|
||||
return t;
|
||||
}
|
||||
bool operator==(const item_version_type & rhs) const {
|
||||
return t == rhs.t;
|
||||
}
|
||||
}
|
||||
bool operator<(const item_version_type & rhs) const {
|
||||
return t < rhs.t;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// level.hpp:
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -80,7 +80,7 @@ struct implementation_level_impl {
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct implementation_level :
|
||||
struct implementation_level :
|
||||
public implementation_level_impl<const T>
|
||||
{
|
||||
};
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// level_enum.hpp:
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -37,12 +37,12 @@ enum level_type
|
||||
primitive_type = 1,
|
||||
// Serialize the objects of this type using the objects "serialize"
|
||||
// function or template. This permits values to be written/read
|
||||
// to/from archives but includes no class or version information.
|
||||
// to/from archives but includes no class or version information.
|
||||
object_serializable = 2,
|
||||
///////////////////////////////////////////////////////////////////
|
||||
// once an object is serialized at one of the above levels, the
|
||||
// corresponding archives cannot be read if the implementation level
|
||||
// for the archive object is changed.
|
||||
// for the archive object is changed.
|
||||
///////////////////////////////////////////////////////////////////
|
||||
// Add class information to the archive. Class information includes
|
||||
// implementation level, class version and class name if available
|
||||
|
||||
75
linx64/include/boost/serialization/library_version_type.hpp
Normal file
75
linx64/include/boost/serialization/library_version_type.hpp
Normal file
@@ -0,0 +1,75 @@
|
||||
#ifndef BOOST_SERIALIZATION_LIBRARY_VERSION_TYPE_HPP
|
||||
#define BOOST_SERIALIZATION_LIBRARY_VERSION_TYPE_HPP
|
||||
|
||||
// MS compatible compilers support #pragma once
|
||||
#if defined(_MSC_VER)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// library_version_type.hpp:
|
||||
|
||||
// (C) Copyright 2002-2020 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
#include <cstring> // count
|
||||
#include <boost/cstdint.hpp> // uint_least16_t
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/integer_traits.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning( push )
|
||||
#pragma warning( disable : 4244 4267 )
|
||||
#endif
|
||||
|
||||
/* NOTE : Warning : Warning : Warning : Warning : Warning
|
||||
* Don't ever changes this. If you do, they previously created
|
||||
* binary archives won't be readable !!!
|
||||
*/
|
||||
class library_version_type {
|
||||
private:
|
||||
typedef uint_least16_t base_type;
|
||||
base_type t;
|
||||
public:
|
||||
library_version_type(): t(0) {}
|
||||
explicit library_version_type(const unsigned int & t_) : t(t_){
|
||||
BOOST_ASSERT(t_ <= boost::integer_traits<base_type>::const_max);
|
||||
}
|
||||
library_version_type(const library_version_type & t_) :
|
||||
t(t_.t)
|
||||
{}
|
||||
library_version_type & operator=(const library_version_type & rhs){
|
||||
t = rhs.t;
|
||||
return *this;
|
||||
}
|
||||
// used for text output
|
||||
operator base_type () const {
|
||||
return t;
|
||||
}
|
||||
// used for text input
|
||||
operator base_type & (){
|
||||
return t;
|
||||
}
|
||||
bool operator==(const library_version_type & rhs) const {
|
||||
return t == rhs.t;
|
||||
}
|
||||
bool operator<(const library_version_type & rhs) const {
|
||||
return t < rhs.t;
|
||||
}
|
||||
};
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning( pop )
|
||||
#endif
|
||||
|
||||
} // serialization
|
||||
} // boost
|
||||
|
||||
#endif // BOOST_SERIALIZATION_LIBRARY_VERSION_TYPE_HPP
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// list.hpp: serialization for stl list templates
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -23,14 +23,14 @@
|
||||
#include <boost/serialization/collections_save_imp.hpp>
|
||||
#include <boost/serialization/collections_load_imp.hpp>
|
||||
|
||||
#include <boost/archive/detail/basic_iarchive.hpp>
|
||||
#include <boost/serialization/access.hpp>
|
||||
#include <boost/serialization/nvp.hpp>
|
||||
#include <boost/serialization/collection_size_type.hpp>
|
||||
#include <boost/serialization/item_version_type.hpp>
|
||||
#include <boost/serialization/library_version_type.hpp>
|
||||
#include <boost/serialization/split_free.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
template<class Archive, class U, class Allocator>
|
||||
@@ -40,8 +40,8 @@ inline void save(
|
||||
const unsigned int /* file_version */
|
||||
){
|
||||
boost::serialization::stl::save_collection<
|
||||
Archive,
|
||||
std::list<U, Allocator>
|
||||
Archive,
|
||||
std::list<U, Allocator>
|
||||
>(ar, t);
|
||||
}
|
||||
|
||||
@@ -51,14 +51,14 @@ inline void load(
|
||||
std::list<U, Allocator> &t,
|
||||
const unsigned int /* file_version */
|
||||
){
|
||||
const boost::archive::library_version_type library_version(
|
||||
const boost::serialization::library_version_type library_version(
|
||||
ar.get_library_version()
|
||||
);
|
||||
// retrieve number of elements
|
||||
item_version_type item_version(0);
|
||||
collection_size_type count;
|
||||
ar >> BOOST_SERIALIZATION_NVP(count);
|
||||
if(boost::archive::library_version_type(3) < library_version){
|
||||
if(boost::serialization::library_version_type(3) < library_version){
|
||||
ar >> BOOST_SERIALIZATION_NVP(item_version);
|
||||
}
|
||||
stl::collection_load_impl(ar, t, count, item_version);
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
// serialization/map.hpp:
|
||||
// serialization for stl map templates
|
||||
|
||||
// (C) Copyright 2002-2014 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002-2014 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -21,11 +21,11 @@
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#include <boost/archive/detail/basic_iarchive.hpp>
|
||||
#include <boost/serialization/access.hpp>
|
||||
#include <boost/serialization/nvp.hpp>
|
||||
#include <boost/serialization/collection_size_type.hpp>
|
||||
#include <boost/serialization/item_version_type.hpp>
|
||||
#include <boost/serialization/library_version_type.hpp>
|
||||
#include <boost/serialization/detail/stack_constructor.hpp>
|
||||
|
||||
#include <boost/serialization/utility.hpp>
|
||||
@@ -33,7 +33,7 @@
|
||||
#include <boost/serialization/split_free.hpp>
|
||||
#include <boost/move/utility_core.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
@@ -43,14 +43,14 @@ template<class Archive, class Container>
|
||||
inline void load_map_collection(Archive & ar, Container &s)
|
||||
{
|
||||
s.clear();
|
||||
const boost::archive::library_version_type library_version(
|
||||
const boost::serialization::library_version_type library_version(
|
||||
ar.get_library_version()
|
||||
);
|
||||
// retrieve number of elements
|
||||
item_version_type item_version(0);
|
||||
collection_size_type count;
|
||||
ar >> BOOST_SERIALIZATION_NVP(count);
|
||||
if(boost::archive::library_version_type(3) < library_version){
|
||||
if(boost::serialization::library_version_type(3) < library_version){
|
||||
ar >> BOOST_SERIALIZATION_NVP(item_version);
|
||||
}
|
||||
typename Container::iterator hint;
|
||||
@@ -75,8 +75,8 @@ inline void save(
|
||||
const unsigned int /* file_version */
|
||||
){
|
||||
boost::serialization::stl::save_collection<
|
||||
Archive,
|
||||
std::map<Key, Type, Compare, Allocator>
|
||||
Archive,
|
||||
std::map<Key, Type, Compare, Allocator>
|
||||
>(ar, t);
|
||||
}
|
||||
|
||||
@@ -108,8 +108,8 @@ inline void save(
|
||||
const unsigned int /* file_version */
|
||||
){
|
||||
boost::serialization::stl::save_collection<
|
||||
Archive,
|
||||
std::multimap<Key, Type, Compare, Allocator>
|
||||
Archive,
|
||||
std::multimap<Key, Type, Compare, Allocator>
|
||||
>(ar, t);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,85 +9,61 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// nvp.hpp: interface for serialization system.
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
|
||||
#include <utility>
|
||||
#include <boost/core/nvp.hpp>
|
||||
#include <boost/preprocessor/stringize.hpp>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#define BOOST_SERIALIZATION_NVP(name) \
|
||||
boost::serialization::make_nvp(BOOST_PP_STRINGIZE(name), name)
|
||||
/**/
|
||||
|
||||
#define BOOST_SERIALIZATION_BASE_OBJECT_NVP(name) \
|
||||
boost::serialization::make_nvp( \
|
||||
BOOST_PP_STRINGIZE(name), \
|
||||
boost::serialization::base_object<name >(*this) \
|
||||
)
|
||||
/**/
|
||||
|
||||
#include <boost/serialization/level.hpp>
|
||||
#include <boost/serialization/tracking.hpp>
|
||||
#include <boost/serialization/split_member.hpp>
|
||||
#include <boost/serialization/base_object.hpp>
|
||||
#include <boost/serialization/traits.hpp>
|
||||
#include <boost/serialization/split_free.hpp>
|
||||
#include <boost/serialization/wrapper.hpp>
|
||||
|
||||
#include <boost/core/addressof.hpp>
|
||||
#include <boost/serialization/base_object.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
template<class T>
|
||||
struct nvp :
|
||||
public std::pair<const char *, T *>,
|
||||
public wrapper_traits<const nvp< T > >
|
||||
{
|
||||
//private:
|
||||
nvp(const nvp & rhs) :
|
||||
std::pair<const char *, T *>(rhs.first, rhs.second)
|
||||
{}
|
||||
public:
|
||||
explicit nvp(const char * name_, T & t) :
|
||||
// note: added _ to suppress useless gcc warning
|
||||
std::pair<const char *, T *>(name_, boost::addressof(t))
|
||||
{}
|
||||
|
||||
const char * name() const {
|
||||
return this->first;
|
||||
}
|
||||
T & value() const {
|
||||
return *(this->second);
|
||||
}
|
||||
|
||||
const T & const_value() const {
|
||||
return *(this->second);
|
||||
}
|
||||
|
||||
template<class Archive>
|
||||
void save(
|
||||
Archive & ar,
|
||||
const unsigned int /* file_version */
|
||||
) const {
|
||||
ar.operator<<(const_value());
|
||||
}
|
||||
template<class Archive>
|
||||
void load(
|
||||
Archive & ar,
|
||||
const unsigned int /* file_version */
|
||||
){
|
||||
ar.operator>>(value());
|
||||
}
|
||||
BOOST_SERIALIZATION_SPLIT_MEMBER()
|
||||
};
|
||||
|
||||
template<class T>
|
||||
inline
|
||||
const nvp< T > make_nvp(const char * name, T & t){
|
||||
return nvp< T >(name, t);
|
||||
template<class Archive, class T>
|
||||
void save(
|
||||
Archive & ar,
|
||||
const nvp<T> & t,
|
||||
const unsigned int /* file_version */
|
||||
){
|
||||
ar << t.const_value();
|
||||
}
|
||||
template<class Archive, class T>
|
||||
void load(
|
||||
Archive & ar,
|
||||
nvp<T> & t ,
|
||||
const unsigned int /* file_version */
|
||||
){
|
||||
ar >> t.value();
|
||||
}
|
||||
|
||||
// to maintain efficiency and portability, we want to assign
|
||||
// specific serialization traits to all instances of this wrappers.
|
||||
// we can't strait forward method below as it depends upon
|
||||
// Partial Template Specialization and doing so would mean that wrappers
|
||||
// wouldn't be treated the same on different platforms. This would
|
||||
// break archive portability. Leave this here as reminder not to use it !!!
|
||||
template<class Archive, class T>
|
||||
inline void serialize(
|
||||
Archive & ar,
|
||||
nvp<T> & t,
|
||||
const unsigned int file_version
|
||||
){
|
||||
split_free(ar, t, file_version);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
struct implementation_level<nvp< T > >
|
||||
@@ -96,6 +72,13 @@ struct implementation_level<nvp< T > >
|
||||
typedef mpl::int_<object_serializable> type;
|
||||
BOOST_STATIC_CONSTANT(int, value = implementation_level::type::value);
|
||||
};
|
||||
template <class T>
|
||||
struct implementation_level<const nvp< T > >
|
||||
{
|
||||
typedef mpl::integral_c_tag tag;
|
||||
typedef mpl::int_<object_serializable> type;
|
||||
BOOST_STATIC_CONSTANT(int, value = implementation_level::type::value);
|
||||
};
|
||||
|
||||
// nvp objects are generally created on the stack and are never tracked
|
||||
template<class T>
|
||||
@@ -105,21 +88,46 @@ struct tracking_level<nvp< T > >
|
||||
typedef mpl::int_<track_never> type;
|
||||
BOOST_STATIC_CONSTANT(int, value = tracking_level::type::value);
|
||||
};
|
||||
template<class T>
|
||||
struct tracking_level<const nvp< T > >
|
||||
{
|
||||
typedef mpl::integral_c_tag tag;
|
||||
typedef mpl::int_<track_never> type;
|
||||
BOOST_STATIC_CONSTANT(int, value = tracking_level::type::value);
|
||||
};
|
||||
|
||||
// these traits aren't used by nvp so they don't need to be defined
|
||||
#if 0
|
||||
template<class T>
|
||||
struct version<const nvp< T > > {
|
||||
typedef mpl::integral_c_tag tag;
|
||||
typedef mpl::int_<0> type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
struct version<const nvp< T > > {
|
||||
typedef mpl::integral_c_tag tag;
|
||||
typedef mpl::int_<0> type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct extended_type_info_impl<const nvp< T > > {
|
||||
typedef extended_type_info_impl< T > type;
|
||||
};
|
||||
#endif
|
||||
|
||||
template<class T>
|
||||
struct is_wrapper<const nvp<T> > {
|
||||
typedef boost::mpl::true_ type;
|
||||
};
|
||||
template<class T>
|
||||
struct is_wrapper<nvp<T> > {
|
||||
typedef boost::mpl::true_ type;
|
||||
};
|
||||
|
||||
|
||||
} // seralization
|
||||
} // boost
|
||||
|
||||
#include <boost/preprocessor/stringize.hpp>
|
||||
|
||||
#define BOOST_SERIALIZATION_NVP(name) \
|
||||
boost::serialization::make_nvp(BOOST_PP_STRINGIZE(name), name)
|
||||
/**/
|
||||
|
||||
#define BOOST_SERIALIZATION_BASE_OBJECT_NVP(name) \
|
||||
boost::serialization::make_nvp( \
|
||||
BOOST_PP_STRINGIZE(name), \
|
||||
boost::serialization::base_object<name >(*this) \
|
||||
)
|
||||
/**/
|
||||
|
||||
#endif // BOOST_SERIALIZATION_NVP_HPP
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
|
||||
// (C) Copyright 2002-4 Pavel Vozenilek .
|
||||
// (C) Copyright 2002-4 Pavel Vozenilek .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -16,30 +16,25 @@
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#include <boost/archive/detail/basic_iarchive.hpp>
|
||||
|
||||
#include <boost/optional.hpp>
|
||||
#include <boost/move/utility_core.hpp>
|
||||
|
||||
#include <boost/serialization/item_version_type.hpp>
|
||||
#include <boost/serialization/split_free.hpp>
|
||||
#include <boost/serialization/level.hpp>
|
||||
#include <boost/serialization/nvp.hpp>
|
||||
#include <boost/serialization/library_version_type.hpp>
|
||||
#include <boost/serialization/version.hpp>
|
||||
#include <boost/serialization/split_free.hpp>
|
||||
#include <boost/serialization/nvp.hpp>
|
||||
#include <boost/type_traits/is_pointer.hpp>
|
||||
#include <boost/serialization/detail/stack_constructor.hpp>
|
||||
#include <boost/serialization/detail/is_default_constructible.hpp>
|
||||
#include <boost/serialization/force_include.hpp>
|
||||
|
||||
// function specializations must be defined in the appropriate
|
||||
// namespace - boost::serialization
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
template<class Archive, class T>
|
||||
void save(
|
||||
Archive & ar,
|
||||
const boost::optional< T > & t,
|
||||
Archive & ar,
|
||||
const boost::optional< T > & t,
|
||||
const unsigned int /*version*/
|
||||
){
|
||||
// It is an inherent limitation to the serialization of optional.hpp
|
||||
@@ -62,8 +57,8 @@ void save(
|
||||
|
||||
template<class Archive, class T>
|
||||
void load(
|
||||
Archive & ar,
|
||||
boost::optional< T > & t,
|
||||
Archive & ar,
|
||||
boost::optional< T > & t,
|
||||
const unsigned int version
|
||||
){
|
||||
bool tflag;
|
||||
@@ -75,10 +70,10 @@ void load(
|
||||
|
||||
if(0 == version){
|
||||
boost::serialization::item_version_type item_version(0);
|
||||
boost::archive::library_version_type library_version(
|
||||
boost::serialization::library_version_type library_version(
|
||||
ar.get_library_version()
|
||||
);
|
||||
if(boost::archive::library_version_type(3) < library_version){
|
||||
if(boost::serialization::library_version_type(3) < library_version){
|
||||
ar >> BOOST_SERIALIZATION_NVP(item_version);
|
||||
}
|
||||
}
|
||||
@@ -89,8 +84,8 @@ void load(
|
||||
|
||||
template<class Archive, class T>
|
||||
void serialize(
|
||||
Archive & ar,
|
||||
boost::optional< T > & t,
|
||||
Archive & ar,
|
||||
boost::optional< T > & t,
|
||||
const unsigned int version
|
||||
){
|
||||
boost::serialization::split_free(ar, t, version);
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#define STD std
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
namespace detail{
|
||||
|
||||
@@ -54,7 +54,7 @@ template<class Archive, class T, class Container, class Compare>
|
||||
inline void serialize(
|
||||
Archive & ar,
|
||||
std::priority_queue< T, Container, Compare> & t,
|
||||
const unsigned int file_version
|
||||
const unsigned int file_version
|
||||
){
|
||||
typedef typename mpl::eval_if<
|
||||
typename Archive::is_saving,
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#define STD std
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
namespace detail {
|
||||
|
||||
@@ -54,7 +54,7 @@ template<class Archive, class T, class C>
|
||||
inline void serialize(
|
||||
Archive & ar,
|
||||
std::queue< T, C> & t,
|
||||
const unsigned int file_version
|
||||
const unsigned int file_version
|
||||
){
|
||||
typedef typename mpl::eval_if<
|
||||
typename Archive::is_saving,
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
#include <boost/serialization/nvp.hpp>
|
||||
#include <boost/serialization/split_free.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
|
||||
template<class Archive, class T>
|
||||
void save(
|
||||
Archive & ar,
|
||||
const boost::scoped_ptr< T > & t,
|
||||
Archive & ar,
|
||||
const boost::scoped_ptr< T > & t,
|
||||
const unsigned int /* version */
|
||||
){
|
||||
T* r = t.get();
|
||||
@@ -34,19 +34,19 @@ namespace serialization {
|
||||
|
||||
template<class Archive, class T>
|
||||
void load(
|
||||
Archive & ar,
|
||||
boost::scoped_ptr< T > & t,
|
||||
Archive & ar,
|
||||
boost::scoped_ptr< T > & t,
|
||||
const unsigned int /* version */
|
||||
){
|
||||
T* r;
|
||||
ar >> boost::serialization::make_nvp("scoped_ptr", r);
|
||||
t.reset(r);
|
||||
t.reset(r);
|
||||
}
|
||||
|
||||
template<class Archive, class T>
|
||||
void serialize(
|
||||
Archive& ar,
|
||||
boost::scoped_ptr< T >& t,
|
||||
Archive& ar,
|
||||
boost::scoped_ptr< T >& t,
|
||||
const unsigned int version
|
||||
){
|
||||
boost::serialization::split_free(ar, t, version);
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// serialization.hpp: interface for serialization system.
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -24,7 +24,7 @@
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// public interface to serialization.
|
||||
// public interface to serialization.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// layer 0 - intrusive verison
|
||||
@@ -45,15 +45,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// layer 2 - default implementation of non-intrusive serialization.
|
||||
//
|
||||
// note the usage of function overloading to compensate that C++ does not
|
||||
// currently support Partial Template Specialization for function templates
|
||||
// We have declared the version number as "const unsigned long".
|
||||
// Overriding templates for specific data types should declare the version
|
||||
// number as "const unsigned int". Template matching will first be applied
|
||||
// to functions with the same version types - that is the overloads.
|
||||
// If there is no declared function prototype that matches, the second argument
|
||||
// will be converted to "const unsigned long" and a match will be made with
|
||||
// one of the default template functions below.
|
||||
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
@@ -71,8 +62,8 @@ inline void serialize(
|
||||
// save data required for construction
|
||||
template<class Archive, class T>
|
||||
inline void save_construct_data(
|
||||
Archive & /*ar*/,
|
||||
const T * /*t*/,
|
||||
Archive & /*ar*/,
|
||||
const T * /*t*/,
|
||||
const unsigned int /*file_version */
|
||||
){
|
||||
// default is to save no data because default constructor
|
||||
@@ -82,8 +73,8 @@ inline void save_construct_data(
|
||||
// load data required for construction and invoke constructor in place
|
||||
template<class Archive, class T>
|
||||
inline void load_construct_data(
|
||||
Archive & /*ar*/,
|
||||
T * t,
|
||||
Archive & /*ar*/,
|
||||
T * t,
|
||||
const unsigned int /*file_version*/
|
||||
){
|
||||
// default just uses the default constructor. going
|
||||
@@ -98,10 +89,10 @@ inline void load_construct_data(
|
||||
//
|
||||
// on compilers which don't implement ADL. only the current namespace
|
||||
// i.e. boost::serialization will be searched.
|
||||
//
|
||||
//
|
||||
// on compilers which DO implement ADL
|
||||
// serialize overrides can be in any of the following
|
||||
//
|
||||
//
|
||||
// 1) same namepace as Archive
|
||||
// 2) same namespace as T
|
||||
// 3) boost::serialization
|
||||
@@ -110,37 +101,29 @@ inline void load_construct_data(
|
||||
|
||||
template<class Archive, class T>
|
||||
inline void serialize_adl(
|
||||
Archive & ar,
|
||||
T & t,
|
||||
Archive & ar,
|
||||
T & t,
|
||||
const unsigned int file_version
|
||||
){
|
||||
// note usage of function overloading to delay final resolution
|
||||
// until the point of instantiation. This works around the two-phase
|
||||
// lookup "feature" which inhibits redefintion of a default function
|
||||
// template implementation. Due to Robert Ramey
|
||||
//
|
||||
// Note that this trick generates problems for compiles which don't support
|
||||
// PFTO, suppress it here. As far as we know, there are no compilers
|
||||
// which fail to support PFTO while supporting two-phase lookup.
|
||||
const version_type v(file_version);
|
||||
serialize(ar, t, v);
|
||||
}
|
||||
|
||||
template<class Archive, class T>
|
||||
inline void save_construct_data_adl(
|
||||
Archive & ar,
|
||||
const T * t,
|
||||
Archive & ar,
|
||||
const T * t,
|
||||
const unsigned int file_version
|
||||
){
|
||||
// see above
|
||||
|
||||
const version_type v(file_version);
|
||||
save_construct_data(ar, t, v);
|
||||
}
|
||||
|
||||
template<class Archive, class T>
|
||||
inline void load_construct_data_adl(
|
||||
Archive & ar,
|
||||
T * t,
|
||||
Archive & ar,
|
||||
T * t,
|
||||
const unsigned int file_version
|
||||
){
|
||||
// see above comment
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// set.hpp: serialization for stl set templates
|
||||
|
||||
// (C) Copyright 2002-2014 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002-2014 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -20,32 +20,32 @@
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#include <boost/archive/detail/basic_iarchive.hpp>
|
||||
#include <boost/serialization/access.hpp>
|
||||
#include <boost/serialization/nvp.hpp>
|
||||
#include <boost/serialization/detail/stack_constructor.hpp>
|
||||
#include <boost/serialization/collection_size_type.hpp>
|
||||
#include <boost/serialization/item_version_type.hpp>
|
||||
#include <boost/serialization/library_version_type.hpp>
|
||||
|
||||
#include <boost/serialization/collections_save_imp.hpp>
|
||||
#include <boost/serialization/split_free.hpp>
|
||||
#include <boost/move/utility_core.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
template<class Archive, class Container>
|
||||
inline void load_set_collection(Archive & ar, Container &s)
|
||||
{
|
||||
s.clear();
|
||||
const boost::archive::library_version_type library_version(
|
||||
const boost::serialization::library_version_type library_version(
|
||||
ar.get_library_version()
|
||||
);
|
||||
// retrieve number of elements
|
||||
item_version_type item_version(0);
|
||||
collection_size_type count;
|
||||
ar >> BOOST_SERIALIZATION_NVP(count);
|
||||
if(boost::archive::library_version_type(3) < library_version){
|
||||
if(boost::serialization::library_version_type(3) < library_version){
|
||||
ar >> BOOST_SERIALIZATION_NVP(item_version);
|
||||
}
|
||||
typename Container::iterator hint;
|
||||
@@ -70,7 +70,7 @@ inline void save(
|
||||
const unsigned int /* file_version */
|
||||
){
|
||||
boost::serialization::stl::save_collection<
|
||||
Archive, std::set<Key, Compare, Allocator>
|
||||
Archive, std::set<Key, Compare, Allocator>
|
||||
>(ar, t);
|
||||
}
|
||||
|
||||
@@ -102,8 +102,8 @@ inline void save(
|
||||
const unsigned int /* file_version */
|
||||
){
|
||||
boost::serialization::stl::save_collection<
|
||||
Archive,
|
||||
std::multiset<Key, Compare, Allocator>
|
||||
Archive,
|
||||
std::multiset<Key, Compare, Allocator>
|
||||
>(ar, t);
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
};
|
||||
// don't track shared pointers
|
||||
template<class T>
|
||||
struct tracking_level< ::boost::shared_ptr< T > > {
|
||||
struct tracking_level< ::boost::shared_ptr< T > > {
|
||||
typedef mpl::integral_c_tag tag;
|
||||
#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3206))
|
||||
typedef typename mpl::int_< ::boost::serialization::track_never> type;
|
||||
@@ -160,7 +160,7 @@ inline void load(
|
||||
ar.template get_helper<shared_ptr_helper<boost::shared_ptr> >(
|
||||
shared_ptr_helper_id
|
||||
);
|
||||
h.reset(t,r);
|
||||
h.reset(t,r);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -207,7 +207,7 @@ namespace serialization{
|
||||
};
|
||||
// don't track shared pointers
|
||||
template<class T>
|
||||
struct tracking_level< ::std::shared_ptr< T > > {
|
||||
struct tracking_level< ::std::shared_ptr< T > > {
|
||||
typedef mpl::integral_c_tag tag;
|
||||
typedef mpl::int_< ::boost::serialization::track_never> type;
|
||||
BOOST_STATIC_CONSTANT(int, value = type::value);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// shared_ptr.hpp: serialization for boost shared pointer
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -38,7 +38,7 @@
|
||||
// Maintain a couple of lists of loaded shared pointers of the old previous
|
||||
// version (1.32)
|
||||
|
||||
namespace boost_132 {
|
||||
namespace boost_132 {
|
||||
namespace serialization {
|
||||
namespace detail {
|
||||
|
||||
@@ -53,7 +53,7 @@ struct null_deleter {
|
||||
/////////////////////////////////////////////////////////////
|
||||
// sp_counted_base_impl serialization
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
template<class Archive, class P, class D>
|
||||
@@ -66,7 +66,7 @@ inline void serialize(
|
||||
// its polymorphic base
|
||||
boost::serialization::void_cast_register<
|
||||
boost_132::detail::sp_counted_base_impl<P, D>,
|
||||
boost_132::detail::sp_counted_base
|
||||
boost_132::detail::sp_counted_base
|
||||
>(
|
||||
static_cast<boost_132::detail::sp_counted_base_impl<P, D> *>(NULL),
|
||||
static_cast<boost_132::detail::sp_counted_base *>(NULL)
|
||||
@@ -76,8 +76,8 @@ inline void serialize(
|
||||
template<class Archive, class P, class D>
|
||||
inline void save_construct_data(
|
||||
Archive & ar,
|
||||
const
|
||||
boost_132::detail::sp_counted_base_impl<P, D> *t,
|
||||
const
|
||||
boost_132::detail::sp_counted_base_impl<P, D> *t,
|
||||
const unsigned int /* file_version */
|
||||
){
|
||||
// variables used for construction
|
||||
@@ -87,25 +87,25 @@ inline void save_construct_data(
|
||||
template<class Archive, class P, class D>
|
||||
inline void load_construct_data(
|
||||
Archive & ar,
|
||||
boost_132::detail::sp_counted_base_impl<P, D> * t,
|
||||
boost_132::detail::sp_counted_base_impl<P, D> * t,
|
||||
const unsigned int /* file_version */
|
||||
){
|
||||
P ptr_;
|
||||
ar >> boost::serialization::make_nvp("ptr", ptr_);
|
||||
// ::new(t)boost_132::detail::sp_counted_base_impl<P, D>(ptr_, D());
|
||||
// ::new(t)boost_132::detail::sp_counted_base_impl<P, D>(ptr_, D());
|
||||
// placement
|
||||
// note: the original ::new... above is replaced by the one here. This one
|
||||
// creates all new objects with a null_deleter so that after the archive
|
||||
// is finished loading and the shared_ptrs are destroyed - the underlying
|
||||
// raw pointers are NOT deleted. This is necessary as they are used by the
|
||||
// raw pointers are NOT deleted. This is necessary as they are used by the
|
||||
// new system as well.
|
||||
::new(t)boost_132::detail::sp_counted_base_impl<
|
||||
P,
|
||||
P,
|
||||
boost_132::serialization::detail::null_deleter
|
||||
>(
|
||||
ptr_, boost_132::serialization::detail::null_deleter()
|
||||
); // placement new
|
||||
// compensate for that fact that a new shared count always is
|
||||
// compensate for that fact that a new shared count always is
|
||||
// initialized with one. the add_ref_copy below will increment it
|
||||
// every time its serialized so without this adjustment
|
||||
// the use and weak counts will be off by one.
|
||||
@@ -118,7 +118,7 @@ inline void load_construct_data(
|
||||
/////////////////////////////////////////////////////////////
|
||||
// shared_count serialization
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
template<class Archive>
|
||||
@@ -149,7 +149,7 @@ BOOST_SERIALIZATION_SPLIT_FREE(boost_132::detail::shared_count)
|
||||
/////////////////////////////////////////////////////////////
|
||||
// implement serialization for shared_ptr< T >
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
template<class Archive, class T>
|
||||
@@ -200,7 +200,7 @@ inline void serialize(
|
||||
} // serialization
|
||||
} // namespace boost
|
||||
|
||||
// note: change below uses null_deleter
|
||||
// note: change below uses null_deleter
|
||||
// This macro is used to export GUIDS for shared pointers to allow
|
||||
// the serialization system to export them properly. David Tonge
|
||||
#define BOOST_SHARED_POINTER_EXPORT_GUID(T, K) \
|
||||
|
||||
@@ -101,20 +101,20 @@ public:
|
||||
|
||||
struct non_polymorphic {
|
||||
template<class U>
|
||||
static const boost::serialization::extended_type_info *
|
||||
static const boost::serialization::extended_type_info *
|
||||
get_object_type(U & ){
|
||||
return & boost::serialization::singleton<
|
||||
typename
|
||||
typename
|
||||
boost::serialization::type_info_implementation< U >::type
|
||||
>::get_const_instance();
|
||||
}
|
||||
};
|
||||
struct polymorphic {
|
||||
template<class U>
|
||||
static const boost::serialization::extended_type_info *
|
||||
static const boost::serialization::extended_type_info *
|
||||
get_object_type(U & u){
|
||||
return boost::serialization::singleton<
|
||||
typename
|
||||
typename
|
||||
boost::serialization::type_info_implementation< U >::type
|
||||
>::get_const_instance().get_derived_extended_type_info(u);
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ private:
|
||||
// Unfortunately, this triggers detectors of undefine behavior
|
||||
// and reports an error. But I've been unable to find a different
|
||||
// of guarenteeing that the the singleton is created at pre-main time.
|
||||
use(* m_instance);
|
||||
if (m_instance) use(* m_instance);
|
||||
|
||||
return static_cast<T &>(t);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// slist.hpp
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -22,16 +22,16 @@
|
||||
|
||||
#include <boost/serialization/collections_save_imp.hpp>
|
||||
#include <boost/serialization/collections_load_imp.hpp>
|
||||
#include <boost/archive/detail/basic_iarchive.hpp>
|
||||
#include <boost/serialization/nvp.hpp>
|
||||
#include <boost/serialization/collection_size_type.hpp>
|
||||
#include <boost/serialization/item_version_type.hpp>
|
||||
#include <boost/serialization/library_version_type.hpp>
|
||||
#include <boost/serialization/split_free.hpp>
|
||||
#include <boost/serialization/detail/stack_constructor.hpp>
|
||||
#include <boost/serialization/detail/is_default_constructible.hpp>
|
||||
#include <boost/move/utility_core.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
template<class Archive, class U, class Allocator>
|
||||
@@ -42,7 +42,7 @@ inline void save(
|
||||
){
|
||||
boost::serialization::stl::save_collection<
|
||||
Archive,
|
||||
BOOST_STD_EXTENSION_NAMESPACE::slist<U, Allocator>
|
||||
BOOST_STD_EXTENSION_NAMESPACE::slist<U, Allocator>
|
||||
>(ar, t);
|
||||
}
|
||||
|
||||
@@ -88,14 +88,14 @@ inline void load(
|
||||
BOOST_STD_EXTENSION_NAMESPACE::slist<U, Allocator> &t,
|
||||
const unsigned int file_version
|
||||
){
|
||||
const boost::archive::library_version_type library_version(
|
||||
const boost::serialization::library_version_type library_version(
|
||||
ar.get_library_version()
|
||||
);
|
||||
// retrieve number of elements
|
||||
item_version_type item_version(0);
|
||||
collection_size_type count;
|
||||
ar >> BOOST_SERIALIZATION_NVP(count);
|
||||
if(boost::archive::library_version_type(3) < library_version){
|
||||
if(boost::serialization::library_version_type(3) < library_version){
|
||||
ar >> BOOST_SERIALIZATION_NVP(item_version);
|
||||
}
|
||||
if(detail::is_default_constructible<U>()){
|
||||
|
||||
@@ -9,18 +9,18 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// smart_cast.hpp:
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org/libs/serialization for updates, documentation, and revision history.
|
||||
|
||||
// casting of pointers and references.
|
||||
// casting of pointers and references.
|
||||
|
||||
// In casting between different C++ classes, there are a number of
|
||||
// rules that have to be kept in mind in deciding whether to use
|
||||
// static_cast or dynamic_cast.
|
||||
// static_cast or dynamic_cast.
|
||||
|
||||
// a) dynamic casting can only be applied when one of the types is polymorphic
|
||||
// Otherwise static_cast must be used.
|
||||
@@ -136,7 +136,7 @@ namespace smart_cast_impl {
|
||||
struct pointer {
|
||||
|
||||
struct polymorphic {
|
||||
// unfortunately, this below fails to work for virtual base
|
||||
// unfortunately, this below fails to work for virtual base
|
||||
// classes. need has_virtual_base to do this.
|
||||
// Subject for further study
|
||||
#if 0
|
||||
@@ -220,7 +220,7 @@ namespace smart_cast_impl {
|
||||
template<class T>
|
||||
struct error {
|
||||
// if we get here, its because we are using one argument in the
|
||||
// cast on a system which doesn't support partial template
|
||||
// cast on a system which doesn't support partial template
|
||||
// specialization
|
||||
template<class U>
|
||||
static T cast(U){
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// split_free.hpp:
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -35,8 +35,8 @@ namespace serialization {
|
||||
template<class Archive, class T>
|
||||
struct free_saver {
|
||||
static void invoke(
|
||||
Archive & ar,
|
||||
const T & t,
|
||||
Archive & ar,
|
||||
const T & t,
|
||||
const unsigned int file_version
|
||||
){
|
||||
// use function overload (version_type) to workaround
|
||||
@@ -48,8 +48,8 @@ struct free_saver {
|
||||
template<class Archive, class T>
|
||||
struct free_loader {
|
||||
static void invoke(
|
||||
Archive & ar,
|
||||
T & t,
|
||||
Archive & ar,
|
||||
T & t,
|
||||
const unsigned int file_version
|
||||
){
|
||||
// use function overload (version_type) to workaround
|
||||
@@ -62,13 +62,13 @@ struct free_loader {
|
||||
|
||||
template<class Archive, class T>
|
||||
inline void split_free(
|
||||
Archive & ar,
|
||||
T & t,
|
||||
Archive & ar,
|
||||
T & t,
|
||||
const unsigned int file_version
|
||||
){
|
||||
typedef typename mpl::eval_if<
|
||||
typename Archive::is_saving,
|
||||
mpl::identity</* detail:: */ free_saver<Archive, T> >,
|
||||
mpl::identity</* detail:: */ free_saver<Archive, T> >,
|
||||
mpl::identity</* detail:: */ free_loader<Archive, T> >
|
||||
>::type typex;
|
||||
typex::invoke(ar, t, file_version);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// split_member.hpp:
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -36,7 +36,7 @@ namespace detail {
|
||||
template<class Archive, class T>
|
||||
struct member_saver {
|
||||
static void invoke(
|
||||
Archive & ar,
|
||||
Archive & ar,
|
||||
const T & t,
|
||||
const unsigned int file_version
|
||||
){
|
||||
@@ -47,7 +47,7 @@ namespace detail {
|
||||
template<class Archive, class T>
|
||||
struct member_loader {
|
||||
static void invoke(
|
||||
Archive & ar,
|
||||
Archive & ar,
|
||||
T & t,
|
||||
const unsigned int file_version
|
||||
){
|
||||
@@ -63,7 +63,7 @@ inline void split_member(
|
||||
){
|
||||
typedef typename mpl::eval_if<
|
||||
typename Archive::is_saving,
|
||||
mpl::identity<detail::member_saver<Archive, T> >,
|
||||
mpl::identity<detail::member_saver<Archive, T> >,
|
||||
mpl::identity<detail::member_loader<Archive, T> >
|
||||
>::type typex;
|
||||
typex::invoke(ar, t, file_version);
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#define STD std
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
namespace detail{
|
||||
|
||||
@@ -54,7 +54,7 @@ template<class Archive, class T, class C>
|
||||
inline void serialize(
|
||||
Archive & ar,
|
||||
std::stack< T, C> & t,
|
||||
const unsigned int file_version
|
||||
const unsigned int file_version
|
||||
){
|
||||
typedef typename mpl::eval_if<
|
||||
typename Archive::is_saving,
|
||||
|
||||
@@ -59,8 +59,8 @@ private:
|
||||
static void invoke(T & previous_ref, const T & previous_value){
|
||||
BOOST_TRY{
|
||||
previous_ref = previous_value;
|
||||
}
|
||||
BOOST_CATCH(::std::exception &) {
|
||||
}
|
||||
BOOST_CATCH(::std::exception &) {
|
||||
// we must ignore it - we are in destructor
|
||||
}
|
||||
BOOST_CATCH_END
|
||||
@@ -70,11 +70,11 @@ private:
|
||||
public:
|
||||
state_saver(
|
||||
T & object
|
||||
) :
|
||||
) :
|
||||
previous_value(object),
|
||||
previous_ref(object)
|
||||
previous_ref(object)
|
||||
{}
|
||||
|
||||
|
||||
~state_saver() {
|
||||
#ifndef BOOST_NO_EXCEPTIONS
|
||||
typedef typename mpl::eval_if<
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
/*
|
||||
Revision history:
|
||||
15 June 2003 - Initial version.
|
||||
31 March 2004 - improved diagnostic messages and portability
|
||||
31 March 2004 - improved diagnostic messages and portability
|
||||
(Jonathan Turkanis)
|
||||
03 April 2004 - works on VC6 at class and namespace scope
|
||||
- ported to DigitalMars
|
||||
@@ -49,8 +49,8 @@
|
||||
// 3. static_warning_impl<B>::type overloads operator& to return a dynamically
|
||||
// allocated int pointer only is B is true, so returning the address of an
|
||||
// automatic variable of this type generates a warning iff B is fasle.
|
||||
// 4. static_warning_impl<B>::STATIC_WARNING is decalred as a struct iff B is
|
||||
// false.
|
||||
// 4. static_warning_impl<B>::STATIC_WARNING is decalred as a struct iff B is
|
||||
// false.
|
||||
// 5. static_warning_impl<B>::type is incomplete iff B is false, so deleting a
|
||||
// pointer to this type generates a warning iff B is false.
|
||||
//
|
||||
@@ -72,7 +72,7 @@
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
template<int L>
|
||||
template<int L>
|
||||
struct BOOST_SERIALIZATION_STATIC_WARNING_LINE{};
|
||||
|
||||
template<bool B, int L>
|
||||
@@ -97,7 +97,7 @@ struct BOOST_SERIALIZATION_SS {};
|
||||
#define BOOST_SERIALIZATION_BSW(B, L) \
|
||||
typedef boost::serialization::BOOST_SERIALIZATION_SS< \
|
||||
sizeof( boost::serialization::static_warning_test< B, L > ) \
|
||||
> BOOST_JOIN(STATIC_WARNING_LINE, L) BOOST_ATTRIBUTE_UNUSED;
|
||||
> BOOST_JOIN(STATIC_WARNING_LINE, L) BOOST_ATTRIBUTE_UNUSED;
|
||||
#define BOOST_STATIC_WARNING(B) BOOST_SERIALIZATION_BSW(B, __LINE__)
|
||||
|
||||
#endif // BOOST_SERIALIZATION_STATIC_WARNING_HPP
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
// serialization/string.hpp:
|
||||
// serialization for stl string templates
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// strong_typedef.hpp:
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2016 Ashish Sadanandan
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
||||
@@ -26,13 +26,13 @@ namespace serialization {
|
||||
|
||||
#ifdef BOOST_NO_EXCEPTIONS
|
||||
|
||||
inline void throw_exception(std::exception const & e) {
|
||||
BOOST_NORETURN inline void throw_exception(std::exception const & e) {
|
||||
::boost::throw_exception(e);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
template<class E> inline void throw_exception(E const & e){
|
||||
template<class E> BOOST_NORETURN inline void throw_exception(E const & e){
|
||||
throw e;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// tracking.hpp:
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -60,7 +60,7 @@ struct tracking_level_impl {
|
||||
// for primitives
|
||||
typename mpl::equal_to<
|
||||
implementation_level< T >,
|
||||
mpl::int_<primitive_type>
|
||||
mpl::int_<primitive_type>
|
||||
>,
|
||||
// is never
|
||||
mpl::int_<track_never>,
|
||||
@@ -71,7 +71,7 @@ struct tracking_level_impl {
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct tracking_level :
|
||||
struct tracking_level :
|
||||
public tracking_level_impl<const T>
|
||||
{
|
||||
};
|
||||
@@ -86,10 +86,10 @@ inline bool operator>=(tracking_level< T > t, enum tracking_type l)
|
||||
} // namespace boost
|
||||
|
||||
|
||||
// The STATIC_ASSERT is prevents one from setting tracking for a primitive type.
|
||||
// This almost HAS to be an error. Doing this will effect serialization of all
|
||||
// char's in your program which is almost certainly what you don't want to do.
|
||||
// If you want to track all instances of a given primitive type, You'll have to
|
||||
// The STATIC_ASSERT is prevents one from setting tracking for a primitive type.
|
||||
// This almost HAS to be an error. Doing this will effect serialization of all
|
||||
// char's in your program which is almost certainly what you don't want to do.
|
||||
// If you want to track all instances of a given primitive type, You'll have to
|
||||
// wrap it in your own type so its not a primitive anymore. Then it will compile
|
||||
// without problem.
|
||||
#define BOOST_CLASS_TRACKING(T, E) \
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// tracking_enum.hpp:
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -28,7 +28,7 @@ enum tracking_type
|
||||
{
|
||||
// never track this type
|
||||
track_never = 0,
|
||||
// track objects of this type if the object is serialized through a
|
||||
// track objects of this type if the object is serialized through a
|
||||
// pointer.
|
||||
track_selectively = 1,
|
||||
// always track this type
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// traits.hpp:
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
// This header is used to apply serialization traits to templates. The
|
||||
// standard system can't be used for platforms which don't support
|
||||
// Partial Templlate Specialization.
|
||||
// Partial Templlate Specialization.
|
||||
|
||||
// The motivation for this is the Name-Value Pair (NVP) template.
|
||||
// it has to work the same on all platforms in order for archives
|
||||
@@ -42,8 +42,8 @@ template <class T>
|
||||
struct extended_type_info_impl;
|
||||
|
||||
template<
|
||||
class T,
|
||||
int Level,
|
||||
class T,
|
||||
int Level,
|
||||
int Tracking,
|
||||
unsigned int Version = 0,
|
||||
class ETII = extended_type_info_impl< T >,
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// type_info_implementation.hpp: interface for portable version of type_info
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -39,7 +39,7 @@ struct type_info_implementation {
|
||||
};
|
||||
// note: at least one compiler complained w/o the full qualification
|
||||
// on basic traits below
|
||||
typedef
|
||||
typedef
|
||||
typename mpl::eval_if<
|
||||
is_base_and_derived<boost::serialization::basic_traits, T>,
|
||||
traits_class_typeinfo_implementation< T >,
|
||||
@@ -54,7 +54,7 @@ struct type_info_implementation {
|
||||
} // namespace boost
|
||||
|
||||
// define a macro to assign a particular derivation of extended_type_info
|
||||
// to a specified a class.
|
||||
// to a specified a class.
|
||||
#define BOOST_CLASS_TYPE_INFO(T, ETI) \
|
||||
namespace boost { \
|
||||
namespace serialization { \
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// unique_ptr.hpp:
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// unordered_collections_load_imp.hpp: serialization for loading stl collections
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2014 Jim Bell
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -24,17 +24,17 @@
|
||||
#include <cstddef> // size_t
|
||||
#include <boost/config.hpp> // msvc 6.0 needs this for warning suppression
|
||||
#if defined(BOOST_NO_STDC_NAMESPACE)
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
} // namespace std
|
||||
#endif
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
#include <boost/archive/detail/basic_iarchive.hpp>
|
||||
#include <boost/serialization/access.hpp>
|
||||
#include <boost/serialization/nvp.hpp>
|
||||
#include <boost/serialization/collection_size_type.hpp>
|
||||
#include <boost/serialization/item_version_type.hpp>
|
||||
#include <boost/serialization/library_version_type.hpp>
|
||||
|
||||
namespace boost{
|
||||
namespace serialization {
|
||||
@@ -49,13 +49,13 @@ inline void load_unordered_collection(Archive & ar, Container &s)
|
||||
collection_size_type count;
|
||||
collection_size_type bucket_count;
|
||||
boost::serialization::item_version_type item_version(0);
|
||||
boost::archive::library_version_type library_version(
|
||||
boost::serialization::library_version_type library_version(
|
||||
ar.get_library_version()
|
||||
);
|
||||
// retrieve number of elements
|
||||
ar >> BOOST_SERIALIZATION_NVP(count);
|
||||
ar >> BOOST_SERIALIZATION_NVP(bucket_count);
|
||||
if(boost::archive::library_version_type(3) < library_version){
|
||||
if(boost::serialization::library_version_type(3) < library_version){
|
||||
ar >> BOOST_SERIALIZATION_NVP(item_version);
|
||||
}
|
||||
s.clear();
|
||||
@@ -66,7 +66,7 @@ inline void load_unordered_collection(Archive & ar, Container &s)
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace stl
|
||||
} // namespace stl
|
||||
} // namespace serialization
|
||||
} // namespace boost
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// hash_collections_save_imp.hpp: serialization for stl collections
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2014 Jim Bell
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <boost/serialization/version.hpp>
|
||||
#include <boost/serialization/collection_size_type.hpp>
|
||||
#include <boost/serialization/item_version_type.hpp>
|
||||
#include <boost/serialization/library_version_type.hpp>
|
||||
|
||||
namespace boost{
|
||||
namespace serialization {
|
||||
@@ -47,13 +48,13 @@ inline void save_unordered_collection(Archive & ar, const Container &s)
|
||||
/* should only be necessary to create archives of previous versions
|
||||
* which is not currently supported. So for now comment this out
|
||||
*/
|
||||
boost::archive::library_version_type library_version(
|
||||
boost::serialization::library_version_type library_version(
|
||||
ar.get_library_version()
|
||||
);
|
||||
// retrieve number of elements
|
||||
ar << BOOST_SERIALIZATION_NVP(count);
|
||||
ar << BOOST_SERIALIZATION_NVP(bucket_count);
|
||||
if(boost::archive::library_version_type(3) < library_version){
|
||||
if(boost::serialization::library_version_type(3) < library_version){
|
||||
// record number of elements
|
||||
// make sure the target type is registered so we can retrieve
|
||||
// the version when we load
|
||||
@@ -69,8 +70,8 @@ inline void save_unordered_collection(Archive & ar, const Container &s)
|
||||
while(count-- > 0){
|
||||
// note borland emits a no-op without the explicit namespace
|
||||
boost::serialization::save_construct_data_adl(
|
||||
ar,
|
||||
&(*it),
|
||||
ar,
|
||||
&(*it),
|
||||
boost::serialization::version<
|
||||
typename Container::value_type
|
||||
>::value
|
||||
@@ -79,7 +80,7 @@ inline void save_unordered_collection(Archive & ar, const Container &s)
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace stl
|
||||
} // namespace stl
|
||||
} // namespace serialization
|
||||
} // namespace boost
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
// serialization/unordered_map.hpp:
|
||||
// serialization for stl unordered_map templates
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2014 Jim Bell
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -28,45 +28,47 @@
|
||||
#include <boost/serialization/archive_input_unordered_map.hpp>
|
||||
#include <boost/serialization/split_free.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class T,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
inline void save(
|
||||
Archive & ar,
|
||||
const std::unordered_map<Key, HashFcn, EqualKey, Allocator> &t,
|
||||
const std::unordered_map<Key, T, HashFcn, EqualKey, Allocator> &t,
|
||||
const unsigned int /*file_version*/
|
||||
){
|
||||
boost::serialization::stl::save_unordered_collection<
|
||||
Archive,
|
||||
std::unordered_map<Key, HashFcn, EqualKey, Allocator>
|
||||
Archive,
|
||||
std::unordered_map<Key, T, HashFcn, EqualKey, Allocator>
|
||||
>(ar, t);
|
||||
}
|
||||
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class T,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
inline void load(
|
||||
Archive & ar,
|
||||
std::unordered_map<Key, HashFcn, EqualKey, Allocator> &t,
|
||||
std::unordered_map<Key, T, HashFcn, EqualKey, Allocator> &t,
|
||||
const unsigned int /*file_version*/
|
||||
){
|
||||
boost::serialization::stl::load_unordered_collection<
|
||||
Archive,
|
||||
std::unordered_map<Key, HashFcn, EqualKey, Allocator>,
|
||||
std::unordered_map<Key, T, HashFcn, EqualKey, Allocator>,
|
||||
boost::serialization::stl::archive_input_unordered_map<
|
||||
Archive,
|
||||
std::unordered_map<Key, HashFcn, EqualKey, Allocator>
|
||||
Archive,
|
||||
std::unordered_map<Key, T, HashFcn, EqualKey, Allocator>
|
||||
>
|
||||
>(ar, t);
|
||||
}
|
||||
@@ -74,15 +76,16 @@ inline void load(
|
||||
// split non-intrusive serialization function member into separate
|
||||
// non intrusive save/load member functions
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class T,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
inline void serialize(
|
||||
Archive & ar,
|
||||
std::unordered_map<Key, HashFcn, EqualKey, Allocator> &t,
|
||||
std::unordered_map<Key, T, HashFcn, EqualKey, Allocator> &t,
|
||||
const unsigned int file_version
|
||||
){
|
||||
boost::serialization::split_free(ar, t, file_version);
|
||||
@@ -90,47 +93,43 @@ inline void serialize(
|
||||
|
||||
// unordered_multimap
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class T,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
inline void save(
|
||||
Archive & ar,
|
||||
const std::unordered_multimap<
|
||||
Key, HashFcn, EqualKey, Allocator
|
||||
> &t,
|
||||
const std::unordered_multimap<Key, T, HashFcn, EqualKey, Allocator> &t,
|
||||
const unsigned int /*file_version*/
|
||||
){
|
||||
boost::serialization::stl::save_unordered_collection<
|
||||
Archive,
|
||||
std::unordered_multimap<Key, HashFcn, EqualKey, Allocator>
|
||||
Archive,
|
||||
std::unordered_multimap<Key, T, HashFcn, EqualKey, Allocator>
|
||||
>(ar, t);
|
||||
}
|
||||
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class T,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
inline void load(
|
||||
Archive & ar,
|
||||
std::unordered_multimap<
|
||||
Key, HashFcn, EqualKey, Allocator
|
||||
> &t,
|
||||
std::unordered_multimap<Key, T, HashFcn, EqualKey, Allocator> &t,
|
||||
const unsigned int /*file_version*/
|
||||
){
|
||||
boost::serialization::stl::load_unordered_collection<
|
||||
Archive,
|
||||
std::unordered_multimap<
|
||||
Key, HashFcn, EqualKey, Allocator
|
||||
>,
|
||||
std::unordered_multimap<Key, T, HashFcn, EqualKey, Allocator>,
|
||||
boost::serialization::stl::archive_input_unordered_multimap<
|
||||
Archive,
|
||||
std::unordered_multimap<Key, HashFcn, EqualKey, Allocator>
|
||||
Archive,
|
||||
std::unordered_multimap<Key, T, HashFcn, EqualKey, Allocator>
|
||||
>
|
||||
>(ar, t);
|
||||
}
|
||||
@@ -138,17 +137,16 @@ inline void load(
|
||||
// split non-intrusive serialization function member into separate
|
||||
// non intrusive save/load member functions
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class T,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
inline void serialize(
|
||||
Archive & ar,
|
||||
std::unordered_multimap<
|
||||
Key, HashFcn, EqualKey, Allocator
|
||||
> &t,
|
||||
std::unordered_multimap<Key, T, HashFcn, EqualKey, Allocator> &t,
|
||||
const unsigned int file_version
|
||||
){
|
||||
boost::serialization::split_free(ar, t, file_version);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// unordered_set.hpp: serialization for stl unordered_set templates
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2014 Jim Bell
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -26,13 +26,13 @@
|
||||
#include <boost/serialization/archive_input_unordered_set.hpp>
|
||||
#include <boost/serialization/split_free.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
@@ -44,15 +44,15 @@ inline void save(
|
||||
const unsigned int /*file_version*/
|
||||
){
|
||||
boost::serialization::stl::save_unordered_collection<
|
||||
Archive,
|
||||
Archive,
|
||||
std::unordered_set<Key, HashFcn, EqualKey, Allocator>
|
||||
>(ar, t);
|
||||
}
|
||||
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
@@ -67,7 +67,7 @@ inline void load(
|
||||
Archive,
|
||||
std::unordered_set<Key, HashFcn, EqualKey, Allocator>,
|
||||
stl::archive_input_unordered_set<
|
||||
Archive,
|
||||
Archive,
|
||||
std::unordered_set<
|
||||
Key, HashFcn, EqualKey, Allocator
|
||||
>
|
||||
@@ -78,9 +78,9 @@ inline void load(
|
||||
// split non-intrusive serialization function member into separate
|
||||
// non intrusive save/load member functions
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
@@ -96,9 +96,9 @@ inline void serialize(
|
||||
|
||||
// unordered_multiset
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
@@ -110,15 +110,15 @@ inline void save(
|
||||
const unsigned int /*file_version*/
|
||||
){
|
||||
stl::save_unordered_collection<
|
||||
Archive,
|
||||
Archive,
|
||||
std::unordered_multiset<Key, HashFcn, EqualKey, Allocator>
|
||||
>(ar, t);
|
||||
}
|
||||
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
@@ -142,9 +142,9 @@ inline void load(
|
||||
// split non-intrusive serialization function member into separate
|
||||
// non intrusive save/load member functions
|
||||
template<
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class Archive,
|
||||
class Key,
|
||||
class HashFcn,
|
||||
class EqualKey,
|
||||
class Allocator
|
||||
>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
// serialization/utility.hpp:
|
||||
// serialization for stl utility templates
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <boost/serialization/is_bitwise_serializable.hpp>
|
||||
#include <boost/mpl/and.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
// pair
|
||||
@@ -35,7 +35,7 @@ inline void serialize(
|
||||
std::pair<F, S> & p,
|
||||
const unsigned int /* file_version */
|
||||
){
|
||||
// note: we remove any const-ness on the first argument. The reason is that
|
||||
// note: we remove any const-ness on the first argument. The reason is that
|
||||
// for stl maps, the type saved is pair<const key, T). We remove
|
||||
// the const-ness in order to be able to load it.
|
||||
typedef typename boost::remove_const<F>::type typef;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// valarray.hpp: serialization for stl vector templates
|
||||
|
||||
// (C) Copyright 2005 Matthias Troyer .
|
||||
// (C) Copyright 2005 Matthias Troyer .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -34,7 +34,7 @@
|
||||
#define STD std
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// variant.hpp - non-intrusive serialization of variant types
|
||||
//
|
||||
// copyright (c) 2005
|
||||
// copyright (c) 2005
|
||||
// troy d. straszheim <troy@resophonic.com>
|
||||
// http://www.resophonic.com
|
||||
//
|
||||
@@ -127,7 +127,7 @@ struct variant_impl {
|
||||
|
||||
template<class Archive, BOOST_VARIANT_ENUM_PARAMS(/* typename */ class T)>
|
||||
void load(
|
||||
Archive & ar,
|
||||
Archive & ar,
|
||||
boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>& v,
|
||||
const unsigned int version
|
||||
){
|
||||
@@ -162,7 +162,7 @@ inline void serialize(
|
||||
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
|
||||
template<BOOST_VARIANT_ENUM_PARAMS(/* typename */ class T)>
|
||||
struct tracking_level<
|
||||
variant<BOOST_VARIANT_ENUM_PARAMS(T)>
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// vector.hpp: serialization for stl vector templates
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// fast array serialization (C) Copyright 2005 Matthias Troyer
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// fast array serialization (C) Copyright 2005 Matthias Troyer
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -22,11 +22,12 @@
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
#include <boost/archive/detail/basic_iarchive.hpp>
|
||||
#include <boost/serialization/access.hpp>
|
||||
#include <boost/serialization/nvp.hpp>
|
||||
#include <boost/serialization/collection_size_type.hpp>
|
||||
#include <boost/serialization/library_version_type.hpp>
|
||||
#include <boost/serialization/item_version_type.hpp>
|
||||
#include <boost/serialization/library_version_type.hpp>
|
||||
|
||||
#include <boost/serialization/collections_save_imp.hpp>
|
||||
#include <boost/serialization/collections_load_imp.hpp>
|
||||
@@ -48,7 +49,7 @@
|
||||
#define STD std
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
@@ -75,14 +76,14 @@ inline void load(
|
||||
const unsigned int /* file_version */,
|
||||
mpl::false_
|
||||
){
|
||||
const boost::archive::library_version_type library_version(
|
||||
const boost::serialization::library_version_type library_version(
|
||||
ar.get_library_version()
|
||||
);
|
||||
// retrieve number of elements
|
||||
item_version_type item_version(0);
|
||||
collection_size_type count;
|
||||
ar >> BOOST_SERIALIZATION_NVP(count);
|
||||
if(boost::archive::library_version_type(3) < library_version){
|
||||
if(boost::serialization::library_version_type(3) < library_version){
|
||||
ar >> BOOST_SERIALIZATION_NVP(item_version);
|
||||
}
|
||||
t.reserve(count);
|
||||
@@ -138,9 +139,9 @@ inline void save(
|
||||
const std::vector<U, Allocator> &t,
|
||||
const unsigned int file_version
|
||||
){
|
||||
typedef typename
|
||||
typedef typename
|
||||
boost::serialization::use_array_optimization<Archive>::template apply<
|
||||
typename remove_const<U>::type
|
||||
typename remove_const<U>::type
|
||||
>::type use_optimized;
|
||||
save(ar,t,file_version, use_optimized());
|
||||
}
|
||||
@@ -152,15 +153,15 @@ inline void load(
|
||||
const unsigned int file_version
|
||||
){
|
||||
#ifdef BOOST_SERIALIZATION_VECTOR_135_HPP
|
||||
if (ar.get_library_version()==boost::archive::library_version_type(5))
|
||||
if (ar.get_library_version()==boost::serialization::library_version_type(5))
|
||||
{
|
||||
load(ar,t,file_version, boost::is_arithmetic<U>());
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
typedef typename
|
||||
typedef typename
|
||||
boost::serialization::use_array_optimization<Archive>::template apply<
|
||||
typename remove_const<U>::type
|
||||
typename remove_const<U>::type
|
||||
>::type use_optimized;
|
||||
load(ar,t,file_version, use_optimized());
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// version.hpp:
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#include <boost/type_traits/is_base_and_derived.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
struct basic_traits;
|
||||
@@ -69,8 +69,6 @@ const int version<T>::value;
|
||||
* ALL the serialization traits are available. Included the implementation
|
||||
* here with this comment as a reminder not to do this!
|
||||
*/
|
||||
//#include <boost/serialization/level.hpp>
|
||||
//#include <boost/mpl/equal_to.hpp>
|
||||
|
||||
#include <boost/mpl/less.hpp>
|
||||
#include <boost/mpl/comparison.hpp>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifndef BOOST_SERIALIZATION_VOID_CAST_HPP
|
||||
#ifndef BOOST_SERIALIZATION_VOID_CAST_HPP
|
||||
#define BOOST_SERIALIZATION_VOID_CAST_HPP
|
||||
|
||||
// MS compatible compilers support #pragma once
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// void_cast.hpp: interface for run-time casting of void pointers.
|
||||
|
||||
// (C) Copyright 2002-2009 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2002-2009 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <boost/serialization/type_info_implementation.hpp>
|
||||
#include <boost/serialization/extended_type_info.hpp>
|
||||
#include <boost/type_traits/is_virtual_base_of.hpp>
|
||||
#include <boost/type_traits/aligned_storage.hpp>
|
||||
#include <boost/serialization/void_cast_fwd.hpp>
|
||||
|
||||
#include <boost/serialization/config.hpp>
|
||||
@@ -37,20 +38,20 @@
|
||||
# pragma warning(disable : 4251 4231 4660 4275)
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
class extended_type_info;
|
||||
|
||||
// Given a void *, assume that it really points to an instance of one type
|
||||
// and alter it so that it would point to an instance of a related type.
|
||||
// Return the altered pointer. If there exists no sequence of casts that
|
||||
// can transform from_type to to_type, return a NULL.
|
||||
// can transform from_type to to_type, return a NULL.
|
||||
|
||||
BOOST_SERIALIZATION_DECL void const *
|
||||
void_upcast(
|
||||
extended_type_info const & derived,
|
||||
extended_type_info const & base,
|
||||
extended_type_info const & derived,
|
||||
extended_type_info const & base,
|
||||
void const * const t
|
||||
);
|
||||
|
||||
@@ -58,19 +59,19 @@ inline void *
|
||||
void_upcast(
|
||||
extended_type_info const & derived,
|
||||
extended_type_info const & base,
|
||||
void * const t
|
||||
void * const t
|
||||
){
|
||||
return const_cast<void*>(void_upcast(
|
||||
derived,
|
||||
base,
|
||||
derived,
|
||||
base,
|
||||
const_cast<void const *>(t)
|
||||
));
|
||||
}
|
||||
|
||||
BOOST_SERIALIZATION_DECL void const *
|
||||
void_downcast(
|
||||
extended_type_info const & derived,
|
||||
extended_type_info const & base,
|
||||
extended_type_info const & derived,
|
||||
extended_type_info const & base,
|
||||
void const * const t
|
||||
);
|
||||
|
||||
@@ -78,11 +79,11 @@ inline void *
|
||||
void_downcast(
|
||||
extended_type_info const & derived,
|
||||
extended_type_info const & base,
|
||||
void * const t
|
||||
void * const t
|
||||
){
|
||||
return const_cast<void*>(void_downcast(
|
||||
derived,
|
||||
base,
|
||||
derived,
|
||||
base,
|
||||
const_cast<void const *>(t)
|
||||
));
|
||||
}
|
||||
@@ -92,14 +93,14 @@ namespace void_cast_detail {
|
||||
class BOOST_SYMBOL_VISIBLE void_caster :
|
||||
private boost::noncopyable
|
||||
{
|
||||
friend
|
||||
friend
|
||||
BOOST_SERIALIZATION_DECL void const *
|
||||
boost::serialization::void_upcast(
|
||||
extended_type_info const & derived,
|
||||
extended_type_info const & base,
|
||||
void const * const
|
||||
);
|
||||
friend
|
||||
friend
|
||||
BOOST_SERIALIZATION_DECL void const *
|
||||
boost::serialization::void_downcast(
|
||||
extended_type_info const & derived,
|
||||
@@ -121,7 +122,7 @@ public:
|
||||
// member extended type info records - NOT their
|
||||
// addresses. This is necessary in order for the
|
||||
// void cast operations to work across dll and exe
|
||||
// module boundries.
|
||||
// module boundaries.
|
||||
bool operator<(const void_caster & rhs) const;
|
||||
|
||||
const void_caster & operator*(){
|
||||
@@ -154,41 +155,43 @@ template <class Derived, class Base>
|
||||
class BOOST_SYMBOL_VISIBLE void_caster_primitive :
|
||||
public void_caster
|
||||
{
|
||||
virtual void const * downcast(void const * const t) const {
|
||||
const Derived * d =
|
||||
void const * downcast(void const * const t) const BOOST_OVERRIDE {
|
||||
const Derived * d =
|
||||
boost::serialization::smart_cast<const Derived *, const Base *>(
|
||||
static_cast<const Base *>(t)
|
||||
);
|
||||
return d;
|
||||
}
|
||||
virtual void const * upcast(void const * const t) const {
|
||||
const Base * b =
|
||||
void const * upcast(void const * const t) const BOOST_OVERRIDE {
|
||||
const Base * b =
|
||||
boost::serialization::smart_cast<const Base *, const Derived *>(
|
||||
static_cast<const Derived *>(t)
|
||||
);
|
||||
return b;
|
||||
}
|
||||
virtual bool has_virtual_base() const {
|
||||
bool has_virtual_base() const BOOST_OVERRIDE {
|
||||
return false;
|
||||
}
|
||||
public:
|
||||
void_caster_primitive();
|
||||
virtual ~void_caster_primitive();
|
||||
~void_caster_primitive() BOOST_OVERRIDE;
|
||||
|
||||
private:
|
||||
static std::ptrdiff_t base_offset() {
|
||||
typename boost::aligned_storage<sizeof(Derived)>::type data;
|
||||
return reinterpret_cast<char*>(&data)
|
||||
- reinterpret_cast<char*>(
|
||||
static_cast<Base*>(
|
||||
reinterpret_cast<Derived*>(&data)));
|
||||
}
|
||||
};
|
||||
|
||||
template <class Derived, class Base>
|
||||
void_caster_primitive<Derived, Base>::void_caster_primitive() :
|
||||
void_caster(
|
||||
& type_info_implementation<Derived>::type::get_const_instance(),
|
||||
void_caster(
|
||||
& type_info_implementation<Derived>::type::get_const_instance(),
|
||||
& type_info_implementation<Base>::type::get_const_instance(),
|
||||
/* note about displacement:
|
||||
* displace 0: at least one compiler treated 0 by not shifting it at all
|
||||
* displace by small value (8): caused ICE on certain mingw gcc versions */
|
||||
reinterpret_cast<std::ptrdiff_t>(
|
||||
static_cast<Derived *>(
|
||||
reinterpret_cast<Base *>(1 << 20)
|
||||
)
|
||||
) - (1 << 20)
|
||||
base_offset()
|
||||
)
|
||||
{
|
||||
recursive_register();
|
||||
@@ -203,26 +206,26 @@ template <class Derived, class Base>
|
||||
class BOOST_SYMBOL_VISIBLE void_caster_virtual_base :
|
||||
public void_caster
|
||||
{
|
||||
virtual bool has_virtual_base() const {
|
||||
bool has_virtual_base() const BOOST_OVERRIDE {
|
||||
return true;
|
||||
}
|
||||
public:
|
||||
virtual void const * downcast(void const * const t) const {
|
||||
const Derived * d =
|
||||
void const * downcast(void const * const t) const BOOST_OVERRIDE {
|
||||
const Derived * d =
|
||||
dynamic_cast<const Derived *>(
|
||||
static_cast<const Base *>(t)
|
||||
);
|
||||
return d;
|
||||
}
|
||||
virtual void const * upcast(void const * const t) const {
|
||||
const Base * b =
|
||||
void const * upcast(void const * const t) const BOOST_OVERRIDE {
|
||||
const Base * b =
|
||||
dynamic_cast<const Base *>(
|
||||
static_cast<const Derived *>(t)
|
||||
);
|
||||
return b;
|
||||
}
|
||||
void_caster_virtual_base();
|
||||
virtual ~void_caster_virtual_base();
|
||||
~void_caster_virtual_base() BOOST_OVERRIDE;
|
||||
};
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
@@ -231,8 +234,8 @@ public:
|
||||
|
||||
template <class Derived, class Base>
|
||||
void_caster_virtual_base<Derived,Base>::void_caster_virtual_base() :
|
||||
void_caster(
|
||||
& (type_info_implementation<Derived>::type::get_const_instance()),
|
||||
void_caster(
|
||||
& (type_info_implementation<Derived>::type::get_const_instance()),
|
||||
& (type_info_implementation<Base>::type::get_const_instance())
|
||||
)
|
||||
{
|
||||
@@ -260,12 +263,12 @@ struct BOOST_SYMBOL_VISIBLE void_caster_base :
|
||||
>::type type;
|
||||
};
|
||||
|
||||
} // void_cast_detail
|
||||
} // void_cast_detail
|
||||
|
||||
template<class Derived, class Base>
|
||||
BOOST_DLLEXPORT
|
||||
BOOST_DLLEXPORT
|
||||
inline const void_cast_detail::void_caster & void_cast_register(
|
||||
Derived const * /* dnull = NULL */,
|
||||
Derived const * /* dnull = NULL */,
|
||||
Base const * /* bnull = NULL */
|
||||
){
|
||||
typedef
|
||||
@@ -290,8 +293,8 @@ class BOOST_SYMBOL_VISIBLE void_caster :
|
||||
} // namespace serialization
|
||||
} // namespace boost
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(pop)
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#include <boost/config/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// void_cast_fwd.hpp: interface for run-time casting of void pointers.
|
||||
|
||||
// (C) Copyright 2005 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 2005 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -26,9 +26,9 @@ namespace void_cast_detail{
|
||||
class void_caster;
|
||||
} // namespace void_cast_detail
|
||||
template<class Derived, class Base>
|
||||
BOOST_DLLEXPORT
|
||||
BOOST_DLLEXPORT
|
||||
inline const void_cast_detail::void_caster & void_cast_register(
|
||||
const Derived * dnull = NULL,
|
||||
const Derived * dnull = NULL,
|
||||
const Base * bnull = NULL
|
||||
) BOOST_USED;
|
||||
} // namespace serialization
|
||||
|
||||
@@ -17,17 +17,17 @@ namespace boost { namespace serialization {
|
||||
///
|
||||
/// wrappers need to be treated differently at various places in the serialization library,
|
||||
/// e.g. saving of non-const wrappers has to be possible. Since partial specialization
|
||||
// is not supported by all compilers, we derive all wrappers from wrapper_traits.
|
||||
// is not supported by all compilers, we derive all wrappers from wrapper_traits.
|
||||
|
||||
template<
|
||||
class T,
|
||||
int Level = object_serializable,
|
||||
class T,
|
||||
int Level = object_serializable,
|
||||
int Tracking = track_never,
|
||||
unsigned int Version = 0,
|
||||
class ETII = extended_type_info_impl< T >
|
||||
>
|
||||
struct wrapper_traits :
|
||||
public traits<T,Level,Tracking,Version,ETII,mpl::true_>
|
||||
struct wrapper_traits :
|
||||
public traits<T,Level,Tracking,Version,ETII,mpl::true_>
|
||||
{};
|
||||
|
||||
template<class T>
|
||||
|
||||
Reference in New Issue
Block a user