mirror of
https://github.com/boostorg/serialization.git
synced 2026-01-30 08:12:09 +00:00
More cleanups
[SVN r31860]
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// polymorphic_iarchive_impl.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)
|
||||
@@ -24,15 +24,15 @@
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#if defined(BOOST_NO_STDC_NAMESPACE)
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
} // namespace std
|
||||
#endif
|
||||
|
||||
#include <boost/archive/polymorphic_iarchive.hpp>
|
||||
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
template<class T>
|
||||
class shared_ptr;
|
||||
namespace serialization {
|
||||
@@ -45,9 +45,9 @@ class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iserializer;
|
||||
class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer;
|
||||
|
||||
template<class ArchiveImplementation>
|
||||
class polymorphic_iarchive_impl :
|
||||
class polymorphic_iarchive_impl :
|
||||
public polymorphic_iarchive,
|
||||
// note: gcc dynamic cross cast fails if the the derivation below is
|
||||
// note: gcc dynamic cross cast fails if the the derivation below is
|
||||
// not public. I think this is a mistake.
|
||||
public /*protected*/ ArchiveImplementation,
|
||||
private boost::noncopyable
|
||||
@@ -55,13 +55,13 @@ class polymorphic_iarchive_impl :
|
||||
private:
|
||||
// these are used by the serialization library.
|
||||
virtual void load_object(
|
||||
void *t,
|
||||
void *t,
|
||||
const basic_iserializer & bis
|
||||
){
|
||||
ArchiveImplementation::load_object(t, bis);
|
||||
}
|
||||
virtual const basic_pointer_iserializer * load_pointer(
|
||||
void * & t,
|
||||
void * & t,
|
||||
const basic_pointer_iserializer * bpis_ptr,
|
||||
const basic_pointer_iserializer * (*finder)(
|
||||
const boost::serialization::extended_type_info & type
|
||||
@@ -82,7 +82,7 @@ private:
|
||||
ArchiveImplementation::delete_created_pointers();
|
||||
}
|
||||
virtual void reset_object_address(
|
||||
const void * new_address,
|
||||
const void * new_address,
|
||||
const void * old_address
|
||||
){
|
||||
ArchiveImplementation::reset_object_address(new_address, old_address);
|
||||
@@ -162,25 +162,25 @@ private:
|
||||
ArchiveImplementation::register_basic_serializer(bis);
|
||||
}
|
||||
virtual void lookup_basic_helper(
|
||||
const boost::serialization::extended_type_info * const eti,
|
||||
const boost::serialization::extended_type_info * const eti,
|
||||
boost::shared_ptr<void> & sph
|
||||
){
|
||||
ArchiveImplementation::lookup_basic_helper(eti, sph);
|
||||
}
|
||||
){
|
||||
ArchiveImplementation::lookup_basic_helper(eti, sph);
|
||||
}
|
||||
virtual void insert_basic_helper(
|
||||
const boost::serialization::extended_type_info * const eti,
|
||||
boost::shared_ptr<void> & sph
|
||||
){
|
||||
ArchiveImplementation::insert_basic_helper(eti, sph);
|
||||
}
|
||||
const boost::serialization::extended_type_info * const eti,
|
||||
boost::shared_ptr<void> & sph
|
||||
){
|
||||
ArchiveImplementation::insert_basic_helper(eti, sph);
|
||||
}
|
||||
public:
|
||||
// the >> operator
|
||||
// the >> operator
|
||||
template<class T>
|
||||
polymorphic_iarchive & operator>>(T & t){
|
||||
return polymorphic_iarchive::operator>>(t);
|
||||
}
|
||||
|
||||
// the & operator
|
||||
// the & operator
|
||||
template<class T>
|
||||
polymorphic_iarchive & operator&(T & t){
|
||||
return polymorphic_iarchive::operator&(t);
|
||||
@@ -189,7 +189,7 @@ public:
|
||||
// all current archives take a stream as constructor argument
|
||||
template <class _Elem, class _Tr>
|
||||
polymorphic_iarchive_impl(
|
||||
std::basic_istream<_Elem, _Tr> & is,
|
||||
std::basic_istream<_Elem, _Tr> & is,
|
||||
unsigned int flags = 0
|
||||
) :
|
||||
ArchiveImplementation(is, flags)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// polymorphic_oarchive_impl.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)
|
||||
@@ -24,15 +24,15 @@
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#if defined(BOOST_NO_STDC_NAMESPACE)
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
} // namespace std
|
||||
#endif
|
||||
|
||||
#include <boost/archive/polymorphic_oarchive.hpp>
|
||||
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
template<class T>
|
||||
class shared_ptr;
|
||||
namespace serialization {
|
||||
@@ -45,9 +45,9 @@ class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oserializer;
|
||||
class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer;
|
||||
|
||||
template<class ArchiveImplementation>
|
||||
class polymorphic_oarchive_impl :
|
||||
class polymorphic_oarchive_impl :
|
||||
public polymorphic_oarchive,
|
||||
// note: gcc dynamic cross cast fails if the the derivation below is
|
||||
// note: gcc dynamic cross cast fails if the the derivation below is
|
||||
// not public. I think this is a mistake.
|
||||
public /*protected*/ ArchiveImplementation,
|
||||
private boost::noncopyable
|
||||
@@ -55,13 +55,13 @@ class polymorphic_oarchive_impl :
|
||||
private:
|
||||
// these are used by the serialization library.
|
||||
virtual void save_object(
|
||||
const void *x,
|
||||
const void *x,
|
||||
const detail::basic_oserializer & bos
|
||||
){
|
||||
ArchiveImplementation::save_object(x, bos);
|
||||
}
|
||||
virtual void save_pointer(
|
||||
const void * t,
|
||||
const void * t,
|
||||
const detail::basic_pointer_oserializer * bpos_ptr
|
||||
){
|
||||
ArchiveImplementation::save_pointer(t, bpos_ptr);
|
||||
@@ -152,24 +152,24 @@ private:
|
||||
ArchiveImplementation::register_basic_serializer(bos);
|
||||
}
|
||||
virtual void lookup_basic_helper(
|
||||
const boost::serialization::extended_type_info * const eti,
|
||||
shared_ptr<void> & sph
|
||||
){
|
||||
ArchiveImplementation::lookup_basic_helper(eti, sph);
|
||||
}
|
||||
const boost::serialization::extended_type_info * const eti,
|
||||
shared_ptr<void> & sph
|
||||
){
|
||||
ArchiveImplementation::lookup_basic_helper(eti, sph);
|
||||
}
|
||||
virtual void insert_basic_helper(
|
||||
const boost::serialization::extended_type_info * const eti,
|
||||
shared_ptr<void> & sph
|
||||
){
|
||||
ArchiveImplementation::insert_basic_helper(eti, sph);
|
||||
}
|
||||
const boost::serialization::extended_type_info * const eti,
|
||||
shared_ptr<void> & sph
|
||||
){
|
||||
ArchiveImplementation::insert_basic_helper(eti, sph);
|
||||
}
|
||||
public:
|
||||
// the << operator
|
||||
template<class T>
|
||||
polymorphic_oarchive & operator<<(T & t){
|
||||
return polymorphic_oarchive::operator<<(t);
|
||||
}
|
||||
// the & operator
|
||||
// the & operator
|
||||
template<class T>
|
||||
polymorphic_oarchive & operator&(T & t){
|
||||
return polymorphic_oarchive::operator&(t);
|
||||
@@ -177,7 +177,7 @@ public:
|
||||
// all current archives take a stream as constructor argument
|
||||
template <class _Elem, class _Tr>
|
||||
polymorphic_oarchive_impl(
|
||||
std::basic_ostream<_Elem, _Tr> & os,
|
||||
std::basic_ostream<_Elem, _Tr> & os,
|
||||
unsigned int flags = 0
|
||||
) :
|
||||
ArchiveImplementation(os, flags)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// polymorphic_iarchive.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,8 +20,8 @@
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if defined(BOOST_NO_STDC_NAMESPACE)
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
} // namespace std
|
||||
#endif
|
||||
|
||||
@@ -100,11 +100,11 @@ public:
|
||||
virtual void register_basic_serializer(const detail::basic_iserializer & bis) = 0;
|
||||
virtual void lookup_basic_helper(
|
||||
const boost::serialization::extended_type_info * const eti,
|
||||
boost::shared_ptr<void> & sph
|
||||
boost::shared_ptr<void> & sph
|
||||
) = 0;
|
||||
virtual void insert_basic_helper(
|
||||
const boost::serialization::extended_type_info * const eti,
|
||||
boost::shared_ptr<void> & sph
|
||||
boost::shared_ptr<void> & sph
|
||||
) = 0;
|
||||
|
||||
// msvc and borland won't automatically pass these to the base class so
|
||||
@@ -120,7 +120,7 @@ public:
|
||||
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
const
|
||||
#endif
|
||||
boost::serialization::nvp<T> & t,
|
||||
boost::serialization::nvp<T> & t,
|
||||
int
|
||||
){
|
||||
load_start(t.name());
|
||||
@@ -134,7 +134,7 @@ public:
|
||||
virtual unsigned int get_flags() const = 0;
|
||||
virtual void delete_created_pointers() = 0;
|
||||
virtual void reset_object_address(
|
||||
const void * new_address,
|
||||
const void * new_address,
|
||||
const void * old_address
|
||||
) = 0;
|
||||
|
||||
@@ -142,11 +142,11 @@ public:
|
||||
|
||||
// these are used by the serialization library implementation.
|
||||
virtual void load_object(
|
||||
void *t,
|
||||
void *t,
|
||||
const detail::basic_iserializer & bis
|
||||
) = 0;
|
||||
virtual const detail::basic_pointer_iserializer * load_pointer(
|
||||
void * & t,
|
||||
void * & t,
|
||||
const detail::basic_pointer_iserializer * bpis_ptr,
|
||||
const detail::basic_pointer_iserializer * (*finder)(
|
||||
const boost::serialization::extended_type_info & type
|
||||
@@ -157,7 +157,7 @@ public:
|
||||
} // namespace archive
|
||||
} // namespace boost
|
||||
|
||||
// required by smart_cast for compilers not implementing
|
||||
// required by smart_cast for compilers not implementing
|
||||
// partial template specialization
|
||||
BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(boost::archive::polymorphic_iarchive)
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// polymorphic_oarchive.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)
|
||||
@@ -21,8 +21,8 @@
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#if defined(BOOST_NO_STDC_NAMESPACE)
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
} // namespace std
|
||||
#endif
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace std{
|
||||
# define BOOST_NO_INTRINSIC_INT64_T
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
template<class T>
|
||||
class shared_ptr;
|
||||
namespace serialization {
|
||||
@@ -99,11 +99,11 @@ public:
|
||||
virtual void register_basic_serializer(const detail::basic_oserializer & bos) = 0;
|
||||
virtual void lookup_basic_helper(
|
||||
const boost::serialization::extended_type_info * const eti,
|
||||
boost::shared_ptr<void> & sph
|
||||
boost::shared_ptr<void> & sph
|
||||
) = 0;
|
||||
virtual void insert_basic_helper(
|
||||
const boost::serialization::extended_type_info * const eti,
|
||||
shared_ptr<void> & sph
|
||||
shared_ptr<void> & sph
|
||||
) = 0;
|
||||
|
||||
virtual unsigned int get_library_version() const = 0;
|
||||
@@ -134,7 +134,7 @@ public:
|
||||
virtual void save_binary(const void * t, std::size_t size) = 0;
|
||||
|
||||
virtual void save_object(
|
||||
const void *x,
|
||||
const void *x,
|
||||
const detail::basic_oserializer & bos
|
||||
) = 0;
|
||||
virtual void save_pointer(
|
||||
@@ -146,7 +146,7 @@ public:
|
||||
} // namespace archive
|
||||
} // namespace boost
|
||||
|
||||
// required by smart_cast for compilers not implementing
|
||||
// required by smart_cast for compilers not implementing
|
||||
// partial template specialization
|
||||
BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(boost::archive::polymorphic_oarchive)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user