/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/variant.hpp (5122B)
#ifndef BOOST_SERIALIZATION_VARIANT_HPP #define BOOST_SERIALIZATION_VARIANT_HPP // MS compatible compilers support #pragma once #if defined(_MSC_VER) # pragma once #endif /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // variant.hpp - non-intrusive serialization of variant types // // copyright (c) 2005 // troy d. straszheim // http://www.resophonic.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. // // thanks to Robert Ramey, Peter Dimov, and Richard Crossley. // #include #include #include #include #include #include #include #include #include #include #include #include namespace boost { namespace serialization { template struct variant_save_visitor : boost::static_visitor<> { variant_save_visitor(Archive& ar) : m_ar(ar) {} template void operator()(T const & value) const { m_ar << BOOST_SERIALIZATION_NVP(value); } private: Archive & m_ar; }; template void save( Archive & ar, boost::variant const & v, unsigned int /*version*/ ){ int which = v.which(); ar << BOOST_SERIALIZATION_NVP(which); variant_save_visitor visitor(ar); v.apply_visitor(visitor); } template struct variant_impl { struct load_null { template static void invoke( Archive & /*ar*/, int /*which*/, V & /*v*/, const unsigned int /*version*/ ){} }; struct load_impl { template static void invoke( Archive & ar, int which, V & v, const unsigned int version ){ if(which == 0){ // note: A non-intrusive implementation (such as this one) // necessary has to copy the value. This wouldn't be necessary // with an implementation that de-serialized to the address of the // aligned storage included in the variant. typedef typename mpl::front::type head_type; head_type value; ar >> BOOST_SERIALIZATION_NVP(value); v = value; head_type * new_address = & boost::get(v); ar.reset_object_address(new_address, & value); return; } typedef typename mpl::pop_front::type type; variant_impl::load(ar, which - 1, v, version); } }; template static void load( Archive & ar, int which, V & v, const unsigned int version ){ typedef typename mpl::eval_if, mpl::identity, mpl::identity >::type typex; typex::invoke(ar, which, v, version); } }; template void load( Archive & ar, boost::variant& v, const unsigned int version ){ int which; typedef typename boost::variant::types types; ar >> BOOST_SERIALIZATION_NVP(which); if(which >= mpl::size::value) // this might happen if a type was removed from the list of variant types boost::serialization::throw_exception( boost::archive::archive_exception( boost::archive::archive_exception::unsupported_version ) ); variant_impl::load(ar, which, v, version); } template inline void serialize( Archive & ar, boost::variant & v, const unsigned int file_version ){ split_free(ar,v,file_version); } } // namespace serialization } // namespace boost //template #include namespace boost { namespace serialization { template struct tracking_level< variant >{ typedef mpl::integral_c_tag tag; typedef mpl::int_< ::boost::serialization::track_always> type; BOOST_STATIC_CONSTANT(int, value = type::value); }; } // namespace serialization } // namespace boost #endif //BOOST_SERIALIZATION_VARIANT_HPP