/
usr
/
include
/
boost
/
serialization
/
/usr/include/boost/serialization
mkdir
upload
Name
Size
Mode
Actions
detail/
-
0755
rm
access.hpp
4374
0644
edit
dl
rm
archive_input_unordered_map.hpp
2794
0644
edit
dl
rm
archive_input_unordered_set.hpp
2275
0644
edit
dl
rm
array.hpp
1443
0644
edit
dl
rm
array_optimization.hpp
1381
0644
edit
dl
rm
array_wrapper.hpp
3271
0644
edit
dl
rm
assume_abstract.hpp
1935
0644
edit
dl
rm
base_object.hpp
3008
0644
edit
dl
rm
binary_object.hpp
2295
0644
edit
dl
rm
bitset.hpp
1953
0644
edit
dl
rm
boost_array.hpp
949
0644
edit
dl
rm
boost_unordered_map.hpp
4272
0644
edit
dl
rm
boost_unordered_set.hpp
4044
0644
edit
dl
rm
collections_load_imp.hpp
2917
0644
edit
dl
rm
collections_save_imp.hpp
2306
0644
edit
dl
rm
collection_size_type.hpp
1764
0644
edit
dl
rm
collection_size_type copy.hpp
3415
0644
edit
dl
rm
collection_traits.hpp
3679
0644
edit
dl
rm
complex.hpp
2219
0644
edit
dl
rm
config.hpp
2734
0644
edit
dl
rm
deque.hpp
2324
0644
edit
dl
rm
export.hpp
8215
0644
edit
dl
rm
extended_type_info.hpp
3604
0644
edit
dl
rm
extended_type_info_no_rtti.hpp
6367
0644
edit
dl
rm
extended_type_info_typeid.hpp
5661
0644
edit
dl
rm
factory.hpp
4099
0644
edit
dl
rm
force_include.hpp
2073
0644
edit
dl
rm
forward_list.hpp
3865
0644
edit
dl
rm
hash_collections_load_imp.hpp
2686
0644
edit
dl
rm
hash_collections_save_imp.hpp
3435
0644
edit
dl
rm
hash_map.hpp
6313
0644
edit
dl
rm
hash_set.hpp
5884
0644
edit
dl
rm
is_bitwise_serializable.hpp
1399
0644
edit
dl
rm
item_version_type.hpp
1856
0644
edit
dl
rm
level.hpp
3621
0644
edit
dl
rm
level_enum.hpp
2140
0644
edit
dl
rm
library_version_type.hpp
2045
0644
edit
dl
rm
list.hpp
2485
0644
edit
dl
rm
map.hpp
4447
0644
edit
dl
rm
nvp.hpp
3538
0644
edit
dl
rm
optional.hpp
3201
0644
edit
dl
rm
priority_queue.hpp
2413
0644
edit
dl
rm
queue.hpp
2094
0644
edit
dl
rm
scoped_ptr.hpp
1552
0644
edit
dl
rm
serialization.hpp
4678
0644
edit
dl
rm
set.hpp
4284
0644
edit
dl
rm
shared_ptr.hpp
9821
0644
edit
dl
rm
shared_ptr_132.hpp
7370
0644
edit
dl
rm
shared_ptr_helper.hpp
7047
0644
edit
dl
rm
singleton.hpp
7603
0644
edit
dl
rm
slist.hpp
4828
0644
edit
dl
rm
smart_cast.hpp
8944
0644
edit
dl
rm
split_free.hpp
2734
0644
edit
dl
rm
split_member.hpp
2640
0644
edit
dl
rm
stack.hpp
2093
0644
edit
dl
rm
state_saver.hpp
2691
0644
edit
dl
rm
static_warning.hpp
3844
0644
edit
dl
rm
string.hpp
976
0644
edit
dl
rm
strong_typedef.hpp
3084
0644
edit
dl
rm
throw_exception.hpp
947
0644
edit
dl
rm
tracking.hpp
3990
0644
edit
dl
rm
tracking_enum.hpp
1227
0644
edit
dl
rm
traits.hpp
2017
0644
edit
dl
rm
type_info_implementation.hpp
2621
0644
edit
dl
rm
unique_ptr.hpp
1971
0644
edit
dl
rm
unordered_collections_load_imp.hpp
2438
0644
edit
dl
rm
unordered_collections_save_imp.hpp
2993
0644
edit
dl
rm
unordered_map.hpp
4164
0644
edit
dl
rm
unordered_set.hpp
4024
0644
edit
dl
rm
utility.hpp
1789
0644
edit
dl
rm
valarray.hpp
2754
0644
edit
dl
rm
variant.hpp
5122
0644
edit
dl
rm
vector.hpp
6924
0644
edit
dl
rm
vector_135.hpp
942
0644
edit
dl
rm
version.hpp
4291
0644
edit
dl
rm
void_cast.hpp
8747
0644
edit
dl
rm
void_cast_fwd.hpp
1187
0644
edit
dl
rm
weak_ptr.hpp
2437
0644
edit
dl
rm
wrapper.hpp
1907
0644
edit
dl
rm
Edit:
/usr/include/boost/serialization/shared_ptr_132.hpp
(7370B)
#ifndef BOOST_SERIALIZATION_SHARED_PTR_132_HPP #define BOOST_SERIALIZATION_SHARED_PTR_132_HPP // MS compatible compilers support #pragma once #if defined(_MSC_VER) # pragma once #endif /////////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 . // 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. // note: totally unadvised hack to gain access to private variables // in shared_ptr and shared_count. Unfortunately its the only way to // do this without changing shared_ptr and shared_count // the best we can do is to detect a conflict here #include <boost/config.hpp> #include <list> #include <cstddef> // NULL #include <boost/serialization/assume_abstract.hpp> #include <boost/serialization/split_free.hpp> #include <boost/serialization/nvp.hpp> #include <boost/serialization/tracking.hpp> #include <boost/serialization/void_cast.hpp> // mark base class as an (uncreatable) base class #include <boost/serialization/detail/shared_ptr_132.hpp> ///////////////////////////////////////////////////////////// // Maintain a couple of lists of loaded shared pointers of the old previous // version (1.32) namespace boost_132 { namespace serialization { namespace detail { struct null_deleter { void operator()(void const *) const {} }; } // namespace detail } // namespace serialization } // namespace boost_132 ///////////////////////////////////////////////////////////// // sp_counted_base_impl serialization namespace boost { namespace serialization { template<class Archive, class P, class D> inline void serialize( Archive & /* ar */, boost_132::detail::sp_counted_base_impl<P, D> & /* t */, const unsigned int /*file_version*/ ){ // register the relationship between each derived class // its polymorphic base boost::serialization::void_cast_register< boost_132::detail::sp_counted_base_impl<P, D>, 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) ); } 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 unsigned int /* file_version */ ){ // variables used for construction ar << boost::serialization::make_nvp("ptr", t->ptr); } template<class Archive, class P, class D> inline void load_construct_data( Archive & ar, 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()); // 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 // new system as well. ::new(t)boost_132::detail::sp_counted_base_impl< 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 // 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. t->use_count_ = 0; } } // serialization } // namespace boost ///////////////////////////////////////////////////////////// // shared_count serialization namespace boost { namespace serialization { template<class Archive> inline void save( Archive & ar, const boost_132::detail::shared_count &t, const unsigned int /* file_version */ ){ ar << boost::serialization::make_nvp("pi", t.pi_); } template<class Archive> inline void load( Archive & ar, boost_132::detail::shared_count &t, const unsigned int /* file_version */ ){ ar >> boost::serialization::make_nvp("pi", t.pi_); if(NULL != t.pi_) t.pi_->add_ref_copy(); } } // serialization } // namespace boost BOOST_SERIALIZATION_SPLIT_FREE(boost_132::detail::shared_count) ///////////////////////////////////////////////////////////// // implement serialization for shared_ptr< T > namespace boost { namespace serialization { template<class Archive, class T> inline void save( Archive & ar, const boost_132::shared_ptr< T > &t, const unsigned int /* file_version */ ){ // only the raw pointer has to be saved // the ref count is maintained automatically as shared pointers are loaded ar.register_type(static_cast< boost_132::detail::sp_counted_base_impl<T *, boost::checked_deleter< T > > * >(NULL)); ar << boost::serialization::make_nvp("px", t.px); ar << boost::serialization::make_nvp("pn", t.pn); } template<class Archive, class T> inline void load( Archive & ar, boost_132::shared_ptr< T > &t, const unsigned int /* file_version */ ){ // only the raw pointer has to be saved // the ref count is maintained automatically as shared pointers are loaded ar.register_type(static_cast< boost_132::detail::sp_counted_base_impl<T *, boost::checked_deleter< T > > * >(NULL)); ar >> boost::serialization::make_nvp("px", t.px); ar >> boost::serialization::make_nvp("pn", t.pn); } template<class Archive, class T> inline void serialize( Archive & ar, boost_132::shared_ptr< T > &t, const unsigned int file_version ){ // correct shared_ptr serialization depends upon object tracking // being used. BOOST_STATIC_ASSERT( boost::serialization::tracking_level< T >::value != boost::serialization::track_never ); boost::serialization::split_free(ar, t, file_version); } } // serialization } // namespace boost // 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) \ typedef boost_132::detail::sp_counted_base_impl< \ T *, \ boost::checked_deleter< T > \ > __shared_ptr_ ## T; \ BOOST_CLASS_EXPORT_GUID(__shared_ptr_ ## T, "__shared_ptr_" K) \ BOOST_CLASS_EXPORT_GUID(T, K) \ /**/ #define BOOST_SHARED_POINTER_EXPORT(T) \ BOOST_SHARED_POINTER_EXPORT_GUID( \ T, \ BOOST_PP_STRINGIZE(T) \ ) \ /**/ #endif // BOOST_SERIALIZATION_SHARED_PTR_132_HPP
Save
cmd:
run