/usr/include/boost/serialization
NameSizeModeActions
detail/-0755rm
access.hpp43740644editdlrm
archive_input_unordered_map.hpp27940644editdlrm
archive_input_unordered_set.hpp22750644editdlrm
array.hpp14430644editdlrm
array_optimization.hpp13810644editdlrm
array_wrapper.hpp32710644editdlrm
assume_abstract.hpp19350644editdlrm
base_object.hpp30080644editdlrm
binary_object.hpp22950644editdlrm
bitset.hpp19530644editdlrm
boost_array.hpp9490644editdlrm
boost_unordered_map.hpp42720644editdlrm
boost_unordered_set.hpp40440644editdlrm
collections_load_imp.hpp29170644editdlrm
collections_save_imp.hpp23060644editdlrm
collection_size_type.hpp17640644editdlrm
collection_size_type copy.hpp34150644editdlrm
collection_traits.hpp36790644editdlrm
complex.hpp22190644editdlrm
config.hpp27340644editdlrm
deque.hpp23240644editdlrm
export.hpp82150644editdlrm
extended_type_info.hpp36040644editdlrm
extended_type_info_no_rtti.hpp63670644editdlrm
extended_type_info_typeid.hpp56610644editdlrm
factory.hpp40990644editdlrm
force_include.hpp20730644editdlrm
forward_list.hpp38650644editdlrm
hash_collections_load_imp.hpp26860644editdlrm
hash_collections_save_imp.hpp34350644editdlrm
hash_map.hpp63130644editdlrm
hash_set.hpp58840644editdlrm
is_bitwise_serializable.hpp13990644editdlrm
item_version_type.hpp18560644editdlrm
level.hpp36210644editdlrm
level_enum.hpp21400644editdlrm
library_version_type.hpp20450644editdlrm
list.hpp24850644editdlrm
map.hpp44470644editdlrm
nvp.hpp35380644editdlrm
optional.hpp32010644editdlrm
priority_queue.hpp24130644editdlrm
queue.hpp20940644editdlrm
scoped_ptr.hpp15520644editdlrm
serialization.hpp46780644editdlrm
set.hpp42840644editdlrm
shared_ptr.hpp98210644editdlrm
shared_ptr_132.hpp73700644editdlrm
shared_ptr_helper.hpp70470644editdlrm
singleton.hpp76030644editdlrm
slist.hpp48280644editdlrm
smart_cast.hpp89440644editdlrm
split_free.hpp27340644editdlrm
split_member.hpp26400644editdlrm
stack.hpp20930644editdlrm
state_saver.hpp26910644editdlrm
static_warning.hpp38440644editdlrm
string.hpp9760644editdlrm
strong_typedef.hpp30840644editdlrm
throw_exception.hpp9470644editdlrm
tracking.hpp39900644editdlrm
tracking_enum.hpp12270644editdlrm
traits.hpp20170644editdlrm
type_info_implementation.hpp26210644editdlrm
unique_ptr.hpp19710644editdlrm
unordered_collections_load_imp.hpp24380644editdlrm
unordered_collections_save_imp.hpp29930644editdlrm
unordered_map.hpp41640644editdlrm
unordered_set.hpp40240644editdlrm
utility.hpp17890644editdlrm
valarray.hpp27540644editdlrm
variant.hpp51220644editdlrm
vector.hpp69240644editdlrm
vector_135.hpp9420644editdlrm
version.hpp42910644editdlrm
void_cast.hpp87470644editdlrm
void_cast_fwd.hpp11870644editdlrm
weak_ptr.hpp24370644editdlrm
wrapper.hpp19070644editdlrm
Edit: /usr/include/boost/serialization/shared_ptr.hpp (9821B)
#ifndef BOOST_SERIALIZATION_SHARED_PTR_HPP #define BOOST_SERIALIZATION_SHARED_PTR_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 2004 Robert Ramey and Martin Ecker // 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 // NULL #include #include #include #include #include #include #include #include #include #include #include /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // boost:: shared_ptr serialization traits // version 1 to distinguish from boost 1.32 version. Note: we can only do this // for a template when the compiler supports partial template specialization #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION namespace boost { namespace serialization{ template struct version< ::boost::shared_ptr< T > > { typedef mpl::integral_c_tag tag; #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3206)) typedef typename mpl::int_<1> type; #else typedef mpl::int_<1> type; #endif BOOST_STATIC_CONSTANT(int, value = type::value); }; // don't track shared pointers template 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; #else typedef mpl::int_< ::boost::serialization::track_never> type; #endif BOOST_STATIC_CONSTANT(int, value = type::value); }; }} #define BOOST_SERIALIZATION_SHARED_PTR(T) #else // define macro to let users of these compilers do this #define BOOST_SERIALIZATION_SHARED_PTR(T) \ BOOST_CLASS_VERSION( \ ::boost::shared_ptr< T >, \ 1 \ ) \ BOOST_CLASS_TRACKING( \ ::boost::shared_ptr< T >, \ ::boost::serialization::track_never \ ) \ /**/ #endif namespace boost { namespace serialization{ struct null_deleter { void operator()(void const *) const {} }; /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // serialization for boost::shared_ptr // Using a constant means that all shared pointers are held in the same set. // Thus we detect handle multiple pointers to the same value instances // in the archive. void * const shared_ptr_helper_id = 0; template inline void save( Archive & ar, const boost::shared_ptr< T > &t, const unsigned int /* file_version */ ){ // The most common cause of trapping here would be serializing // something like shared_ptr. This occurs because int // is never tracked by default. Wrap int in a trackable type BOOST_STATIC_ASSERT((tracking_level< T >::value != track_never)); const T * t_ptr = t.get(); ar << boost::serialization::make_nvp("px", t_ptr); } #ifdef BOOST_SERIALIZATION_SHARED_PTR_132_HPP template inline void load( Archive & ar, boost::shared_ptr< T > &t, const unsigned int file_version ){ // something like shared_ptr. This occurs because int // is never tracked by default. Wrap int in a trackable type BOOST_STATIC_ASSERT((tracking_level< T >::value != track_never)); T* r; if(file_version < 1){ ar.register_type(static_cast< boost_132::detail::sp_counted_base_impl * >(NULL)); boost_132::shared_ptr< T > sp; ar >> boost::serialization::make_nvp("px", sp.px); ar >> boost::serialization::make_nvp("pn", sp.pn); // got to keep the sps around so the sp.pns don't disappear boost::serialization::shared_ptr_helper & h = ar.template get_helper< shared_ptr_helper >( shared_ptr_helper_id ); h.append(sp); r = sp.get(); } else{ ar >> boost::serialization::make_nvp("px", r); } shared_ptr_helper & h = ar.template get_helper >( shared_ptr_helper_id ); h.reset(t,r); } #else template inline void load( Archive & ar, boost::shared_ptr< T > &t, const unsigned int /*file_version*/ ){ // The most common cause of trapping here would be serializing // something like shared_ptr. This occurs because int // is never tracked by default. Wrap int in a trackable type BOOST_STATIC_ASSERT((tracking_level< T >::value != track_never)); T* r; ar >> boost::serialization::make_nvp("px", r); boost::serialization::shared_ptr_helper & h = ar.template get_helper >( shared_ptr_helper_id ); h.reset(t,r); } #endif template inline void serialize( Archive & ar, boost::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); } } // namespace serialization } // namespace boost /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // std::shared_ptr serialization traits // version 1 to distinguish from boost 1.32 version. Note: we can only do this // for a template when the compiler supports partial template specialization #ifndef BOOST_NO_CXX11_SMART_PTR #include // note: we presume that any compiler/library which supports C++11 // std::pointers also supports template partial specialization // trap here if such presumption were to turn out to wrong!!! #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION BOOST_STATIC_ASSERT(false); #endif namespace boost { namespace serialization{ template struct version< ::std::shared_ptr< T > > { typedef mpl::integral_c_tag tag; typedef mpl::int_<1> type; BOOST_STATIC_CONSTANT(int, value = type::value); }; // don't track shared pointers template 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); }; }} // the following just keeps older programs from breaking #define BOOST_SERIALIZATION_SHARED_PTR(T) namespace boost { namespace serialization{ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // serialization for std::shared_ptr template inline void save( Archive & ar, const std::shared_ptr< T > &t, const unsigned int /* file_version */ ){ // The most common cause of trapping here would be serializing // something like shared_ptr. This occurs because int // is never tracked by default. Wrap int in a trackable type BOOST_STATIC_ASSERT((tracking_level< T >::value != track_never)); const T * t_ptr = t.get(); ar << boost::serialization::make_nvp("px", t_ptr); } template inline void load( Archive & ar, std::shared_ptr< T > &t, const unsigned int /*file_version*/ ){ // The most common cause of trapping here would be serializing // something like shared_ptr. This occurs because int // is never tracked by default. Wrap int in a trackable type BOOST_STATIC_ASSERT((tracking_level< T >::value != track_never)); T* r; ar >> boost::serialization::make_nvp("px", r); //void (* const id)(Archive &, std::shared_ptr< T > &, const unsigned int) = & load; boost::serialization::shared_ptr_helper & h = ar.template get_helper< shared_ptr_helper >( shared_ptr_helper_id ); h.reset(t,r); } template inline void serialize( Archive & ar, std::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); } } // namespace serialization } // namespace boost #endif // BOOST_NO_CXX11_SMART_PTR #endif // BOOST_SERIALIZATION_SHARED_PTR_HPP