mirror of
https://github.com/shadps4-emu/ext-boost.git
synced 2024-11-23 03:19:42 +00:00
Update to 1.80.0
This commit is contained in:
parent
c62b3c95df
commit
774b7328a2
24
Jamroot
24
Jamroot
@ -144,9 +144,12 @@ import option ;
|
||||
import tools/boost\_install/boost-install ;
|
||||
|
||||
path-constant BOOST_ROOT : . ;
|
||||
constant BOOST_VERSION : 1.71.0 ;
|
||||
constant BOOST_VERSION : 1.80.0 ;
|
||||
constant BOOST_JAMROOT_MODULE : $(__name__) ;
|
||||
|
||||
# Allow subprojects to simply `import config : requires ;` to get access to the requires rule
|
||||
modules.poke : BOOST_BUILD_PATH : $(BOOST_ROOT)/libs/config/checks [ modules.peek : BOOST_BUILD_PATH ] ;
|
||||
|
||||
boostcpp.set-version $(BOOST_VERSION) ;
|
||||
|
||||
use-project /boost/architecture : libs/config/checks/architecture ;
|
||||
@ -210,18 +213,15 @@ rule handle-static-runtime ( properties * )
|
||||
# dangerous on Windows. Therefore, we disallow it. This might be drastic,
|
||||
# but it was disabled for a while without anybody complaining.
|
||||
|
||||
# For CW, static runtime is needed so that std::locale works.
|
||||
if <link>shared in $(properties) && <runtime-link>static in $(properties) &&
|
||||
! ( <toolset>cw in $(properties) )
|
||||
{
|
||||
if ! $(.shared-static-warning-emitted)
|
||||
{
|
||||
ECHO "warning: skipping configuration link=shared, runtime-link=static" ;
|
||||
ECHO "warning: this combination is either impossible or too dangerous" ;
|
||||
ECHO "warning: to be of any use" ;
|
||||
.shared-static-warning-emitted = 1 ;
|
||||
}
|
||||
local argv = [ modules.peek : ARGV ] ;
|
||||
|
||||
if <link>shared in $(properties)
|
||||
&& <runtime-link>static in $(properties)
|
||||
# For CW, static runtime is needed so that std::locale works.
|
||||
&& ! ( <toolset>cw in $(properties) )
|
||||
&& ! --allow-shared-static in $(argv)
|
||||
{
|
||||
boostcpp.emit-shared-static-warning ;
|
||||
return <build>no ;
|
||||
}
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ namespace boost {
|
||||
template< typename T1, typename T2 >
|
||||
bool operator()( const T1& Arg1, const T2& Arg2 ) const
|
||||
{
|
||||
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
|
||||
#if defined(BOOST_BORLANDC) && (BOOST_BORLANDC >= 0x560) && (BOOST_BORLANDC <= 0x564) && !defined(_USE_OLD_RW_STL)
|
||||
return std::toupper(Arg1)==std::toupper(Arg2);
|
||||
#else
|
||||
return std::toupper<T1>(Arg1,m_Loc)==std::toupper<T2>(Arg2,m_Loc);
|
||||
@ -118,7 +118,7 @@ namespace boost {
|
||||
template< typename T1, typename T2 >
|
||||
bool operator()( const T1& Arg1, const T2& Arg2 ) const
|
||||
{
|
||||
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
|
||||
#if defined(BOOST_BORLANDC) && (BOOST_BORLANDC >= 0x560) && (BOOST_BORLANDC <= 0x564) && !defined(_USE_OLD_RW_STL)
|
||||
return std::toupper(Arg1)<std::toupper(Arg2);
|
||||
#else
|
||||
return std::toupper<T1>(Arg1,m_Loc)<std::toupper<T2>(Arg2,m_Loc);
|
||||
@ -171,7 +171,7 @@ namespace boost {
|
||||
template< typename T1, typename T2 >
|
||||
bool operator()( const T1& Arg1, const T2& Arg2 ) const
|
||||
{
|
||||
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
|
||||
#if defined(BOOST_BORLANDC) && (BOOST_BORLANDC >= 0x560) && (BOOST_BORLANDC <= 0x564) && !defined(_USE_OLD_RW_STL)
|
||||
return std::toupper(Arg1)<=std::toupper(Arg2);
|
||||
#else
|
||||
return std::toupper<T1>(Arg1,m_Loc)<=std::toupper<T2>(Arg2,m_Loc);
|
||||
|
@ -15,6 +15,9 @@
|
||||
#include <locale>
|
||||
#include <functional>
|
||||
|
||||
#include <boost/iterator/transform_iterator.hpp>
|
||||
#include <boost/range/begin.hpp>
|
||||
#include <boost/range/end.hpp>
|
||||
#include <boost/type_traits/make_unsigned.hpp>
|
||||
|
||||
namespace boost {
|
||||
@ -40,7 +43,7 @@ namespace boost {
|
||||
// Operation
|
||||
CharT operator ()( CharT Ch ) const
|
||||
{
|
||||
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
|
||||
#if defined(BOOST_BORLANDC) && (BOOST_BORLANDC >= 0x560) && (BOOST_BORLANDC <= 0x564) && !defined(_USE_OLD_RW_STL)
|
||||
return std::tolower( static_cast<typename boost::make_unsigned <CharT>::type> ( Ch ));
|
||||
#else
|
||||
return std::tolower<CharT>( Ch, *m_Loc );
|
||||
@ -62,7 +65,7 @@ namespace boost {
|
||||
// Operation
|
||||
CharT operator ()( CharT Ch ) const
|
||||
{
|
||||
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
|
||||
#if defined(BOOST_BORLANDC) && (BOOST_BORLANDC >= 0x560) && (BOOST_BORLANDC <= 0x564) && !defined(_USE_OLD_RW_STL)
|
||||
return std::toupper( static_cast<typename boost::make_unsigned <CharT>::type> ( Ch ));
|
||||
#else
|
||||
return std::toupper<CharT>( Ch, *m_Loc );
|
||||
|
@ -18,6 +18,8 @@
|
||||
#include <boost/algorithm/string/detail/find_format_store.hpp>
|
||||
#include <boost/algorithm/string/detail/replace_storage.hpp>
|
||||
|
||||
#include <deque>
|
||||
|
||||
namespace boost {
|
||||
namespace algorithm {
|
||||
namespace detail {
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
#include <boost/algorithm/string/config.hpp>
|
||||
#include <boost/algorithm/string/constants.hpp>
|
||||
#include <boost/detail/iterator.hpp>
|
||||
#include <iterator>
|
||||
|
||||
#include <boost/range/iterator_range_core.hpp>
|
||||
#include <boost/range/begin.hpp>
|
||||
@ -127,8 +127,8 @@ namespace boost {
|
||||
if( boost::empty(m_Search) )
|
||||
return result_type( End, End );
|
||||
|
||||
typedef BOOST_STRING_TYPENAME boost::detail::
|
||||
iterator_traits<ForwardIteratorT>::iterator_category category;
|
||||
typedef BOOST_STRING_TYPENAME
|
||||
std::iterator_traits<ForwardIteratorT>::iterator_category category;
|
||||
|
||||
return findit( Begin, End, category() );
|
||||
}
|
||||
@ -344,9 +344,8 @@ namespace boost {
|
||||
typedef iterator_range<ForwardIteratorT> result_type;
|
||||
|
||||
input_iterator_type It=Begin;
|
||||
for(
|
||||
unsigned int Index=0;
|
||||
Index<N && It!=End; ++Index,++It ) {};
|
||||
for( unsigned int Index=0; Index<N && It!=End; ++Index,++It )
|
||||
;
|
||||
|
||||
return result_type( Begin, It );
|
||||
}
|
||||
@ -375,8 +374,8 @@ namespace boost {
|
||||
ForwardIteratorT End,
|
||||
unsigned int N )
|
||||
{
|
||||
typedef BOOST_STRING_TYPENAME boost::detail::
|
||||
iterator_traits<ForwardIteratorT>::iterator_category category;
|
||||
typedef BOOST_STRING_TYPENAME
|
||||
std::iterator_traits<ForwardIteratorT>::iterator_category category;
|
||||
|
||||
return ::boost::algorithm::detail::find_head_impl( Begin, End, N, category() );
|
||||
}
|
||||
@ -397,10 +396,12 @@ namespace boost {
|
||||
input_iterator_type It2=Begin;
|
||||
|
||||
// Advance It2 by N increments
|
||||
for( Index=0; Index<N && It2!=End; ++Index,++It2 ) {};
|
||||
for( Index=0; Index<N && It2!=End; ++Index,++It2 )
|
||||
;
|
||||
|
||||
// Advance It, It2 to the end
|
||||
for(; It2!=End; ++It,++It2 ) {};
|
||||
for(; It2!=End; ++It,++It2 )
|
||||
;
|
||||
|
||||
return result_type( It, It2 );
|
||||
}
|
||||
@ -417,9 +418,8 @@ namespace boost {
|
||||
typedef iterator_range<ForwardIteratorT> result_type;
|
||||
|
||||
input_iterator_type It=End;
|
||||
for(
|
||||
unsigned int Index=0;
|
||||
Index<N && It!=Begin; ++Index,--It ) {};
|
||||
for( unsigned int Index=0; Index<N && It!=Begin; ++Index,--It )
|
||||
;
|
||||
|
||||
return result_type( It, End );
|
||||
}
|
||||
@ -448,8 +448,8 @@ namespace boost {
|
||||
ForwardIteratorT End,
|
||||
unsigned int N )
|
||||
{
|
||||
typedef BOOST_STRING_TYPENAME boost::detail::
|
||||
iterator_traits<ForwardIteratorT>::iterator_category category;
|
||||
typedef BOOST_STRING_TYPENAME
|
||||
std::iterator_traits<ForwardIteratorT>::iterator_category category;
|
||||
|
||||
return ::boost::algorithm::detail::find_tail_impl( Begin, End, N, category() );
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ namespace boost {
|
||||
m_Format(::boost::begin(Format), ::boost::end(Format)) {}
|
||||
|
||||
// Operation
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
|
||||
template<typename Range2T>
|
||||
result_type& operator()(const Range2T&)
|
||||
{
|
||||
|
@ -12,7 +12,6 @@
|
||||
#define BOOST_STRING_FIND_FORMAT_HPP
|
||||
|
||||
#include <deque>
|
||||
#include <boost/detail/iterator.hpp>
|
||||
#include <boost/range/iterator_range_core.hpp>
|
||||
#include <boost/range/begin.hpp>
|
||||
#include <boost/range/end.hpp>
|
||||
@ -40,7 +39,7 @@ namespace boost {
|
||||
this substring and replace it in the input.
|
||||
The result is a modified copy of the input. It is returned as a sequence
|
||||
or copied to the output iterator.
|
||||
|
||||
|
||||
\param Output An output iterator to which the result will be copied
|
||||
\param Input An input sequence
|
||||
\param Finder A Finder object used to search for a match to be replaced
|
||||
|
@ -11,7 +11,6 @@
|
||||
#ifndef BOOST_STRING_FORMATTER_HPP
|
||||
#define BOOST_STRING_FORMATTER_HPP
|
||||
|
||||
#include <boost/detail/iterator.hpp>
|
||||
#include <boost/range/value_type.hpp>
|
||||
#include <boost/range/iterator_range_core.hpp>
|
||||
#include <boost/range/as_literal.hpp>
|
||||
|
19
boost/align/align.hpp
Normal file
19
boost/align/align.hpp
Normal file
@ -0,0 +1,19 @@
|
||||
/*
|
||||
Copyright 2014-2015 Glen Joseph Fernandes
|
||||
(glenjofe@gmail.com)
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
#ifndef BOOST_ALIGN_ALIGN_HPP
|
||||
#define BOOST_ALIGN_ALIGN_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_STD_ALIGN) && !defined(BOOST_LIBSTDCXX_VERSION)
|
||||
#include <boost/align/detail/align_cxx11.hpp>
|
||||
#else
|
||||
#include <boost/align/detail/align.hpp>
|
||||
#endif
|
||||
|
||||
#endif
|
47
boost/align/aligned_alloc.hpp
Normal file
47
boost/align/aligned_alloc.hpp
Normal file
@ -0,0 +1,47 @@
|
||||
/*
|
||||
Copyright 2014-2015 Glen Joseph Fernandes
|
||||
(glenjofe@gmail.com)
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
#ifndef BOOST_ALIGN_ALIGNED_ALLOC_HPP
|
||||
#define BOOST_ALIGN_ALIGNED_ALLOC_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if defined(BOOST_HAS_UNISTD_H)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__) || defined(__APPLE_CC__) || defined(macintosh)
|
||||
#include <AvailabilityMacros.h>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_ALIGN_USE_ALIGN)
|
||||
#include <boost/align/detail/aligned_alloc.hpp>
|
||||
#elif defined(BOOST_ALIGN_USE_NEW)
|
||||
#include <boost/align/detail/aligned_alloc_new.hpp>
|
||||
#elif defined(_MSC_VER) && !defined(UNDER_CE)
|
||||
#include <boost/align/detail/aligned_alloc_msvc.hpp>
|
||||
#elif defined(__MINGW32__) && (__MSVCRT_VERSION__ >= 0x0700)
|
||||
#include <boost/align/detail/aligned_alloc_msvc.hpp>
|
||||
#elif defined(__MINGW32__)
|
||||
#include <boost/align/detail/aligned_alloc_mingw.hpp>
|
||||
#elif MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
|
||||
#include <boost/align/detail/aligned_alloc_posix.hpp>
|
||||
#elif MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
|
||||
#include <boost/align/detail/aligned_alloc_macos.hpp>
|
||||
#elif defined(__ANDROID__)
|
||||
#include <boost/align/detail/aligned_alloc_android.hpp>
|
||||
#elif defined(__SunOS_5_11) || defined(__SunOS_5_12)
|
||||
#include <boost/align/detail/aligned_alloc_posix.hpp>
|
||||
#elif defined(sun) || defined(__sun)
|
||||
#include <boost/align/detail/aligned_alloc_sunos.hpp>
|
||||
#elif (_POSIX_C_SOURCE >= 200112L) || (_XOPEN_SOURCE >= 600)
|
||||
#include <boost/align/detail/aligned_alloc_posix.hpp>
|
||||
#else
|
||||
#include <boost/align/detail/aligned_alloc.hpp>
|
||||
#endif
|
||||
|
||||
#endif
|
54
boost/align/alignment_of.hpp
Normal file
54
boost/align/alignment_of.hpp
Normal file
@ -0,0 +1,54 @@
|
||||
/*
|
||||
Copyright 2014-2016 Glen Joseph Fernandes
|
||||
(glenjofe@gmail.com)
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
#ifndef BOOST_ALIGN_ALIGNMENT_OF_HPP
|
||||
#define BOOST_ALIGN_ALIGNMENT_OF_HPP
|
||||
|
||||
#include <boost/align/detail/element_type.hpp>
|
||||
#include <boost/align/alignment_of_forward.hpp>
|
||||
|
||||
#if defined(_MSC_VER) && defined(__clang__)
|
||||
#include <boost/align/detail/alignment_of_cxx11.hpp>
|
||||
#elif defined(BOOST_MSVC)
|
||||
#include <boost/align/detail/alignment_of_msvc.hpp>
|
||||
#elif defined(__GNUC__) && defined(__unix__) && !defined(__LP64__)
|
||||
#include <boost/align/detail/alignment_of.hpp>
|
||||
#elif defined(BOOST_CLANG) && !defined(__x86_64__)
|
||||
#include <boost/align/detail/alignment_of.hpp>
|
||||
#elif !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS)
|
||||
#include <boost/align/detail/alignment_of_cxx11.hpp>
|
||||
#elif defined(__ghs__) && (__GHS_VERSION_NUMBER >= 600)
|
||||
#include <boost/align/detail/alignment_of_gcc.hpp>
|
||||
#elif defined(BOOST_CODEGEARC)
|
||||
#include <boost/align/detail/alignment_of_codegear.hpp>
|
||||
#elif defined(BOOST_CLANG)
|
||||
#include <boost/align/detail/alignment_of_clang.hpp>
|
||||
#elif __GNUC__ > 4
|
||||
#include <boost/align/detail/alignment_of_gcc.hpp>
|
||||
#elif (__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)
|
||||
#include <boost/align/detail/alignment_of_gcc.hpp>
|
||||
#else
|
||||
#include <boost/align/detail/alignment_of.hpp>
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace alignment {
|
||||
|
||||
template<class T>
|
||||
struct alignment_of
|
||||
: detail::alignment_of<typename
|
||||
detail::element_type<T>::type>::type { };
|
||||
|
||||
#if !defined(BOOST_NO_CXX14_VARIABLE_TEMPLATES)
|
||||
template<class T>
|
||||
constexpr std::size_t alignment_of_v = alignment_of<T>::value;
|
||||
#endif
|
||||
|
||||
} /* alignment */
|
||||
} /* boost */
|
||||
|
||||
#endif
|
20
boost/align/alignment_of_forward.hpp
Normal file
20
boost/align/alignment_of_forward.hpp
Normal file
@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright 2014 Glen Joseph Fernandes
|
||||
(glenjofe@gmail.com)
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
#ifndef BOOST_ALIGN_ALIGNMENT_OF_FORWARD_HPP
|
||||
#define BOOST_ALIGN_ALIGNMENT_OF_FORWARD_HPP
|
||||
|
||||
namespace boost {
|
||||
namespace alignment {
|
||||
|
||||
template<class T>
|
||||
struct alignment_of;
|
||||
|
||||
} /* alignment */
|
||||
} /* boost */
|
||||
|
||||
#endif
|
38
boost/align/detail/align.hpp
Normal file
38
boost/align/detail/align.hpp
Normal file
@ -0,0 +1,38 @@
|
||||
/*
|
||||
Copyright 2014-2020 Glen Joseph Fernandes
|
||||
(glenjofe@gmail.com)
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
#ifndef BOOST_ALIGN_DETAIL_ALIGN_HPP
|
||||
#define BOOST_ALIGN_DETAIL_ALIGN_HPP
|
||||
|
||||
#include <boost/align/detail/is_alignment.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace alignment {
|
||||
|
||||
inline void*
|
||||
align(std::size_t alignment, std::size_t size, void*& ptr,
|
||||
std::size_t& space)
|
||||
{
|
||||
BOOST_ASSERT(boost::alignment::detail::is_alignment(alignment));
|
||||
if (size <= space) {
|
||||
char* p = reinterpret_cast<char*>(~(alignment - 1) &
|
||||
(reinterpret_cast<std::size_t>(ptr) + alignment - 1));
|
||||
std::size_t n = p - static_cast<char*>(ptr);
|
||||
if (n <= space - size) {
|
||||
ptr = p;
|
||||
space -= n;
|
||||
return p;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
} /* alignment */
|
||||
} /* boost */
|
||||
|
||||
#endif
|
21
boost/align/detail/align_cxx11.hpp
Normal file
21
boost/align/detail/align_cxx11.hpp
Normal file
@ -0,0 +1,21 @@
|
||||
/*
|
||||
Copyright 2014 Glen Joseph Fernandes
|
||||
(glenjofe@gmail.com)
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
#ifndef BOOST_ALIGN_DETAIL_ALIGN_CXX11_HPP
|
||||
#define BOOST_ALIGN_DETAIL_ALIGN_CXX11_HPP
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace boost {
|
||||
namespace alignment {
|
||||
|
||||
using std::align;
|
||||
|
||||
} /* alignment */
|
||||
} /* boost */
|
||||
|
||||
#endif
|
52
boost/align/detail/aligned_alloc.hpp
Normal file
52
boost/align/detail/aligned_alloc.hpp
Normal file
@ -0,0 +1,52 @@
|
||||
/*
|
||||
Copyright 2014-2015 Glen Joseph Fernandes
|
||||
(glenjofe@gmail.com)
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
#ifndef BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_HPP
|
||||
#define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_HPP
|
||||
|
||||
#include <boost/align/detail/is_alignment.hpp>
|
||||
#include <boost/align/align.hpp>
|
||||
#include <boost/align/alignment_of.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
#include <cstdlib>
|
||||
|
||||
namespace boost {
|
||||
namespace alignment {
|
||||
|
||||
inline void*
|
||||
aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_ASSERT(detail::is_alignment(alignment));
|
||||
enum {
|
||||
N = alignment_of<void*>::value
|
||||
};
|
||||
if (alignment < N) {
|
||||
alignment = N;
|
||||
}
|
||||
std::size_t n = size + alignment - N;
|
||||
void* p = std::malloc(sizeof(void*) + n);
|
||||
if (p) {
|
||||
void* r = static_cast<char*>(p) + sizeof(void*);
|
||||
(void)boost::alignment::align(alignment, size, r, n);
|
||||
*(static_cast<void**>(r) - 1) = p;
|
||||
p = r;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
inline void
|
||||
aligned_free(void* ptr) BOOST_NOEXCEPT
|
||||
{
|
||||
if (ptr) {
|
||||
std::free(*(static_cast<void**>(ptr) - 1));
|
||||
}
|
||||
}
|
||||
|
||||
} /* alignment */
|
||||
} /* boost */
|
||||
|
||||
#endif
|
34
boost/align/detail/aligned_alloc_android.hpp
Normal file
34
boost/align/detail/aligned_alloc_android.hpp
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
Copyright 2014 Glen Joseph Fernandes
|
||||
(glenjofe@gmail.com)
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
#ifndef BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_ANDROID_HPP
|
||||
#define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_ANDROID_HPP
|
||||
|
||||
#include <boost/align/detail/is_alignment.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
#include <malloc.h>
|
||||
|
||||
namespace boost {
|
||||
namespace alignment {
|
||||
|
||||
inline void*
|
||||
aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_ASSERT(detail::is_alignment(alignment));
|
||||
return ::memalign(alignment, size);
|
||||
}
|
||||
|
||||
inline void
|
||||
aligned_free(void* ptr) BOOST_NOEXCEPT
|
||||
{
|
||||
::free(ptr);
|
||||
}
|
||||
|
||||
} /* alignment */
|
||||
} /* boost */
|
||||
|
||||
#endif
|
44
boost/align/detail/aligned_alloc_macos.hpp
Normal file
44
boost/align/detail/aligned_alloc_macos.hpp
Normal file
@ -0,0 +1,44 @@
|
||||
/*
|
||||
Copyright 2014 Glen Joseph Fernandes
|
||||
(glenjofe@gmail.com)
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
#ifndef BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_MACOS_HPP
|
||||
#define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_MACOS_HPP
|
||||
|
||||
#include <boost/align/detail/is_alignment.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
#include <stdlib.h>
|
||||
|
||||
namespace boost {
|
||||
namespace alignment {
|
||||
|
||||
inline void*
|
||||
aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_ASSERT(detail::is_alignment(alignment));
|
||||
if (size == 0) {
|
||||
return 0;
|
||||
}
|
||||
if (alignment < sizeof(void*)) {
|
||||
alignment = sizeof(void*);
|
||||
}
|
||||
void* p;
|
||||
if (::posix_memalign(&p, alignment, size) != 0) {
|
||||
p = 0;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
inline void
|
||||
aligned_free(void* ptr) BOOST_NOEXCEPT
|
||||
{
|
||||
::free(ptr);
|
||||
}
|
||||
|
||||
} /* alignment */
|
||||
} /* boost */
|
||||
|
||||
#endif
|
34
boost/align/detail/aligned_alloc_mingw.hpp
Normal file
34
boost/align/detail/aligned_alloc_mingw.hpp
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
Copyright 2020 Glen Joseph Fernandes
|
||||
(glenjofe@gmail.com)
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
#ifndef BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_MINGW_HPP
|
||||
#define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_MINGW_HPP
|
||||
|
||||
#include <boost/align/detail/is_alignment.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
#include <malloc.h>
|
||||
|
||||
namespace boost {
|
||||
namespace alignment {
|
||||
|
||||
inline void*
|
||||
aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_ASSERT(detail::is_alignment(alignment));
|
||||
return ::__mingw_aligned_malloc(size, alignment);
|
||||
}
|
||||
|
||||
inline void
|
||||
aligned_free(void* ptr) BOOST_NOEXCEPT
|
||||
{
|
||||
::__mingw_aligned_free(ptr);
|
||||
}
|
||||
|
||||
} /* alignment */
|
||||
} /* boost */
|
||||
|
||||
#endif
|
34
boost/align/detail/aligned_alloc_msvc.hpp
Normal file
34
boost/align/detail/aligned_alloc_msvc.hpp
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
Copyright 2014 Glen Joseph Fernandes
|
||||
(glenjofe@gmail.com)
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
#ifndef BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_MSVC_HPP
|
||||
#define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_MSVC_HPP
|
||||
|
||||
#include <boost/align/detail/is_alignment.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
#include <malloc.h>
|
||||
|
||||
namespace boost {
|
||||
namespace alignment {
|
||||
|
||||
inline void*
|
||||
aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_ASSERT(detail::is_alignment(alignment));
|
||||
return ::_aligned_malloc(size, alignment);
|
||||
}
|
||||
|
||||
inline void
|
||||
aligned_free(void* ptr) BOOST_NOEXCEPT
|
||||
{
|
||||
::_aligned_free(ptr);
|
||||
}
|
||||
|
||||
} /* alignment */
|
||||
} /* boost */
|
||||
|
||||
#endif
|
52
boost/align/detail/aligned_alloc_new.hpp
Normal file
52
boost/align/detail/aligned_alloc_new.hpp
Normal file
@ -0,0 +1,52 @@
|
||||
/*
|
||||
Copyright 2014-2015 Glen Joseph Fernandes
|
||||
(glenjofe@gmail.com)
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
#ifndef BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_NEW_HPP
|
||||
#define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_NEW_HPP
|
||||
|
||||
#include <boost/align/detail/is_alignment.hpp>
|
||||
#include <boost/align/align.hpp>
|
||||
#include <boost/align/alignment_of.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
#include <new>
|
||||
|
||||
namespace boost {
|
||||
namespace alignment {
|
||||
|
||||
inline void*
|
||||
aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_ASSERT(detail::is_alignment(alignment));
|
||||
enum {
|
||||
N = alignment_of<void*>::value
|
||||
};
|
||||
if (alignment < N) {
|
||||
alignment = N;
|
||||
}
|
||||
std::size_t n = size + alignment - N;
|
||||
void* p = ::operator new(sizeof(void*) + n, std::nothrow);
|
||||
if (p) {
|
||||
void* r = static_cast<char*>(p) + sizeof(void*);
|
||||
(void)boost::alignment::align(alignment, size, r, n);
|
||||
*(static_cast<void**>(r) - 1) = p;
|
||||
p = r;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
inline void
|
||||
aligned_free(void* ptr) BOOST_NOEXCEPT
|
||||
{
|
||||
if (ptr) {
|
||||
::operator delete(*(static_cast<void**>(ptr) - 1));
|
||||
}
|
||||
}
|
||||
|
||||
} /* alignment */
|
||||
} /* boost */
|
||||
|
||||
#endif
|
41
boost/align/detail/aligned_alloc_posix.hpp
Normal file
41
boost/align/detail/aligned_alloc_posix.hpp
Normal file
@ -0,0 +1,41 @@
|
||||
/*
|
||||
Copyright 2014 Glen Joseph Fernandes
|
||||
(glenjofe@gmail.com)
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
#ifndef BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_POSIX_HPP
|
||||
#define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_POSIX_HPP
|
||||
|
||||
#include <boost/align/detail/is_alignment.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
#include <stdlib.h>
|
||||
|
||||
namespace boost {
|
||||
namespace alignment {
|
||||
|
||||
inline void*
|
||||
aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_ASSERT(detail::is_alignment(alignment));
|
||||
if (alignment < sizeof(void*)) {
|
||||
alignment = sizeof(void*);
|
||||
}
|
||||
void* p;
|
||||
if (::posix_memalign(&p, alignment, size) != 0) {
|
||||
p = 0;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
inline void
|
||||
aligned_free(void* ptr) BOOST_NOEXCEPT
|
||||
{
|
||||
::free(ptr);
|
||||
}
|
||||
|
||||
} /* alignment */
|
||||
} /* boost */
|
||||
|
||||
#endif
|
34
boost/align/detail/aligned_alloc_sunos.hpp
Normal file
34
boost/align/detail/aligned_alloc_sunos.hpp
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
Copyright 2014 Glen Joseph Fernandes
|
||||
(glenjofe@gmail.com)
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
#ifndef BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_SUNOS_HPP
|
||||
#define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_SUNOS_HPP
|
||||
|
||||
#include <boost/align/detail/is_alignment.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
#include <stdlib.h>
|
||||
|
||||
namespace boost {
|
||||
namespace alignment {
|
||||
|
||||
inline void*
|
||||
aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_ASSERT(detail::is_alignment(alignment));
|
||||
return ::memalign(alignment, size);
|
||||
}
|
||||
|
||||
inline void
|
||||
aligned_free(void* ptr) BOOST_NOEXCEPT
|
||||
{
|
||||
::free(ptr);
|
||||
}
|
||||
|
||||
} /* alignment */
|
||||
} /* boost */
|
||||
|
||||
#endif
|
31
boost/align/detail/alignment_of.hpp
Normal file
31
boost/align/detail/alignment_of.hpp
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
Copyright 2014-2015 Glen Joseph Fernandes
|
||||
(glenjofe@gmail.com)
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
#ifndef BOOST_ALIGN_DETAIL_ALIGNMENT_OF_HPP
|
||||
#define BOOST_ALIGN_DETAIL_ALIGNMENT_OF_HPP
|
||||
|
||||
#include <boost/align/detail/min_size.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace alignment {
|
||||
namespace detail {
|
||||
|
||||
template<class T>
|
||||
struct offset_value {
|
||||
char value;
|
||||
T object;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct alignment_of
|
||||
: min_size<sizeof(T), sizeof(offset_value<T>) - sizeof(T)> { };
|
||||
|
||||
} /* detail */
|
||||
} /* alignment */
|
||||
} /* boost */
|
||||
|
||||
#endif
|
26
boost/align/detail/alignment_of_clang.hpp
Normal file
26
boost/align/detail/alignment_of_clang.hpp
Normal file
@ -0,0 +1,26 @@
|
||||
/*
|
||||
Copyright 2014 Glen Joseph Fernandes
|
||||
(glenjofe@gmail.com)
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
#ifndef BOOST_ALIGN_DETAIL_ALIGNMENT_OF_CLANG_HPP
|
||||
#define BOOST_ALIGN_DETAIL_ALIGNMENT_OF_CLANG_HPP
|
||||
|
||||
#include <boost/align/detail/integral_constant.hpp>
|
||||
#include <cstddef>
|
||||
|
||||
namespace boost {
|
||||
namespace alignment {
|
||||
namespace detail {
|
||||
|
||||
template<class T>
|
||||
struct alignment_of
|
||||
: integral_constant<std::size_t, __alignof(T)> { };
|
||||
|
||||
} /* detail */
|
||||
} /* alignment */
|
||||
} /* boost */
|
||||
|
||||
#endif
|
26
boost/align/detail/alignment_of_codegear.hpp
Normal file
26
boost/align/detail/alignment_of_codegear.hpp
Normal file
@ -0,0 +1,26 @@
|
||||
/*
|
||||
Copyright 2014 Glen Joseph Fernandes
|
||||
(glenjofe@gmail.com)
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
#ifndef BOOST_ALIGN_DETAIL_ALIGNMENT_OF_CODEGEAR_HPP
|
||||
#define BOOST_ALIGN_DETAIL_ALIGNMENT_OF_CODEGEAR_HPP
|
||||
|
||||
#include <boost/align/detail/integral_constant.hpp>
|
||||
#include <cstddef>
|
||||
|
||||
namespace boost {
|
||||
namespace alignment {
|
||||
namespace detail {
|
||||
|
||||
template<class T>
|
||||
struct alignment_of
|
||||
: integral_constant<std::size_t, alignof(T)> { };
|
||||
|
||||
} /* detail */
|
||||
} /* alignment */
|
||||
} /* boost */
|
||||
|
||||
#endif
|
23
boost/align/detail/alignment_of_cxx11.hpp
Normal file
23
boost/align/detail/alignment_of_cxx11.hpp
Normal file
@ -0,0 +1,23 @@
|
||||
/*
|
||||
Copyright 2014 Glen Joseph Fernandes
|
||||
(glenjofe@gmail.com)
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
#ifndef BOOST_ALIGN_DETAIL_ALIGNMENT_OF_CXX11_HPP
|
||||
#define BOOST_ALIGN_DETAIL_ALIGNMENT_OF_CXX11_HPP
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
namespace boost {
|
||||
namespace alignment {
|
||||
namespace detail {
|
||||
|
||||
using std::alignment_of;
|
||||
|
||||
} /* detail */
|
||||
} /* alignment */
|
||||
} /* boost */
|
||||
|
||||
#endif
|
26
boost/align/detail/alignment_of_gcc.hpp
Normal file
26
boost/align/detail/alignment_of_gcc.hpp
Normal file
@ -0,0 +1,26 @@
|
||||
/*
|
||||
Copyright 2014 Glen Joseph Fernandes
|
||||
(glenjofe@gmail.com)
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
#ifndef BOOST_ALIGN_DETAIL_ALIGNMENT_OF_GCC_HPP
|
||||
#define BOOST_ALIGN_DETAIL_ALIGNMENT_OF_GCC_HPP
|
||||
|
||||
#include <boost/align/detail/integral_constant.hpp>
|
||||
#include <cstddef>
|
||||
|
||||
namespace boost {
|
||||
namespace alignment {
|
||||
namespace detail {
|
||||
|
||||
template<class T>
|
||||
struct alignment_of
|
||||
: integral_constant<std::size_t, __alignof__(T)> { };
|
||||
|
||||
} /* detail */
|
||||
} /* alignment */
|
||||
} /* boost */
|
||||
|
||||
#endif
|
32
boost/align/detail/alignment_of_msvc.hpp
Normal file
32
boost/align/detail/alignment_of_msvc.hpp
Normal file
@ -0,0 +1,32 @@
|
||||
/*
|
||||
Copyright 2014-2015 Glen Joseph Fernandes
|
||||
(glenjofe@gmail.com)
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
#ifndef BOOST_ALIGN_DETAIL_ALIGNMENT_OF_MSVC_HPP
|
||||
#define BOOST_ALIGN_DETAIL_ALIGNMENT_OF_MSVC_HPP
|
||||
|
||||
#include <boost/align/detail/min_size.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace alignment {
|
||||
namespace detail {
|
||||
|
||||
template<class T>
|
||||
struct offset_value {
|
||||
T first;
|
||||
char value;
|
||||
T second;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct alignment_of
|
||||
: min_size<sizeof(T), sizeof(offset_value<T>) - (sizeof(T) << 1)> { };
|
||||
|
||||
} /* detail */
|
||||
} /* alignment */
|
||||
} /* boost */
|
||||
|
||||
#endif
|
91
boost/align/detail/element_type.hpp
Normal file
91
boost/align/detail/element_type.hpp
Normal file
@ -0,0 +1,91 @@
|
||||
/*
|
||||
Copyright 2015 Glen Joseph Fernandes
|
||||
(glenjofe@gmail.com)
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
#ifndef BOOST_ALIGN_DETAIL_ELEMENT_TYPE_HPP
|
||||
#define BOOST_ALIGN_DETAIL_ELEMENT_TYPE_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS)
|
||||
#include <type_traits>
|
||||
#else
|
||||
#include <cstddef>
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace alignment {
|
||||
namespace detail {
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS)
|
||||
using std::remove_reference;
|
||||
using std::remove_all_extents;
|
||||
using std::remove_cv;
|
||||
#else
|
||||
template<class T>
|
||||
struct remove_reference {
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct remove_reference<T&> {
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template<class T>
|
||||
struct remove_reference<T&&> {
|
||||
typedef T type;
|
||||
};
|
||||
#endif
|
||||
|
||||
template<class T>
|
||||
struct remove_all_extents {
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct remove_all_extents<T[]> {
|
||||
typedef typename remove_all_extents<T>::type type;
|
||||
};
|
||||
|
||||
template<class T, std::size_t N>
|
||||
struct remove_all_extents<T[N]> {
|
||||
typedef typename remove_all_extents<T>::type type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct remove_cv {
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct remove_cv<const T> {
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct remove_cv<volatile T> {
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct remove_cv<const volatile T> {
|
||||
typedef T type;
|
||||
};
|
||||
#endif
|
||||
|
||||
template<class T>
|
||||
struct element_type {
|
||||
typedef typename remove_cv<typename remove_all_extents<typename
|
||||
remove_reference<T>::type>::type>::type type;
|
||||
};
|
||||
|
||||
} /* detail */
|
||||
} /* alignment */
|
||||
} /* boost */
|
||||
|
||||
#endif
|
53
boost/align/detail/integral_constant.hpp
Normal file
53
boost/align/detail/integral_constant.hpp
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
Copyright 2014-2016 Glen Joseph Fernandes
|
||||
(glenjofe@gmail.com)
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
#ifndef BOOST_ALIGN_DETAIL_INTEGRAL_CONSTANT_HPP
|
||||
#define BOOST_ALIGN_DETAIL_INTEGRAL_CONSTANT_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS)
|
||||
#include <type_traits>
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace alignment {
|
||||
namespace detail {
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS)
|
||||
using std::integral_constant;
|
||||
using std::true_type;
|
||||
using std::false_type;
|
||||
#else
|
||||
template<class T, T Value>
|
||||
struct integral_constant {
|
||||
typedef T value_type;
|
||||
typedef integral_constant type;
|
||||
|
||||
BOOST_CONSTEXPR operator value_type() const BOOST_NOEXCEPT {
|
||||
return Value;
|
||||
}
|
||||
|
||||
BOOST_CONSTEXPR value_type operator()() const BOOST_NOEXCEPT {
|
||||
return Value;
|
||||
}
|
||||
|
||||
BOOST_STATIC_CONSTEXPR T value = Value;
|
||||
};
|
||||
|
||||
template<class T, T Value>
|
||||
BOOST_CONSTEXPR_OR_CONST T integral_constant<T, Value>::value;
|
||||
|
||||
typedef integral_constant<bool, true> true_type;
|
||||
typedef integral_constant<bool, false> false_type;
|
||||
#endif
|
||||
|
||||
} /* detail */
|
||||
} /* alignment */
|
||||
} /* boost */
|
||||
|
||||
#endif
|
28
boost/align/detail/is_alignment.hpp
Normal file
28
boost/align/detail/is_alignment.hpp
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
Copyright 2014 Glen Joseph Fernandes
|
||||
(glenjofe@gmail.com)
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
#ifndef BOOST_ALIGN_DETAIL_IS_ALIGNMENT_HPP
|
||||
#define BOOST_ALIGN_DETAIL_IS_ALIGNMENT_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <cstddef>
|
||||
|
||||
namespace boost {
|
||||
namespace alignment {
|
||||
namespace detail {
|
||||
|
||||
BOOST_CONSTEXPR inline bool
|
||||
is_alignment(std::size_t value) BOOST_NOEXCEPT
|
||||
{
|
||||
return (value > 0) && ((value & (value - 1)) == 0);
|
||||
}
|
||||
|
||||
} /* detail */
|
||||
} /* alignment */
|
||||
} /* boost */
|
||||
|
||||
#endif
|
26
boost/align/detail/min_size.hpp
Normal file
26
boost/align/detail/min_size.hpp
Normal file
@ -0,0 +1,26 @@
|
||||
/*
|
||||
Copyright 2014 Glen Joseph Fernandes
|
||||
(glenjofe@gmail.com)
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
#ifndef BOOST_ALIGN_DETAIL_MIN_SIZE_HPP
|
||||
#define BOOST_ALIGN_DETAIL_MIN_SIZE_HPP
|
||||
|
||||
#include <boost/align/detail/integral_constant.hpp>
|
||||
#include <cstddef>
|
||||
|
||||
namespace boost {
|
||||
namespace alignment {
|
||||
namespace detail {
|
||||
|
||||
template<std::size_t A, std::size_t B>
|
||||
struct min_size
|
||||
: integral_constant<std::size_t, (A < B) ? A : B> { };
|
||||
|
||||
} /* detail */
|
||||
} /* alignment */
|
||||
} /* boost */
|
||||
|
||||
#endif
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// archive/archive_exception.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,16 +20,16 @@
|
||||
#include <boost/assert.hpp>
|
||||
#include <string>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/archive/detail/decl.hpp>
|
||||
|
||||
// note: the only reason this is in here is that windows header
|
||||
// includes #define exception_code _exception_code (arrrgghhhh!).
|
||||
// the most expedient way to address this is be sure that this
|
||||
// header is always included whenever this header file is included.
|
||||
#if defined(BOOST_WINDOWS)
|
||||
#include <excpt.h>
|
||||
#endif
|
||||
#if defined(BOOST_WINDOWS)
|
||||
#include <excpt.h>
|
||||
#endif
|
||||
|
||||
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
|
||||
|
||||
@ -39,7 +39,7 @@ namespace archive {
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// exceptions thrown by archives
|
||||
//
|
||||
class BOOST_SYMBOL_VISIBLE archive_exception :
|
||||
class BOOST_SYMBOL_VISIBLE archive_exception :
|
||||
public virtual std::exception
|
||||
{
|
||||
private:
|
||||
@ -52,7 +52,7 @@ protected:
|
||||
public:
|
||||
typedef enum {
|
||||
no_exception, // initialized without code
|
||||
other_exception, // any excepton not listed below
|
||||
other_exception, // any exception not listed below
|
||||
unregistered_class, // attempt to serialize a pointer of
|
||||
// an unregistered class
|
||||
invalid_signature, // first line of archive does not contain
|
||||
@ -61,9 +61,9 @@ public:
|
||||
// subsequent to this one
|
||||
pointer_conflict, // an attempt has been made to directly
|
||||
// serialize an object which has
|
||||
// already been serialized through a pointer.
|
||||
// Were this permitted, the archive load would result
|
||||
// in the creation of an extra copy of the obect.
|
||||
// already been serialized through a pointer.
|
||||
// Were this permitted, the archive load would result
|
||||
// in the creation of an extra copy of the object.
|
||||
incompatible_native_format, // attempt to read native binary format
|
||||
// on incompatible platform
|
||||
array_size_too_short,// array being loaded doesn't fit in array allocated
|
||||
@ -71,9 +71,9 @@ public:
|
||||
invalid_class_name, // class name greater than the maximum permitted.
|
||||
// most likely a corrupted archive or an attempt
|
||||
// to insert virus via buffer overrun method.
|
||||
unregistered_cast, // base - derived relationship not registered with
|
||||
unregistered_cast, // base - derived relationship not registered with
|
||||
// void_cast_register
|
||||
unsupported_class_version, // type saved with a version # greater than the
|
||||
unsupported_class_version, // type saved with a version # greater than the
|
||||
// one used by the program. This indicates that the program
|
||||
// needs to be rebuilt.
|
||||
multiple_code_instantiation, // code for implementing serialization for some
|
||||
@ -83,13 +83,13 @@ public:
|
||||
exception_code code;
|
||||
|
||||
BOOST_ARCHIVE_DECL archive_exception(
|
||||
exception_code c,
|
||||
exception_code c,
|
||||
const char * e1 = NULL,
|
||||
const char * e2 = NULL
|
||||
) BOOST_NOEXCEPT;
|
||||
BOOST_ARCHIVE_DECL archive_exception(archive_exception const &) BOOST_NOEXCEPT ;
|
||||
virtual BOOST_ARCHIVE_DECL ~archive_exception() BOOST_NOEXCEPT_OR_NOTHROW ;
|
||||
virtual BOOST_ARCHIVE_DECL const char * what() const BOOST_NOEXCEPT_OR_NOTHROW ;
|
||||
BOOST_ARCHIVE_DECL archive_exception(archive_exception const &) BOOST_NOEXCEPT;
|
||||
BOOST_ARCHIVE_DECL ~archive_exception() BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE;
|
||||
BOOST_ARCHIVE_DECL const char * what() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE;
|
||||
};
|
||||
|
||||
}// namespace archive
|
||||
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// basic_archive.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,9 +18,9 @@
|
||||
#include <cstring> // count
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/cstdint.hpp> // size_t
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <boost/integer_traits.hpp>
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <boost/serialization/library_version_type.hpp>
|
||||
|
||||
#include <boost/archive/detail/auto_link_archive.hpp>
|
||||
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
|
||||
@ -33,76 +33,43 @@ namespace archive {
|
||||
#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;
|
||||
}
|
||||
};
|
||||
|
||||
BOOST_ARCHIVE_DECL library_version_type
|
||||
BOOST_ARCHIVE_DECL boost::serialization::library_version_type
|
||||
BOOST_ARCHIVE_VERSION();
|
||||
|
||||
// create alias in boost::archive for older user code.
|
||||
typedef boost::serialization::library_version_type library_version_type;
|
||||
|
||||
class version_type {
|
||||
private:
|
||||
typedef uint_least32_t base_type;
|
||||
base_type t;
|
||||
public:
|
||||
// should be private - but MPI fails if it's not!!!
|
||||
version_type(): t(0) {};
|
||||
version_type(): t(0) {}
|
||||
explicit version_type(const unsigned int & t_) : t(t_){
|
||||
BOOST_ASSERT(t_ <= boost::integer_traits<base_type>::const_max);
|
||||
}
|
||||
version_type(const version_type & t_) :
|
||||
version_type(const version_type & t_) :
|
||||
t(t_.t)
|
||||
{}
|
||||
version_type & operator=(const version_type & rhs){
|
||||
t = rhs.t;
|
||||
t = rhs.t;
|
||||
return *this;
|
||||
}
|
||||
// used for text output
|
||||
operator base_type () const {
|
||||
return t;
|
||||
}
|
||||
}
|
||||
// used for text intput
|
||||
operator base_type & (){
|
||||
return t;
|
||||
}
|
||||
}
|
||||
bool operator==(const version_type & rhs) const {
|
||||
return t == rhs.t;
|
||||
}
|
||||
}
|
||||
bool operator<(const version_type & rhs) const {
|
||||
return t < rhs.t;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
class class_id_type {
|
||||
@ -111,73 +78,73 @@ private:
|
||||
base_type t;
|
||||
public:
|
||||
// should be private - but then can't use BOOST_STRONG_TYPE below
|
||||
class_id_type() : t(0) {};
|
||||
class_id_type() : t(0) {}
|
||||
explicit class_id_type(const int t_) : t(t_){
|
||||
BOOST_ASSERT(t_ <= boost::integer_traits<base_type>::const_max);
|
||||
}
|
||||
explicit class_id_type(const std::size_t t_) : t(t_){
|
||||
// BOOST_ASSERT(t_ <= boost::integer_traits<base_type>::const_max);
|
||||
}
|
||||
class_id_type(const class_id_type & t_) :
|
||||
class_id_type(const class_id_type & t_) :
|
||||
t(t_.t)
|
||||
{}
|
||||
class_id_type & operator=(const class_id_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 class_id_type & rhs) const {
|
||||
return t == rhs.t;
|
||||
}
|
||||
}
|
||||
bool operator<(const class_id_type & rhs) const {
|
||||
return t < rhs.t;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#define NULL_POINTER_TAG boost::archive::class_id_type(-1)
|
||||
#define BOOST_SERIALIZATION_NULL_POINTER_TAG boost::archive::class_id_type(-1)
|
||||
|
||||
class object_id_type {
|
||||
private:
|
||||
typedef uint_least32_t base_type;
|
||||
base_type t;
|
||||
public:
|
||||
object_id_type(): t(0) {};
|
||||
object_id_type(): t(0) {}
|
||||
// note: presumes that size_t >= unsigned int.
|
||||
// use explicit cast to silence useless warning
|
||||
explicit object_id_type(const std::size_t & t_) : t(static_cast<base_type>(t_)){
|
||||
// make quadriple sure that we haven't lost any real integer
|
||||
// make quadruple sure that we haven't lost any real integer
|
||||
// precision
|
||||
BOOST_ASSERT(t_ <= boost::integer_traits<base_type>::const_max);
|
||||
}
|
||||
object_id_type(const object_id_type & t_) :
|
||||
object_id_type(const object_id_type & t_) :
|
||||
t(t_.t)
|
||||
{}
|
||||
object_id_type & operator=(const object_id_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 object_id_type & rhs) const {
|
||||
return t == rhs.t;
|
||||
}
|
||||
}
|
||||
bool operator<(const object_id_type & rhs) const {
|
||||
return t < rhs.t;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
@ -188,16 +155,16 @@ struct tracking_type {
|
||||
bool t;
|
||||
explicit tracking_type(const bool t_ = false)
|
||||
: t(t_)
|
||||
{};
|
||||
{}
|
||||
tracking_type(const tracking_type & t_)
|
||||
: t(t_.t)
|
||||
{}
|
||||
operator bool () const {
|
||||
return t;
|
||||
};
|
||||
}
|
||||
operator bool & () {
|
||||
return t;
|
||||
};
|
||||
}
|
||||
tracking_type & operator=(const bool t_){
|
||||
t = t_;
|
||||
return *this;
|
||||
@ -214,8 +181,8 @@ struct tracking_type {
|
||||
}
|
||||
};
|
||||
|
||||
struct class_name_type :
|
||||
private boost::noncopyable
|
||||
struct class_name_type :
|
||||
private boost::noncopyable
|
||||
{
|
||||
char *t;
|
||||
operator const char * & () const {
|
||||
@ -227,9 +194,9 @@ struct class_name_type :
|
||||
std::size_t size() const {
|
||||
return std::strlen(t);
|
||||
}
|
||||
explicit class_name_type(const char *key_)
|
||||
explicit class_name_type(const char *key_)
|
||||
: t(const_cast<char *>(key_)){}
|
||||
explicit class_name_type(char *key_)
|
||||
explicit class_name_type(char *key_)
|
||||
: t(key_){}
|
||||
class_name_type & operator=(const class_name_type & rhs){
|
||||
t = rhs.t;
|
||||
@ -249,7 +216,7 @@ BOOST_ARCHIVE_DECL const char *
|
||||
BOOST_ARCHIVE_SIGNATURE();
|
||||
|
||||
/* NOTE : Warning : Warning : Warning : Warning : Warning
|
||||
* If any of these are changed to different sized types,
|
||||
* If any of these are changed to different sized types,
|
||||
* binary_iarchive won't be able to read older archives
|
||||
* unless you rev the library version and include conditional
|
||||
* code based on the library version. There is nothing
|
||||
@ -279,7 +246,7 @@ BOOST_ARCHIVE_STRONG_TYPEDEF(object_id_type, object_reference_type)
|
||||
// set implementation level to primitive for all types
|
||||
// used internally by the serialization library
|
||||
|
||||
BOOST_CLASS_IMPLEMENTATION(boost::archive::library_version_type, primitive_type)
|
||||
BOOST_CLASS_IMPLEMENTATION(boost::serialization::library_version_type, primitive_type)
|
||||
BOOST_CLASS_IMPLEMENTATION(boost::archive::version_type, primitive_type)
|
||||
BOOST_CLASS_IMPLEMENTATION(boost::archive::class_id_type, primitive_type)
|
||||
BOOST_CLASS_IMPLEMENTATION(boost::archive::class_id_reference_type, primitive_type)
|
||||
@ -291,10 +258,10 @@ BOOST_CLASS_IMPLEMENTATION(boost::archive::tracking_type, primitive_type)
|
||||
|
||||
#include <boost/serialization/is_bitwise_serializable.hpp>
|
||||
|
||||
// set types used internally by the serialization library
|
||||
// set types used internally by the serialization library
|
||||
// to be bitwise serializable
|
||||
|
||||
BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::library_version_type)
|
||||
BOOST_IS_BITWISE_SERIALIZABLE(boost::serialization::library_version_type)
|
||||
BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::version_type)
|
||||
BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::class_id_type)
|
||||
BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::class_id_reference_type)
|
||||
|
@ -16,7 +16,7 @@
|
||||
// IN GENERAL, ARCHIVES CREATED WITH THIS CLASS WILL NOT BE READABLE
|
||||
// ON PLATFORM APART FROM THE ONE THEY ARE CREATED ON
|
||||
|
||||
// (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)
|
||||
@ -30,6 +30,7 @@
|
||||
#include <boost/archive/detail/common_iarchive.hpp>
|
||||
#include <boost/serialization/collection_size_type.hpp>
|
||||
#include <boost/serialization/string.hpp>
|
||||
#include <boost/serialization/library_version_type.hpp>
|
||||
#include <boost/serialization/item_version_type.hpp>
|
||||
#include <boost/integer_traits.hpp>
|
||||
|
||||
@ -40,7 +41,7 @@
|
||||
|
||||
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace archive {
|
||||
|
||||
namespace detail {
|
||||
@ -50,7 +51,7 @@ namespace detail {
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// class basic_binary_iarchive - read serialized objects from a input binary stream
|
||||
template<class Archive>
|
||||
class BOOST_SYMBOL_VISIBLE basic_binary_iarchive :
|
||||
class BOOST_SYMBOL_VISIBLE basic_binary_iarchive :
|
||||
public detail::common_iarchive<Archive>
|
||||
{
|
||||
#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
@ -66,7 +67,7 @@ protected:
|
||||
#endif
|
||||
#endif
|
||||
// intermediate level to support override of operators
|
||||
// fot templates in the absence of partial function
|
||||
// fot templates in the absence of partial function
|
||||
// template ordering. If we get here pass to base class
|
||||
// note extra nonsense to sneak it pass the borland compiers
|
||||
typedef detail::common_iarchive<Archive> detail_common_iarchive;
|
||||
@ -84,12 +85,12 @@ protected:
|
||||
BOOST_STATIC_ASSERT(sizeof(object_id_type) == sizeof(uint_least32_t));
|
||||
BOOST_STATIC_ASSERT(sizeof(object_reference_type) == sizeof(uint_least32_t));
|
||||
|
||||
// binary files don't include the optional information
|
||||
// binary files don't include the optional information
|
||||
void load_override(class_id_optional_type & /* t */){}
|
||||
|
||||
void load_override(tracking_type & t, int /*version*/){
|
||||
library_version_type lvt = this->get_library_version();
|
||||
if(boost::archive::library_version_type(6) < lvt){
|
||||
boost::serialization::library_version_type lv = this->get_library_version();
|
||||
if(boost::serialization::library_version_type(6) < lv){
|
||||
int_least8_t x=0;
|
||||
* this->This() >> x;
|
||||
t = boost::archive::tracking_type(x);
|
||||
@ -101,7 +102,7 @@ protected:
|
||||
}
|
||||
}
|
||||
void load_override(class_id_type & t){
|
||||
library_version_type lvt = this->get_library_version();
|
||||
boost::serialization::library_version_type lv = this->get_library_version();
|
||||
/*
|
||||
* library versions:
|
||||
* boost 1.39 -> 5
|
||||
@ -117,10 +118,10 @@ protected:
|
||||
* - v > 6 : 16bit
|
||||
* - other : 32bit
|
||||
* --> which is obviously incorrect, see point 1
|
||||
*
|
||||
*
|
||||
* the fix here decodes class_id_type on 16bit for all v <= 7, which seems to be the correct behaviour ...
|
||||
*/
|
||||
if(boost::archive::library_version_type(7) < lvt){
|
||||
if(boost::serialization::library_version_type (7) < lv){
|
||||
this->detail_common_iarchive::load_override(t);
|
||||
}
|
||||
else{
|
||||
@ -134,24 +135,24 @@ protected:
|
||||
}
|
||||
|
||||
void load_override(version_type & t){
|
||||
library_version_type lvt = this->get_library_version();
|
||||
if(boost::archive::library_version_type(7) < lvt){
|
||||
boost::serialization::library_version_type lv = this->get_library_version();
|
||||
if(boost::serialization::library_version_type(7) < lv){
|
||||
this->detail_common_iarchive::load_override(t);
|
||||
}
|
||||
else
|
||||
if(boost::archive::library_version_type(6) < lvt){
|
||||
if(boost::serialization::library_version_type(6) < lv){
|
||||
uint_least8_t x=0;
|
||||
* this->This() >> x;
|
||||
t = boost::archive::version_type(x);
|
||||
}
|
||||
else
|
||||
if(boost::archive::library_version_type(5) < lvt){
|
||||
if(boost::serialization::library_version_type(5) < lv){
|
||||
uint_least16_t x=0;
|
||||
* this->This() >> x;
|
||||
t = boost::archive::version_type(x);
|
||||
}
|
||||
else
|
||||
if(boost::archive::library_version_type(2) < lvt){
|
||||
if(boost::serialization::library_version_type(2) < lv){
|
||||
// upto 255 versions
|
||||
unsigned char x=0;
|
||||
* this->This() >> x;
|
||||
@ -165,13 +166,13 @@ protected:
|
||||
}
|
||||
|
||||
void load_override(boost::serialization::item_version_type & t){
|
||||
library_version_type lvt = this->get_library_version();
|
||||
// if(boost::archive::library_version_type(7) < lvt){
|
||||
if(boost::archive::library_version_type(6) < lvt){
|
||||
boost::serialization::library_version_type lv = this->get_library_version();
|
||||
// if(boost::serialization::library_version_type(7) < lvt){
|
||||
if(boost::serialization::library_version_type(6) < lv){
|
||||
this->detail_common_iarchive::load_override(t);
|
||||
}
|
||||
else
|
||||
if(boost::archive::library_version_type(6) < lvt){
|
||||
if(boost::serialization::library_version_type(6) < lv){
|
||||
uint_least16_t x=0;
|
||||
* this->This() >> x;
|
||||
t = boost::serialization::item_version_type(x);
|
||||
@ -184,21 +185,21 @@ protected:
|
||||
}
|
||||
|
||||
void load_override(serialization::collection_size_type & t){
|
||||
if(boost::archive::library_version_type(5) < this->get_library_version()){
|
||||
if(boost::serialization::library_version_type(5) < this->get_library_version()){
|
||||
this->detail_common_iarchive::load_override(t);
|
||||
}
|
||||
else{
|
||||
unsigned int x=0;
|
||||
* this->This() >> x;
|
||||
t = serialization::collection_size_type(x);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
|
||||
load_override(class_name_type & t);
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
|
||||
init();
|
||||
|
||||
|
||||
basic_binary_iarchive(unsigned int flags) :
|
||||
detail::common_iarchive<Archive>(flags)
|
||||
{}
|
||||
|
@ -20,7 +20,7 @@
|
||||
// IN GENERAL, ARCHIVES CREATED WITH THIS CLASS WILL NOT BE READABLE
|
||||
// ON PLATFORM APART FROM THE ONE THEY ARE CREATED ON
|
||||
|
||||
// (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,8 +37,8 @@
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#if defined(BOOST_NO_STDC_NAMESPACE)
|
||||
namespace std{
|
||||
using ::memcpy;
|
||||
namespace std{
|
||||
using ::memcpy;
|
||||
using ::size_t;
|
||||
} // namespace std
|
||||
#endif
|
||||
@ -48,7 +48,6 @@ namespace std{
|
||||
#include <boost/integer.hpp>
|
||||
#include <boost/integer_traits.hpp>
|
||||
|
||||
//#include <boost/mpl/placeholders.hpp>
|
||||
#include <boost/serialization/is_bitwise_serializable.hpp>
|
||||
#include <boost/serialization/array_wrapper.hpp>
|
||||
|
||||
@ -58,7 +57,7 @@ namespace std{
|
||||
#include <boost/archive/detail/auto_link_archive.hpp>
|
||||
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace archive {
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@ -98,8 +97,8 @@ public:
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
// fundamental types that need special treatment
|
||||
|
||||
// trap usage of invalid uninitialized boolean
|
||||
|
||||
// trap usage of invalid uninitialized boolean
|
||||
void load(bool & t){
|
||||
load_binary(& t, sizeof(t));
|
||||
int i = t;
|
||||
@ -119,29 +118,29 @@ public:
|
||||
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
|
||||
init();
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL
|
||||
basic_binary_iprimitive(
|
||||
std::basic_streambuf<Elem, Tr> & sb,
|
||||
std::basic_streambuf<Elem, Tr> & sb,
|
||||
bool no_codecvt
|
||||
);
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL
|
||||
~basic_binary_iprimitive();
|
||||
public:
|
||||
// we provide an optimized load for all fundamental types
|
||||
// typedef serialization::is_bitwise_serializable<mpl::_1>
|
||||
// typedef serialization::is_bitwise_serializable<mpl::_1>
|
||||
// use_array_optimization;
|
||||
struct use_array_optimization {
|
||||
template <class T>
|
||||
#if defined(BOOST_NO_DEPENDENT_NESTED_DERIVATIONS)
|
||||
struct apply {
|
||||
typedef typename boost::serialization::is_bitwise_serializable< T >::type type;
|
||||
struct use_array_optimization {
|
||||
template <class T>
|
||||
#if defined(BOOST_NO_DEPENDENT_NESTED_DERIVATIONS)
|
||||
struct apply {
|
||||
typedef typename boost::serialization::is_bitwise_serializable< T >::type type;
|
||||
};
|
||||
#else
|
||||
struct apply : public boost::serialization::is_bitwise_serializable< T > {};
|
||||
struct apply : public boost::serialization::is_bitwise_serializable< T > {};
|
||||
#endif
|
||||
};
|
||||
|
||||
// the optimized load_array dispatches to load_binary
|
||||
// the optimized load_array dispatches to load_binary
|
||||
template <class ValueType>
|
||||
void load_array(serialization::array_wrapper<ValueType>& a, unsigned int)
|
||||
{
|
||||
@ -155,17 +154,17 @@ public:
|
||||
template<class Archive, class Elem, class Tr>
|
||||
inline void
|
||||
basic_binary_iprimitive<Archive, Elem, Tr>::load_binary(
|
||||
void *address,
|
||||
void *address,
|
||||
std::size_t count
|
||||
){
|
||||
// note: an optimizer should eliminate the following for char files
|
||||
BOOST_ASSERT(
|
||||
static_cast<std::streamsize>(count / sizeof(Elem))
|
||||
static_cast<std::streamsize>(count / sizeof(Elem))
|
||||
<= boost::integer_traits<std::streamsize>::const_max
|
||||
);
|
||||
std::streamsize s = static_cast<std::streamsize>(count / sizeof(Elem));
|
||||
std::streamsize scount = m_sb.sgetn(
|
||||
static_cast<Elem *>(address),
|
||||
static_cast<Elem *>(address),
|
||||
s
|
||||
);
|
||||
if(scount != s)
|
||||
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// basic_binary_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)
|
||||
@ -58,7 +58,7 @@ namespace detail {
|
||||
// does have the virtue of buiding the smalles archive in the minimum amount
|
||||
// of time. So under some circumstances it may be he right choice.
|
||||
template<class Archive>
|
||||
class BOOST_SYMBOL_VISIBLE basic_binary_oarchive :
|
||||
class BOOST_SYMBOL_VISIBLE basic_binary_oarchive :
|
||||
public detail::common_oarchive<Archive>
|
||||
{
|
||||
#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
@ -90,18 +90,18 @@ protected:
|
||||
BOOST_STATIC_ASSERT(sizeof(object_id_type) == sizeof(uint_least32_t));
|
||||
BOOST_STATIC_ASSERT(sizeof(object_reference_type) == sizeof(uint_least32_t));
|
||||
|
||||
// binary files don't include the optional information
|
||||
// binary files don't include the optional information
|
||||
void save_override(const class_id_optional_type & /* t */){}
|
||||
|
||||
// enable this if we decide to support generation of previous versions
|
||||
#if 0
|
||||
void save_override(const boost::archive::version_type & t){
|
||||
library_version_type lvt = this->get_library_version();
|
||||
if(boost::archive::library_version_type(7) < lvt){
|
||||
if(boost::serialization::library_version_type(7) < lvt){
|
||||
this->detail_common_oarchive::save_override(t);
|
||||
}
|
||||
else
|
||||
if(boost::archive::library_version_type(6) < lvt){
|
||||
if(boost::serialization::library_version_type(6) < lvt){
|
||||
const boost::uint_least16_t x = t;
|
||||
* this->This() << x;
|
||||
}
|
||||
@ -112,11 +112,11 @@ protected:
|
||||
}
|
||||
void save_override(const boost::serialization::item_version_type & t){
|
||||
library_version_type lvt = this->get_library_version();
|
||||
if(boost::archive::library_version_type(7) < lvt){
|
||||
if(boost::serialization::library_version_type(7) < lvt){
|
||||
this->detail_common_oarchive::save_override(t);
|
||||
}
|
||||
else
|
||||
if(boost::archive::library_version_type(6) < lvt){
|
||||
if(boost::serialization::library_version_type(6) < lvt){
|
||||
const boost::uint_least16_t x = t;
|
||||
* this->This() << x;
|
||||
}
|
||||
@ -128,11 +128,11 @@ protected:
|
||||
|
||||
void save_override(class_id_type & t){
|
||||
library_version_type lvt = this->get_library_version();
|
||||
if(boost::archive::library_version_type(7) < lvt){
|
||||
if(boost::serialization::library_version_type(7) < lvt){
|
||||
this->detail_common_oarchive::save_override(t);
|
||||
}
|
||||
else
|
||||
if(boost::archive::library_version_type(6) < lvt){
|
||||
if(boost::serialization::library_version_type(6) < lvt){
|
||||
const boost::int_least16_t x = t;
|
||||
* this->This() << x;
|
||||
}
|
||||
@ -155,11 +155,11 @@ protected:
|
||||
|
||||
#if 0
|
||||
void save_override(const serialization::collection_size_type & t){
|
||||
if (get_library_version() < boost::archive::library_version_type(6)){
|
||||
if (get_library_version() < boost::serialization::library_version_type(6)){
|
||||
unsigned int x=0;
|
||||
* this->This() >> x;
|
||||
t = serialization::collection_size_type(x);
|
||||
}
|
||||
}
|
||||
else{
|
||||
* this->This() >> t;
|
||||
}
|
||||
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// basic_binary_oprimitive.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)
|
||||
@ -32,8 +32,8 @@
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#if defined(BOOST_NO_STDC_NAMESPACE)
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
} // namespace std
|
||||
#endif
|
||||
|
||||
@ -43,7 +43,6 @@ namespace std{
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
#include <boost/serialization/throw_exception.hpp>
|
||||
|
||||
//#include <boost/mpl/placeholders.hpp>
|
||||
#include <boost/serialization/is_bitwise_serializable.hpp>
|
||||
#include <boost/serialization/array_wrapper.hpp>
|
||||
|
||||
@ -93,7 +92,7 @@ public:
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
// fundamental types that need special treatment
|
||||
|
||||
|
||||
// trap usage of invalid uninitialized boolean which would
|
||||
// otherwise crash on load.
|
||||
void save(const bool t){
|
||||
@ -113,32 +112,32 @@ public:
|
||||
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
|
||||
init();
|
||||
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL
|
||||
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL
|
||||
basic_binary_oprimitive(
|
||||
std::basic_streambuf<Elem, Tr> & sb,
|
||||
std::basic_streambuf<Elem, Tr> & sb,
|
||||
bool no_codecvt
|
||||
);
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL
|
||||
~basic_binary_oprimitive();
|
||||
public:
|
||||
|
||||
// we provide an optimized save for all fundamental types
|
||||
// typedef serialization::is_bitwise_serializable<mpl::_1>
|
||||
// typedef serialization::is_bitwise_serializable<mpl::_1>
|
||||
// use_array_optimization;
|
||||
// workaround without using mpl lambdas
|
||||
struct use_array_optimization {
|
||||
template <class T>
|
||||
#if defined(BOOST_NO_DEPENDENT_NESTED_DERIVATIONS)
|
||||
struct apply {
|
||||
typedef typename boost::serialization::is_bitwise_serializable< T >::type type;
|
||||
template <class T>
|
||||
#if defined(BOOST_NO_DEPENDENT_NESTED_DERIVATIONS)
|
||||
struct apply {
|
||||
typedef typename boost::serialization::is_bitwise_serializable< T >::type type;
|
||||
};
|
||||
#else
|
||||
struct apply : public boost::serialization::is_bitwise_serializable< T > {};
|
||||
struct apply : public boost::serialization::is_bitwise_serializable< T > {};
|
||||
#endif
|
||||
};
|
||||
|
||||
// the optimized save_array dispatches to save_binary
|
||||
// the optimized save_array dispatches to save_binary
|
||||
template <class ValueType>
|
||||
void save_array(boost::serialization::array_wrapper<ValueType> const& a, unsigned int)
|
||||
{
|
||||
@ -149,9 +148,9 @@ public:
|
||||
};
|
||||
|
||||
template<class Archive, class Elem, class Tr>
|
||||
inline void
|
||||
inline void
|
||||
basic_binary_oprimitive<Archive, Elem, Tr>::save_binary(
|
||||
const void *address,
|
||||
const void *address,
|
||||
std::size_t count
|
||||
){
|
||||
// BOOST_ASSERT(count <= std::size_t(boost::integer_traits<std::streamsize>::const_max));
|
||||
@ -166,7 +165,7 @@ basic_binary_oprimitive<Archive, Elem, Tr>::save_binary(
|
||||
// figure number of elements to output - round up
|
||||
count = ( count + sizeof(Elem) - 1) / sizeof(Elem);
|
||||
std::streamsize scount = m_sb.sputn(
|
||||
static_cast<const Elem *>(address),
|
||||
static_cast<const Elem *>(address),
|
||||
static_cast<std::streamsize>(count)
|
||||
);
|
||||
if(count != static_cast<std::size_t>(scount))
|
||||
@ -174,14 +173,14 @@ basic_binary_oprimitive<Archive, Elem, Tr>::save_binary(
|
||||
archive_exception(archive_exception::output_stream_error)
|
||||
);
|
||||
//os.write(
|
||||
// static_cast<const typename OStream::char_type *>(address),
|
||||
// static_cast<const typename OStream::char_type *>(address),
|
||||
// count
|
||||
//);
|
||||
//BOOST_ASSERT(os.good());
|
||||
}
|
||||
|
||||
} //namespace boost
|
||||
} //namespace archive
|
||||
} //namespace boost
|
||||
} //namespace archive
|
||||
|
||||
#include <boost/archive/detail/abi_suffix.hpp> // pop pragmas
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// basic_text_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)
|
||||
@ -46,7 +46,7 @@ namespace detail {
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// class basic_text_iarchive - read serialized objects from a input text stream
|
||||
template<class Archive>
|
||||
class BOOST_SYMBOL_VISIBLE basic_text_iarchive :
|
||||
class BOOST_SYMBOL_VISIBLE basic_text_iarchive :
|
||||
public detail::common_iarchive<Archive>
|
||||
{
|
||||
#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
@ -54,7 +54,7 @@ public:
|
||||
#else
|
||||
protected:
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1500)
|
||||
// for some inexplicable reason insertion of "class" generates compile erro
|
||||
// for some inexplicable reason insertion of "class" generates compile error
|
||||
// on msvc 7.1
|
||||
friend detail::interface_iarchive<Archive>;
|
||||
#else
|
||||
@ -62,26 +62,26 @@ protected:
|
||||
#endif
|
||||
#endif
|
||||
// intermediate level to support override of operators
|
||||
// fot templates in the absence of partial function
|
||||
// fot templates in the absence of partial function
|
||||
// template ordering
|
||||
typedef detail::common_iarchive<Archive> detail_common_iarchive;
|
||||
template<class T>
|
||||
void load_override(T & t){
|
||||
this->detail_common_iarchive::load_override(t);
|
||||
}
|
||||
// text file don't include the optional information
|
||||
// text file don't include the optional information
|
||||
void load_override(class_id_optional_type & /*t*/){}
|
||||
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
|
||||
load_override(class_name_type & t);
|
||||
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
|
||||
init(void);
|
||||
init();
|
||||
|
||||
basic_text_iarchive(unsigned int flags) :
|
||||
basic_text_iarchive(unsigned int flags) :
|
||||
detail::common_iarchive<Archive>(flags)
|
||||
{}
|
||||
~basic_text_iarchive(){}
|
||||
~basic_text_iarchive() BOOST_OVERRIDE {}
|
||||
};
|
||||
|
||||
} // namespace archive
|
||||
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// basic_text_iprimitive.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)
|
||||
@ -29,8 +29,8 @@
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#if defined(BOOST_NO_STDC_NAMESPACE)
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
#if ! defined(BOOST_DINKUMWARE_STDLIB) && ! defined(__SGI_STL_PORT)
|
||||
using ::locale;
|
||||
#endif
|
||||
@ -121,9 +121,9 @@ protected:
|
||||
t = i;
|
||||
}
|
||||
#endif
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL
|
||||
basic_text_iprimitive(IStream &is, bool no_codecvt);
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL
|
||||
~basic_text_iprimitive();
|
||||
public:
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
|
||||
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// basic_text_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)
|
||||
@ -44,9 +44,9 @@ namespace detail {
|
||||
} // namespace detail
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// class basic_text_oarchive
|
||||
// class basic_text_oarchive
|
||||
template<class Archive>
|
||||
class BOOST_SYMBOL_VISIBLE basic_text_oarchive :
|
||||
class BOOST_SYMBOL_VISIBLE basic_text_oarchive :
|
||||
public detail::common_oarchive<Archive>
|
||||
{
|
||||
#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
@ -89,7 +89,7 @@ protected:
|
||||
this->detail_common_oarchive::save_override(t);
|
||||
}
|
||||
|
||||
// text file don't include the optional information
|
||||
// text file don't include the optional information
|
||||
void save_override(const class_id_optional_type & /* t */){}
|
||||
|
||||
void save_override(const class_name_type & t){
|
||||
@ -104,7 +104,7 @@ protected:
|
||||
detail::common_oarchive<Archive>(flags),
|
||||
delimiter(none)
|
||||
{}
|
||||
~basic_text_oarchive(){}
|
||||
~basic_text_oarchive() BOOST_OVERRIDE {}
|
||||
};
|
||||
|
||||
} // namespace archive
|
||||
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// basic_text_oprimitive.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)
|
||||
@ -38,7 +38,7 @@
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_NO_STDC_NAMESPACE)
|
||||
namespace std{
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
#if ! defined(BOOST_DINKUMWARE_STDLIB) && ! defined(__SGI_STL_PORT)
|
||||
using ::locale;
|
||||
@ -142,22 +142,23 @@ protected:
|
||||
|
||||
template<class T>
|
||||
struct is_float {
|
||||
typedef typename mpl::bool_<
|
||||
boost::is_floating_point<T>::value
|
||||
typedef typename mpl::bool_<
|
||||
boost::is_floating_point<T>::value
|
||||
|| (std::numeric_limits<T>::is_specialized
|
||||
&& !std::numeric_limits<T>::is_integer
|
||||
&& !std::numeric_limits<T>::is_exact
|
||||
&& std::numeric_limits<T>::max_exponent)
|
||||
&& std::numeric_limits<T>::max_exponent)
|
||||
>::type type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
void save_impl(const T &t, boost::mpl::bool_<true> &){
|
||||
// must be a user mistake - can't serialize un-initialized data
|
||||
if(os.fail())
|
||||
if(os.fail()){
|
||||
boost::serialization::throw_exception(
|
||||
archive_exception(archive_exception::output_stream_error)
|
||||
);
|
||||
}
|
||||
// The formulae for the number of decimla digits required is given in
|
||||
// http://www2.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1822.pdf
|
||||
// which is derived from Kahan's paper:
|
||||
@ -181,7 +182,7 @@ protected:
|
||||
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL
|
||||
basic_text_oprimitive(OStream & os, bool no_codecvt);
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL
|
||||
~basic_text_oprimitive();
|
||||
public:
|
||||
// unformatted append of one character
|
||||
@ -197,12 +198,12 @@ public:
|
||||
while('\0' != *s)
|
||||
os.put(*s++);
|
||||
}
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
|
||||
save_binary(const void *address, std::size_t count);
|
||||
};
|
||||
|
||||
} //namespace boost
|
||||
} //namespace archive
|
||||
} //namespace boost
|
||||
} //namespace archive
|
||||
|
||||
#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// basic_xml_archive.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,40 +21,40 @@
|
||||
#include <boost/archive/detail/auto_link_archive.hpp>
|
||||
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace archive {
|
||||
|
||||
// constant strings used in xml i/o
|
||||
|
||||
extern
|
||||
extern
|
||||
BOOST_ARCHIVE_DECL const char *
|
||||
BOOST_ARCHIVE_XML_OBJECT_ID();
|
||||
|
||||
extern
|
||||
extern
|
||||
BOOST_ARCHIVE_DECL const char *
|
||||
BOOST_ARCHIVE_XML_OBJECT_REFERENCE();
|
||||
|
||||
extern
|
||||
extern
|
||||
BOOST_ARCHIVE_DECL const char *
|
||||
BOOST_ARCHIVE_XML_CLASS_ID();
|
||||
|
||||
extern
|
||||
extern
|
||||
BOOST_ARCHIVE_DECL const char *
|
||||
BOOST_ARCHIVE_XML_CLASS_ID_REFERENCE();
|
||||
|
||||
extern
|
||||
extern
|
||||
BOOST_ARCHIVE_DECL const char *
|
||||
BOOST_ARCHIVE_XML_CLASS_NAME();
|
||||
|
||||
extern
|
||||
extern
|
||||
BOOST_ARCHIVE_DECL const char *
|
||||
BOOST_ARCHIVE_XML_TRACKING();
|
||||
|
||||
extern
|
||||
extern
|
||||
BOOST_ARCHIVE_DECL const char *
|
||||
BOOST_ARCHIVE_XML_VERSION();
|
||||
|
||||
extern
|
||||
extern
|
||||
BOOST_ARCHIVE_DECL const char *
|
||||
BOOST_ARCHIVE_XML_SIGNATURE();
|
||||
|
||||
|
@ -104,7 +104,7 @@ protected:
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL
|
||||
basic_xml_iarchive(unsigned int flags);
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL
|
||||
~basic_xml_iarchive();
|
||||
~basic_xml_iarchive() BOOST_OVERRIDE;
|
||||
};
|
||||
|
||||
} // namespace archive
|
||||
|
@ -123,7 +123,7 @@ protected:
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL
|
||||
basic_xml_oarchive(unsigned int flags);
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL
|
||||
~basic_xml_oarchive();
|
||||
~basic_xml_oarchive() BOOST_OVERRIDE;
|
||||
};
|
||||
|
||||
} // namespace archive
|
||||
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// binary_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)
|
||||
@ -33,8 +33,8 @@ namespace archive {
|
||||
// preserve correct static polymorphism.
|
||||
class BOOST_SYMBOL_VISIBLE binary_iarchive :
|
||||
public binary_iarchive_impl<
|
||||
boost::archive::binary_iarchive,
|
||||
std::istream::char_type,
|
||||
boost::archive::binary_iarchive,
|
||||
std::istream::char_type,
|
||||
std::istream::traits_type
|
||||
>{
|
||||
public:
|
||||
@ -42,12 +42,16 @@ public:
|
||||
binary_iarchive_impl<
|
||||
binary_iarchive, std::istream::char_type, std::istream::traits_type
|
||||
>(is, flags)
|
||||
{}
|
||||
{
|
||||
init(flags);
|
||||
}
|
||||
binary_iarchive(std::streambuf & bsb, unsigned int flags = 0) :
|
||||
binary_iarchive_impl<
|
||||
binary_iarchive, std::istream::char_type, std::istream::traits_type
|
||||
>(bsb, flags)
|
||||
{}
|
||||
{
|
||||
init(flags);
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace archive
|
||||
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// binary_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)
|
||||
@ -25,7 +25,7 @@
|
||||
# pragma warning(disable : 4511 4512)
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace archive {
|
||||
|
||||
namespace detail {
|
||||
@ -33,7 +33,7 @@ namespace detail {
|
||||
} // namespace detail
|
||||
|
||||
template<class Archive, class Elem, class Tr>
|
||||
class BOOST_SYMBOL_VISIBLE binary_iarchive_impl :
|
||||
class BOOST_SYMBOL_VISIBLE binary_iarchive_impl :
|
||||
public basic_binary_iprimitive<Archive, Elem, Tr>,
|
||||
public basic_binary_iarchive<Archive>
|
||||
{
|
||||
@ -70,29 +70,25 @@ protected:
|
||||
#endif
|
||||
}
|
||||
binary_iarchive_impl(
|
||||
std::basic_streambuf<Elem, Tr> & bsb,
|
||||
std::basic_streambuf<Elem, Tr> & bsb,
|
||||
unsigned int flags
|
||||
) :
|
||||
basic_binary_iprimitive<Archive, Elem, Tr>(
|
||||
bsb,
|
||||
bsb,
|
||||
0 != (flags & no_codecvt)
|
||||
),
|
||||
basic_binary_iarchive<Archive>(flags)
|
||||
{
|
||||
init(flags);
|
||||
}
|
||||
{}
|
||||
binary_iarchive_impl(
|
||||
std::basic_istream<Elem, Tr> & is,
|
||||
std::basic_istream<Elem, Tr> & is,
|
||||
unsigned int flags
|
||||
) :
|
||||
basic_binary_iprimitive<Archive, Elem, Tr>(
|
||||
* is.rdbuf(),
|
||||
* is.rdbuf(),
|
||||
0 != (flags & no_codecvt)
|
||||
),
|
||||
basic_binary_iarchive<Archive>(flags)
|
||||
{
|
||||
init(flags);
|
||||
}
|
||||
{}
|
||||
};
|
||||
|
||||
} // namespace archive
|
||||
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// binary_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)
|
||||
@ -26,13 +26,13 @@
|
||||
# pragma warning(disable : 4511 4512)
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace archive {
|
||||
|
||||
// do not derive from this class. If you want to extend this functionality
|
||||
// via inhertance, derived from binary_oarchive_impl instead. This will
|
||||
// preserve correct static polymorphism.
|
||||
class BOOST_SYMBOL_VISIBLE binary_oarchive :
|
||||
class BOOST_SYMBOL_VISIBLE binary_oarchive :
|
||||
public binary_oarchive_impl<
|
||||
binary_oarchive, std::ostream::char_type, std::ostream::traits_type
|
||||
>
|
||||
@ -42,12 +42,16 @@ public:
|
||||
binary_oarchive_impl<
|
||||
binary_oarchive, std::ostream::char_type, std::ostream::traits_type
|
||||
>(os, flags)
|
||||
{}
|
||||
{
|
||||
init(flags);
|
||||
}
|
||||
binary_oarchive(std::streambuf & bsb, unsigned int flags = 0) :
|
||||
binary_oarchive_impl<
|
||||
binary_oarchive, std::ostream::char_type, std::ostream::traits_type
|
||||
>(bsb, flags)
|
||||
{}
|
||||
{
|
||||
init(flags);
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace archive
|
||||
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// binary_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)
|
||||
@ -26,7 +26,7 @@
|
||||
# pragma warning(disable : 4511 4512)
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace archive {
|
||||
|
||||
namespace detail {
|
||||
@ -34,7 +34,7 @@ namespace detail {
|
||||
} // namespace detail
|
||||
|
||||
template<class Archive, class Elem, class Tr>
|
||||
class BOOST_SYMBOL_VISIBLE binary_oarchive_impl :
|
||||
class BOOST_SYMBOL_VISIBLE binary_oarchive_impl :
|
||||
public basic_binary_oprimitive<Archive, Elem, Tr>,
|
||||
public basic_binary_oarchive<Archive>
|
||||
{
|
||||
@ -71,29 +71,25 @@ protected:
|
||||
#endif
|
||||
}
|
||||
binary_oarchive_impl(
|
||||
std::basic_streambuf<Elem, Tr> & bsb,
|
||||
std::basic_streambuf<Elem, Tr> & bsb,
|
||||
unsigned int flags
|
||||
) :
|
||||
basic_binary_oprimitive<Archive, Elem, Tr>(
|
||||
bsb,
|
||||
bsb,
|
||||
0 != (flags & no_codecvt)
|
||||
),
|
||||
basic_binary_oarchive<Archive>(flags)
|
||||
{
|
||||
init(flags);
|
||||
}
|
||||
{}
|
||||
binary_oarchive_impl(
|
||||
std::basic_ostream<Elem, Tr> & os,
|
||||
std::basic_ostream<Elem, Tr> & os,
|
||||
unsigned int flags
|
||||
) :
|
||||
basic_binary_oprimitive<Archive, Elem, Tr>(
|
||||
* os.rdbuf(),
|
||||
* os.rdbuf(),
|
||||
0 != (flags & no_codecvt)
|
||||
),
|
||||
basic_binary_oarchive<Archive>(flags)
|
||||
{
|
||||
init(flags);
|
||||
}
|
||||
{}
|
||||
};
|
||||
|
||||
} // namespace archive
|
||||
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// binary_wiarchive.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,10 +25,10 @@
|
||||
#include <boost/archive/binary_iarchive_impl.hpp>
|
||||
#include <boost/archive/detail/register_archive.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace archive {
|
||||
|
||||
class binary_wiarchive :
|
||||
class binary_wiarchive :
|
||||
public binary_iarchive_impl<
|
||||
binary_wiarchive, std::wistream::char_type, std::wistream::traits_type
|
||||
>
|
||||
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// binary_woarchive.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,13 +25,13 @@
|
||||
#include <boost/archive/binary_oarchive_impl.hpp>
|
||||
#include <boost/archive/detail/register_archive.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace archive {
|
||||
|
||||
// do not derive from this class. If you want to extend this functionality
|
||||
// via inhertance, derived from binary_oarchive_impl instead. This will
|
||||
// preserve correct static polymorphism.
|
||||
class binary_woarchive :
|
||||
class binary_woarchive :
|
||||
public binary_oarchive_impl<
|
||||
binary_woarchive, std::wostream::char_type, std::wostream::traits_type
|
||||
>
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/serialization/force_include.hpp>
|
||||
#include <boost/archive/detail/auto_link_archive.hpp>
|
||||
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
|
||||
//#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
|
||||
|
||||
#if defined(BOOST_NO_STDC_NAMESPACE)
|
||||
namespace std {
|
||||
@ -52,21 +52,21 @@ class codecvt_null;
|
||||
template<>
|
||||
class codecvt_null<char> : public std::codecvt<char, char, std::mbstate_t>
|
||||
{
|
||||
virtual bool do_always_noconv() const throw() {
|
||||
bool do_always_noconv() const throw() BOOST_OVERRIDE {
|
||||
return true;
|
||||
}
|
||||
public:
|
||||
explicit codecvt_null(std::size_t no_locale_manage = 0) :
|
||||
std::codecvt<char, char, std::mbstate_t>(no_locale_manage)
|
||||
{}
|
||||
virtual ~codecvt_null(){};
|
||||
~codecvt_null() BOOST_OVERRIDE {}
|
||||
};
|
||||
|
||||
template<>
|
||||
class BOOST_WARCHIVE_DECL codecvt_null<wchar_t> :
|
||||
class BOOST_SYMBOL_VISIBLE codecvt_null<wchar_t> :
|
||||
public std::codecvt<wchar_t, char, std::mbstate_t>
|
||||
{
|
||||
virtual std::codecvt_base::result
|
||||
BOOST_SYMBOL_EXPORT std::codecvt_base::result
|
||||
do_out(
|
||||
std::mbstate_t & state,
|
||||
const wchar_t * first1,
|
||||
@ -75,8 +75,9 @@ class BOOST_WARCHIVE_DECL codecvt_null<wchar_t> :
|
||||
char * first2,
|
||||
char * last2,
|
||||
char * & next2
|
||||
) const;
|
||||
virtual std::codecvt_base::result
|
||||
) const BOOST_OVERRIDE;
|
||||
|
||||
BOOST_SYMBOL_EXPORT std::codecvt_base::result
|
||||
do_in(
|
||||
std::mbstate_t & state,
|
||||
const char * first1,
|
||||
@ -85,18 +86,23 @@ class BOOST_WARCHIVE_DECL codecvt_null<wchar_t> :
|
||||
wchar_t * first2,
|
||||
wchar_t * last2,
|
||||
wchar_t * & next2
|
||||
) const;
|
||||
virtual int do_encoding( ) const throw( ){
|
||||
) const BOOST_OVERRIDE;
|
||||
|
||||
BOOST_SYMBOL_EXPORT int do_encoding( ) const throw( ) BOOST_OVERRIDE {
|
||||
return sizeof(wchar_t) / sizeof(char);
|
||||
}
|
||||
virtual int do_max_length( ) const throw( ){
|
||||
|
||||
BOOST_SYMBOL_EXPORT bool do_always_noconv() const throw() BOOST_OVERRIDE {
|
||||
return false;
|
||||
}
|
||||
|
||||
BOOST_SYMBOL_EXPORT int do_max_length( ) const throw( ) BOOST_OVERRIDE {
|
||||
return do_encoding();
|
||||
}
|
||||
public:
|
||||
explicit codecvt_null(std::size_t no_locale_manage = 0) :
|
||||
std::codecvt<wchar_t, char, std::mbstate_t>(no_locale_manage)
|
||||
{}
|
||||
//virtual ~codecvt_null(){};
|
||||
BOOST_SYMBOL_EXPORT explicit codecvt_null(std::size_t no_locale_manage = 0);
|
||||
|
||||
BOOST_SYMBOL_EXPORT ~codecvt_null() BOOST_OVERRIDE ;
|
||||
};
|
||||
|
||||
} // namespace archive
|
||||
@ -105,6 +111,6 @@ public:
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
#include <boost/archive/detail/abi_suffix.hpp> // pop pragmas
|
||||
//#include <boost/archive/detail/abi_suffix.hpp> // pop pragmas
|
||||
|
||||
#endif //BOOST_ARCHIVE_CODECVT_NULL_HPP
|
||||
|
@ -1,7 +1,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// abi_prefix.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)
|
||||
|
@ -1,7 +1,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// abi_suffix.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)
|
||||
|
@ -7,10 +7,10 @@
|
||||
#endif
|
||||
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// archive_serializer_map.hpp: extenstion of type_info required for
|
||||
// archive_serializer_map.hpp: extenstion of type_info required for
|
||||
// serialization.
|
||||
|
||||
// (C) Copyright 2009 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 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)
|
||||
@ -18,7 +18,7 @@
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
|
||||
// note: this is nothing more than the thinest of wrappers around
|
||||
// basic_serializer_map so we can have a one map / archive type.
|
||||
// basic_serializer_map so we can have a one map / archive type.
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/archive/detail/auto_link_archive.hpp>
|
||||
|
@ -16,12 +16,12 @@
|
||||
|
||||
// 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
|
||||
|
||||
// enable automatic library variant selection ------------------------------//
|
||||
// enable automatic library variant selection ------------------------------//
|
||||
|
||||
#include <boost/archive/detail/decl.hpp>
|
||||
|
||||
|
@ -16,12 +16,12 @@
|
||||
|
||||
// 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
|
||||
|
||||
// enable automatic library variant selection ------------------------------//
|
||||
// enable automatic library variant selection ------------------------------//
|
||||
|
||||
#include <boost/archive/detail/decl.hpp>
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// basic_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)
|
||||
@ -72,27 +72,27 @@ public:
|
||||
const basic_iserializer & bis
|
||||
);
|
||||
BOOST_ARCHIVE_DECL void load_object(
|
||||
void *t,
|
||||
void *t,
|
||||
const basic_iserializer & bis
|
||||
);
|
||||
BOOST_ARCHIVE_DECL const basic_pointer_iserializer *
|
||||
BOOST_ARCHIVE_DECL 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 & eti
|
||||
)
|
||||
);
|
||||
// real public API starts here
|
||||
BOOST_ARCHIVE_DECL void
|
||||
set_library_version(library_version_type archive_library_version);
|
||||
BOOST_ARCHIVE_DECL library_version_type
|
||||
BOOST_ARCHIVE_DECL void
|
||||
set_library_version(boost::serialization::library_version_type archive_library_version);
|
||||
BOOST_ARCHIVE_DECL boost::serialization::library_version_type
|
||||
get_library_version() const;
|
||||
BOOST_ARCHIVE_DECL unsigned int
|
||||
get_flags() const;
|
||||
BOOST_ARCHIVE_DECL void
|
||||
BOOST_ARCHIVE_DECL void
|
||||
reset_object_address(const void * new_address, const void * old_address);
|
||||
BOOST_ARCHIVE_DECL void
|
||||
BOOST_ARCHIVE_DECL void
|
||||
delete_created_pointers();
|
||||
};
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// basic_iserializer.hpp: extenstion of type_info required for serialization.
|
||||
|
||||
// (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)
|
||||
@ -42,7 +42,7 @@ namespace detail {
|
||||
class basic_iarchive;
|
||||
class basic_pointer_iserializer;
|
||||
|
||||
class BOOST_SYMBOL_VISIBLE basic_iserializer :
|
||||
class BOOST_SYMBOL_VISIBLE basic_iserializer :
|
||||
public basic_serializer
|
||||
{
|
||||
private:
|
||||
@ -63,7 +63,7 @@ public:
|
||||
return m_bpis;
|
||||
}
|
||||
virtual void load_object_data(
|
||||
basic_iarchive & ar,
|
||||
basic_iarchive & ar,
|
||||
void *x,
|
||||
const unsigned int file_version
|
||||
) const = 0;
|
||||
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// basic_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)
|
||||
@ -69,19 +69,19 @@ public:
|
||||
const basic_oserializer & bos
|
||||
);
|
||||
BOOST_ARCHIVE_DECL void save_object(
|
||||
const void *x,
|
||||
const void *x,
|
||||
const basic_oserializer & bos
|
||||
);
|
||||
BOOST_ARCHIVE_DECL void save_pointer(
|
||||
const void * t,
|
||||
const void * t,
|
||||
const basic_pointer_oserializer * bpos_ptr
|
||||
);
|
||||
void save_null_pointer(){
|
||||
vsave(NULL_POINTER_TAG);
|
||||
vsave(BOOST_SERIALIZATION_NULL_POINTER_TAG);
|
||||
}
|
||||
// real public interface starts here
|
||||
BOOST_ARCHIVE_DECL void end_preamble(); // default implementation does nothing
|
||||
BOOST_ARCHIVE_DECL library_version_type get_library_version() const;
|
||||
BOOST_ARCHIVE_DECL boost::serialization::library_version_type get_library_version() const;
|
||||
BOOST_ARCHIVE_DECL unsigned int get_flags() const;
|
||||
};
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// basic_oserializer.hpp: extenstion of type_info required for serialization.
|
||||
|
||||
// (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)
|
||||
|
@ -7,10 +7,10 @@
|
||||
#endif
|
||||
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// basic_pointer_oserializer.hpp: extenstion of type_info required for
|
||||
// basic_pointer_oserializer.hpp: extenstion of type_info required for
|
||||
// serialization.
|
||||
|
||||
// (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)
|
||||
@ -51,7 +51,7 @@ public:
|
||||
virtual void * heap_allocation() const = 0;
|
||||
virtual const basic_iserializer & get_basic_serializer() const = 0;
|
||||
virtual void load_object_ptr(
|
||||
basic_iarchive & ar,
|
||||
basic_iarchive & ar,
|
||||
void * x,
|
||||
const unsigned int file_version
|
||||
) const = 0;
|
||||
|
@ -7,10 +7,10 @@
|
||||
#endif
|
||||
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// basic_pointer_oserializer.hpp: extenstion of type_info required for
|
||||
// basic_pointer_oserializer.hpp: extenstion of type_info required for
|
||||
// serialization.
|
||||
|
||||
// (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 @@ namespace detail {
|
||||
class basic_oarchive;
|
||||
class basic_oserializer;
|
||||
|
||||
class BOOST_SYMBOL_VISIBLE basic_pointer_oserializer :
|
||||
class BOOST_SYMBOL_VISIBLE basic_pointer_oserializer :
|
||||
public basic_serializer
|
||||
{
|
||||
protected:
|
||||
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// basic_serializer.hpp: extenstion of type_info required for serialization.
|
||||
|
||||
// (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)
|
||||
@ -32,18 +32,18 @@ namespace boost {
|
||||
namespace archive {
|
||||
namespace detail {
|
||||
|
||||
class basic_serializer :
|
||||
class basic_serializer :
|
||||
private boost::noncopyable
|
||||
{
|
||||
const boost::serialization::extended_type_info * m_eti;
|
||||
protected:
|
||||
explicit basic_serializer(
|
||||
const boost::serialization::extended_type_info & eti
|
||||
) :
|
||||
) :
|
||||
m_eti(& eti)
|
||||
{}
|
||||
public:
|
||||
inline bool
|
||||
inline bool
|
||||
operator<(const basic_serializer & rhs) const {
|
||||
// can't compare address since there can be multiple eti records
|
||||
// for the same type in different execution modules (that is, DLLS)
|
||||
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// basic_serializer_map.hpp: extenstion of type_info required for serialization.
|
||||
|
||||
// (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 @@
|
||||
|
||||
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
class extended_type_info;
|
||||
}
|
||||
@ -45,7 +45,7 @@ basic_serializer_map : public
|
||||
) const ;
|
||||
};
|
||||
typedef std::set<
|
||||
const basic_serializer *,
|
||||
const basic_serializer *,
|
||||
type_info_pointer_compare
|
||||
> map_type;
|
||||
map_type m_map;
|
||||
|
@ -4,18 +4,20 @@
|
||||
// MS compatible compilers support #pragma once
|
||||
#if defined(_MSC_VER)
|
||||
# pragma once
|
||||
#pragma inline_depth(511)
|
||||
#if !defined(__clang__)
|
||||
#pragma inline_depth(255)
|
||||
#pragma inline_recursion(on)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__MWERKS__)
|
||||
#pragma inline_depth(511)
|
||||
#pragma inline_depth(255)
|
||||
#endif
|
||||
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// check.hpp: interface for serialization system.
|
||||
|
||||
// (C) Copyright 2009 Robert Ramey - http://www.rrsd.com .
|
||||
// (C) Copyright 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)
|
||||
@ -49,7 +51,7 @@ namespace detail {
|
||||
|
||||
template<class T>
|
||||
inline void check_object_level(){
|
||||
typedef
|
||||
typedef
|
||||
typename mpl::greater_equal<
|
||||
serialization::implementation_level< T >,
|
||||
mpl::int_<serialization::primitive_type>
|
||||
@ -62,7 +64,7 @@ inline void check_object_level(){
|
||||
|
||||
template<class T>
|
||||
inline void check_object_versioning(){
|
||||
typedef
|
||||
typedef
|
||||
typename mpl::or_<
|
||||
typename mpl::greater<
|
||||
serialization::implementation_level< T >,
|
||||
@ -90,8 +92,8 @@ inline void check_object_tracking(){
|
||||
// saving an non-const object of a type not marked "track_never)
|
||||
|
||||
// may be an indicator of an error usage of the
|
||||
// serialization library and should be double checked.
|
||||
// See documentation on object tracking. Also, see the
|
||||
// serialization library and should be double checked.
|
||||
// See documentation on object tracking. Also, see the
|
||||
// "rationale" section of the documenation
|
||||
// for motivation for this checking.
|
||||
|
||||
@ -104,7 +106,7 @@ template<class T>
|
||||
inline void check_pointer_level(){
|
||||
// we should only invoke this once we KNOW that T
|
||||
// has been used as a pointer!!
|
||||
typedef
|
||||
typedef
|
||||
typename mpl::or_<
|
||||
typename mpl::greater<
|
||||
serialization::implementation_level< T >,
|
||||
@ -126,12 +128,12 @@ inline void check_pointer_level(){
|
||||
|
||||
// in this case, indication that an object is tracked is
|
||||
// not stored in the archive itself - see level == object_serializable
|
||||
// but rather the existence of the operation ar >> T * is used to
|
||||
// but rather the existence of the operation ar >> T * is used to
|
||||
// infer that an object of this type should be tracked. So, if
|
||||
// you save via a pointer but don't load via a pointer the operation
|
||||
// will fail on load without given any valid reason for the failure.
|
||||
|
||||
// So if your program traps here, consider changing the
|
||||
// So if your program traps here, consider changing the
|
||||
// tracking or implementation level traits - or not
|
||||
// serializing via a pointer.
|
||||
BOOST_STATIC_WARNING(typex::value);
|
||||
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// common_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)
|
||||
@ -42,22 +42,22 @@ class BOOST_SYMBOL_VISIBLE common_iarchive :
|
||||
friend class interface_iarchive<Archive>;
|
||||
friend class basic_iarchive;
|
||||
private:
|
||||
virtual void vload(version_type & t){
|
||||
* this->This() >> t;
|
||||
}
|
||||
virtual void vload(object_id_type & t){
|
||||
void vload(version_type & t) BOOST_OVERRIDE {
|
||||
* this->This() >> t;
|
||||
}
|
||||
virtual void vload(class_id_type & t){
|
||||
void vload(object_id_type & t) BOOST_OVERRIDE {
|
||||
* this->This() >> t;
|
||||
}
|
||||
virtual void vload(class_id_optional_type & t){
|
||||
void vload(class_id_type & t) BOOST_OVERRIDE {
|
||||
* this->This() >> t;
|
||||
}
|
||||
virtual void vload(tracking_type & t){
|
||||
void vload(class_id_optional_type & t) BOOST_OVERRIDE {
|
||||
* this->This() >> t;
|
||||
}
|
||||
virtual void vload(class_name_type &s){
|
||||
void vload(tracking_type & t) BOOST_OVERRIDE {
|
||||
* this->This() >> t;
|
||||
}
|
||||
void vload(class_name_type &s) BOOST_OVERRIDE {
|
||||
* this->This() >> s;
|
||||
}
|
||||
protected:
|
||||
@ -71,7 +71,7 @@ protected:
|
||||
void load_start(const char * /*name*/){}
|
||||
void load_end(const char * /*name*/){}
|
||||
// default archive initialization
|
||||
common_iarchive(unsigned int flags = 0) :
|
||||
common_iarchive(unsigned int flags = 0) :
|
||||
basic_iarchive(flags),
|
||||
interface_iarchive<Archive>()
|
||||
{}
|
||||
@ -86,4 +86,3 @@ protected:
|
||||
#endif
|
||||
|
||||
#endif // BOOST_ARCHIVE_DETAIL_COMMON_IARCHIVE_HPP
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// common_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)
|
||||
@ -40,28 +40,28 @@ class BOOST_SYMBOL_VISIBLE common_oarchive :
|
||||
friend class interface_oarchive<Archive>;
|
||||
friend class basic_oarchive;
|
||||
private:
|
||||
virtual void vsave(const version_type t){
|
||||
void vsave(const version_type t) BOOST_OVERRIDE {
|
||||
* this->This() << t;
|
||||
}
|
||||
virtual void vsave(const object_id_type t){
|
||||
void vsave(const object_id_type t) BOOST_OVERRIDE {
|
||||
* this->This() << t;
|
||||
}
|
||||
virtual void vsave(const object_reference_type t){
|
||||
void vsave(const object_reference_type t) BOOST_OVERRIDE {
|
||||
* this->This() << t;
|
||||
}
|
||||
virtual void vsave(const class_id_type t){
|
||||
void vsave(const class_id_type t) BOOST_OVERRIDE {
|
||||
* this->This() << t;
|
||||
}
|
||||
virtual void vsave(const class_id_reference_type t){
|
||||
void vsave(const class_id_reference_type t) BOOST_OVERRIDE {
|
||||
* this->This() << t;
|
||||
}
|
||||
virtual void vsave(const class_id_optional_type t){
|
||||
void vsave(const class_id_optional_type t) BOOST_OVERRIDE {
|
||||
* this->This() << t;
|
||||
}
|
||||
virtual void vsave(const class_name_type & t){
|
||||
void vsave(const class_name_type & t) BOOST_OVERRIDE {
|
||||
* this->This() << t;
|
||||
}
|
||||
virtual void vsave(const tracking_type t){
|
||||
void vsave(const tracking_type t) BOOST_OVERRIDE {
|
||||
* this->This() << t;
|
||||
}
|
||||
protected:
|
||||
@ -72,7 +72,7 @@ protected:
|
||||
}
|
||||
void save_start(const char * /*name*/){}
|
||||
void save_end(const char * /*name*/){}
|
||||
common_oarchive(unsigned int flags = 0) :
|
||||
common_oarchive(unsigned int flags = 0) :
|
||||
basic_oarchive(flags),
|
||||
interface_oarchive<Archive>()
|
||||
{}
|
||||
|
@ -1,10 +1,10 @@
|
||||
#ifndef BOOST_ARCHIVE_DETAIL_DECL_HPP
|
||||
#define BOOST_ARCHIVE_DETAIL_DECL_HPP
|
||||
#define BOOST_ARCHIVE_DETAIL_DECL_HPP
|
||||
|
||||
// MS compatible compilers support #pragma once
|
||||
#if defined(_MSC_VER)
|
||||
# pragma once
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/////////1/////////2///////// 3/////////4/////////5/////////6/////////7/////////8
|
||||
// decl.hpp
|
||||
@ -16,7 +16,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
|
||||
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// interface_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)
|
||||
@ -31,10 +31,10 @@ namespace detail {
|
||||
class basic_pointer_iserializer;
|
||||
|
||||
template<class Archive>
|
||||
class interface_iarchive
|
||||
class interface_iarchive
|
||||
{
|
||||
protected:
|
||||
interface_iarchive(){};
|
||||
interface_iarchive() {}
|
||||
public:
|
||||
/////////////////////////////////////////////////////////
|
||||
// archive public interface
|
||||
@ -47,11 +47,11 @@ public:
|
||||
}
|
||||
|
||||
template<class T>
|
||||
const basic_pointer_iserializer *
|
||||
const basic_pointer_iserializer *
|
||||
register_type(T * = NULL){
|
||||
const basic_pointer_iserializer & bpis =
|
||||
boost::serialization::singleton<
|
||||
pointer_iserializer<Archive, T>
|
||||
pointer_iserializer<Archive, T>
|
||||
>::get_const_instance();
|
||||
this->This()->register_basic_serializer(bpis.get_basic_serializer());
|
||||
return & bpis;
|
||||
@ -62,14 +62,14 @@ public:
|
||||
helper_collection & hc = this->This()->get_helper_collection();
|
||||
return hc.template find_helper<Helper>(id);
|
||||
}
|
||||
|
||||
|
||||
template<class T>
|
||||
Archive & operator>>(T & t){
|
||||
this->This()->load_override(t);
|
||||
return * this->This();
|
||||
}
|
||||
|
||||
// the & operator
|
||||
// the & operator
|
||||
template<class T>
|
||||
Archive & operator&(T & t){
|
||||
return *(this->This()) >> t;
|
||||
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// interface_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)
|
||||
@ -32,10 +32,10 @@ namespace detail {
|
||||
class basic_pointer_oserializer;
|
||||
|
||||
template<class Archive>
|
||||
class interface_oarchive
|
||||
class interface_oarchive
|
||||
{
|
||||
protected:
|
||||
interface_oarchive(){};
|
||||
interface_oarchive() {}
|
||||
public:
|
||||
/////////////////////////////////////////////////////////
|
||||
// archive public interface
|
||||
@ -48,7 +48,7 @@ public:
|
||||
}
|
||||
|
||||
template<class T>
|
||||
const basic_pointer_oserializer *
|
||||
const basic_pointer_oserializer *
|
||||
register_type(const T * = NULL){
|
||||
const basic_pointer_oserializer & bpos =
|
||||
boost::serialization::singleton<
|
||||
@ -57,7 +57,7 @@ public:
|
||||
this->This()->register_basic_serializer(bpos.get_basic_serializer());
|
||||
return & bpos;
|
||||
}
|
||||
|
||||
|
||||
template<class Helper>
|
||||
Helper &
|
||||
get_helper(void * const id = 0){
|
||||
@ -70,8 +70,8 @@ public:
|
||||
this->This()->save_override(t);
|
||||
return * this->This();
|
||||
}
|
||||
|
||||
// the & operator
|
||||
|
||||
// the & operator
|
||||
template<class T>
|
||||
Archive & operator&(const T & t){
|
||||
return * this ->This() << t;
|
||||
|
@ -2,20 +2,22 @@
|
||||
#define BOOST_ARCHIVE_DETAIL_ISERIALIZER_HPP
|
||||
|
||||
// MS compatible compilers support #pragma once
|
||||
#if defined(_MSC_VER)
|
||||
#if defined(BOOST_MSVC)
|
||||
# pragma once
|
||||
#pragma inline_depth(511)
|
||||
#if !defined(__clang__)
|
||||
#pragma inline_depth(255)
|
||||
#pragma inline_recursion(on)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__MWERKS__)
|
||||
#pragma inline_depth(511)
|
||||
#pragma inline_depth(255)
|
||||
#endif
|
||||
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// iserializer.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)
|
||||
@ -28,8 +30,8 @@
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#if defined(BOOST_NO_STDC_NAMESPACE)
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
} // namespace std
|
||||
#endif
|
||||
|
||||
@ -41,8 +43,8 @@ namespace std{
|
||||
#include <boost/mpl/equal_to.hpp>
|
||||
#include <boost/core/no_exceptions_support.hpp>
|
||||
|
||||
#ifndef BOOST_SERIALIZATION_DEFAULT_TYPE_INFO
|
||||
#include <boost/serialization/extended_type_info_typeid.hpp>
|
||||
#ifndef BOOST_SERIALIZATION_DEFAULT_TYPE_INFO
|
||||
#include <boost/serialization/extended_type_info_typeid.hpp>
|
||||
#endif
|
||||
#include <boost/serialization/throw_exception.hpp>
|
||||
#include <boost/serialization/smart_cast.hpp>
|
||||
@ -60,12 +62,12 @@ namespace std{
|
||||
#if !defined(BOOST_MSVC) && \
|
||||
(BOOST_WORKAROUND(__IBMCPP__, < 1210) || \
|
||||
defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x590))
|
||||
#define DONT_USE_HAS_NEW_OPERATOR 1
|
||||
#define BOOST_SERIALIZATION_DONT_USE_HAS_NEW_OPERATOR 1
|
||||
#else
|
||||
#define DONT_USE_HAS_NEW_OPERATOR 0
|
||||
#define BOOST_SERIALIZATION_DONT_USE_HAS_NEW_OPERATOR 0
|
||||
#endif
|
||||
|
||||
#if ! DONT_USE_HAS_NEW_OPERATOR
|
||||
#if ! BOOST_SERIALIZATION_DONT_USE_HAS_NEW_OPERATOR
|
||||
#include <boost/type_traits/has_new_operator.hpp>
|
||||
#endif
|
||||
|
||||
@ -120,41 +122,41 @@ template<class Archive, class T>
|
||||
class iserializer : public basic_iserializer
|
||||
{
|
||||
private:
|
||||
virtual void destroy(/*const*/ void *address) const {
|
||||
void destroy(/*const*/ void *address) const BOOST_OVERRIDE {
|
||||
boost::serialization::access::destroy(static_cast<T *>(address));
|
||||
}
|
||||
public:
|
||||
explicit iserializer() :
|
||||
basic_iserializer(
|
||||
boost::serialization::singleton<
|
||||
typename
|
||||
typename
|
||||
boost::serialization::type_info_implementation< T >::type
|
||||
>::get_const_instance()
|
||||
)
|
||||
{}
|
||||
virtual BOOST_DLLEXPORT void load_object_data(
|
||||
BOOST_DLLEXPORT void load_object_data(
|
||||
basic_iarchive & ar,
|
||||
void *x,
|
||||
void *x,
|
||||
const unsigned int file_version
|
||||
) const BOOST_USED;
|
||||
virtual bool class_info() const {
|
||||
return boost::serialization::implementation_level< T >::value
|
||||
) const BOOST_OVERRIDE BOOST_USED;
|
||||
bool class_info() const BOOST_OVERRIDE {
|
||||
return boost::serialization::implementation_level< T >::value
|
||||
>= boost::serialization::object_class_info;
|
||||
}
|
||||
virtual bool tracking(const unsigned int /* flags */) const {
|
||||
return boost::serialization::tracking_level< T >::value
|
||||
bool tracking(const unsigned int /* flags */) const BOOST_OVERRIDE {
|
||||
return boost::serialization::tracking_level< T >::value
|
||||
== boost::serialization::track_always
|
||||
|| ( boost::serialization::tracking_level< T >::value
|
||||
|| ( boost::serialization::tracking_level< T >::value
|
||||
== boost::serialization::track_selectively
|
||||
&& serialized_as_pointer());
|
||||
}
|
||||
virtual version_type version() const {
|
||||
version_type version() const BOOST_OVERRIDE {
|
||||
return version_type(::boost::serialization::version< T >::value);
|
||||
}
|
||||
virtual bool is_polymorphic() const {
|
||||
bool is_polymorphic() const BOOST_OVERRIDE {
|
||||
return boost::is_polymorphic< T >::value;
|
||||
}
|
||||
virtual ~iserializer(){};
|
||||
~iserializer() BOOST_OVERRIDE {}
|
||||
};
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
@ -164,12 +166,12 @@ public:
|
||||
template<class Archive, class T>
|
||||
BOOST_DLLEXPORT void iserializer<Archive, T>::load_object_data(
|
||||
basic_iarchive & ar,
|
||||
void *x,
|
||||
void *x,
|
||||
const unsigned int file_version
|
||||
) const {
|
||||
// note: we now comment this out. Before we permited archive
|
||||
// version # to be very large. Now we don't. To permit
|
||||
// readers of these old archives, we have to suppress this
|
||||
// readers of these old archives, we have to suppress this
|
||||
// code. Perhaps in the future we might re-enable it but
|
||||
// permit its suppression with a runtime switch.
|
||||
#if 0
|
||||
@ -186,7 +188,7 @@ BOOST_DLLEXPORT void iserializer<Archive, T>::load_object_data(
|
||||
// be specialized by the user.
|
||||
boost::serialization::serialize_adl(
|
||||
boost::serialization::smart_cast_reference<Archive &>(ar),
|
||||
* static_cast<T *>(x),
|
||||
* static_cast<T *>(x),
|
||||
file_version
|
||||
);
|
||||
}
|
||||
@ -199,7 +201,7 @@ BOOST_DLLEXPORT void iserializer<Archive, T>::load_object_data(
|
||||
// the purpose of this code is to allocate memory for an object
|
||||
// without requiring the constructor to be called. Presumably
|
||||
// the allocated object will be subsequently initialized with
|
||||
// "placement new".
|
||||
// "placement new".
|
||||
// note: we have the boost type trait has_new_operator but we
|
||||
// have no corresponding has_delete_operator. So we presume
|
||||
// that the former being true would imply that the a delete
|
||||
@ -208,7 +210,7 @@ BOOST_DLLEXPORT void iserializer<Archive, T>::load_object_data(
|
||||
template<class T>
|
||||
struct heap_allocation {
|
||||
// boost::has_new_operator< T > doesn't work on these compilers
|
||||
#if DONT_USE_HAS_NEW_OPERATOR
|
||||
#if BOOST_SERIALIZATION_DONT_USE_HAS_NEW_OPERATOR
|
||||
// This doesn't handle operator new overload for class T
|
||||
static T * invoke_new(){
|
||||
return static_cast<T *>(operator new(sizeof(T)));
|
||||
@ -250,7 +252,7 @@ struct heap_allocation {
|
||||
mpl::eval_if<
|
||||
boost::has_new_operator< T >,
|
||||
mpl::identity<has_new_operator >,
|
||||
mpl::identity<doesnt_have_new_operator >
|
||||
mpl::identity<doesnt_have_new_operator >
|
||||
>::type typex;
|
||||
return typex::invoke_new();
|
||||
}
|
||||
@ -259,7 +261,7 @@ struct heap_allocation {
|
||||
mpl::eval_if<
|
||||
boost::has_new_operator< T >,
|
||||
mpl::identity<has_new_operator >,
|
||||
mpl::identity<doesnt_have_new_operator >
|
||||
mpl::identity<doesnt_have_new_operator >
|
||||
>::type typex;
|
||||
typex::invoke_delete(t);
|
||||
}
|
||||
@ -289,26 +291,26 @@ class pointer_iserializer :
|
||||
public basic_pointer_iserializer
|
||||
{
|
||||
private:
|
||||
virtual void * heap_allocation() const {
|
||||
void * heap_allocation() const BOOST_OVERRIDE {
|
||||
detail::heap_allocation<T> h;
|
||||
T * t = h.get();
|
||||
h.release();
|
||||
return t;
|
||||
}
|
||||
virtual const basic_iserializer & get_basic_serializer() const {
|
||||
const basic_iserializer & get_basic_serializer() const BOOST_OVERRIDE {
|
||||
return boost::serialization::singleton<
|
||||
iserializer<Archive, T>
|
||||
>::get_const_instance();
|
||||
}
|
||||
BOOST_DLLEXPORT virtual void load_object_ptr(
|
||||
basic_iarchive & ar,
|
||||
BOOST_DLLEXPORT void load_object_ptr(
|
||||
basic_iarchive & ar,
|
||||
void * x,
|
||||
const unsigned int file_version
|
||||
) const BOOST_USED;
|
||||
) const BOOST_OVERRIDE BOOST_USED;
|
||||
public:
|
||||
// this should alway be a singleton so make the constructor protected
|
||||
pointer_iserializer();
|
||||
~pointer_iserializer();
|
||||
~pointer_iserializer() BOOST_OVERRIDE;
|
||||
};
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
@ -319,12 +321,12 @@ public:
|
||||
// serialized only through base class won't get optimized out
|
||||
template<class Archive, class T>
|
||||
BOOST_DLLEXPORT void pointer_iserializer<Archive, T>::load_object_ptr(
|
||||
basic_iarchive & ar,
|
||||
basic_iarchive & ar,
|
||||
void * t,
|
||||
const unsigned int file_version
|
||||
) const
|
||||
{
|
||||
Archive & ar_impl =
|
||||
Archive & ar_impl =
|
||||
boost::serialization::smart_cast_reference<Archive &>(ar);
|
||||
|
||||
// note that the above will throw std::bad_alloc if the allocation
|
||||
@ -334,7 +336,7 @@ BOOST_DLLEXPORT void pointer_iserializer<Archive, T>::load_object_ptr(
|
||||
// automatically delete the t which is most likely not fully
|
||||
// constructed
|
||||
BOOST_TRY {
|
||||
// this addresses an obscure situation that occurs when
|
||||
// this addresses an obscure situation that occurs when
|
||||
// load_constructor de-serializes something through a pointer.
|
||||
ar.next_object_pointer(t);
|
||||
boost::serialization::load_construct_data_adl<Archive, T>(
|
||||
@ -358,7 +360,7 @@ template<class Archive, class T>
|
||||
pointer_iserializer<Archive, T>::pointer_iserializer() :
|
||||
basic_pointer_iserializer(
|
||||
boost::serialization::singleton<
|
||||
typename
|
||||
typename
|
||||
boost::serialization::type_info_implementation< T >::type
|
||||
>::get_const_instance()
|
||||
)
|
||||
@ -393,8 +395,8 @@ struct load_non_pointer_type {
|
||||
// make sure call is routed through the higest interface that might
|
||||
// be specialized by the user.
|
||||
boost::serialization::serialize_adl(
|
||||
ar,
|
||||
const_cast<T &>(t),
|
||||
ar,
|
||||
const_cast<T &>(t),
|
||||
boost::serialization::version< T >::value
|
||||
);
|
||||
}
|
||||
@ -407,7 +409,7 @@ struct load_non_pointer_type {
|
||||
static void invoke(Archive &ar, const T & t){
|
||||
void * x = boost::addressof(const_cast<T &>(t));
|
||||
ar.load_object(
|
||||
x,
|
||||
x,
|
||||
boost::serialization::singleton<
|
||||
iserializer<Archive, T>
|
||||
>::get_const_instance()
|
||||
@ -484,7 +486,7 @@ struct load_pointer_type {
|
||||
|
||||
template<class T>
|
||||
static const basic_pointer_iserializer * register_type(Archive &ar, const T* const /*t*/){
|
||||
// there should never be any need to load an abstract polymorphic
|
||||
// there should never be any need to load an abstract polymorphic
|
||||
// class pointer. Inhibiting code generation for this
|
||||
// permits abstract base classes to be used - note: exception
|
||||
// virtual serialize functions used for plug-ins
|
||||
@ -492,7 +494,7 @@ struct load_pointer_type {
|
||||
mpl::eval_if<
|
||||
boost::serialization::is_abstract<const T>,
|
||||
boost::mpl::identity<abstract>,
|
||||
boost::mpl::identity<non_abstract>
|
||||
boost::mpl::identity<non_abstract>
|
||||
>::type typex;
|
||||
return typex::template register_type< T >(ar);
|
||||
}
|
||||
@ -508,7 +510,7 @@ struct load_pointer_type {
|
||||
boost::serialization::void_upcast(
|
||||
eti,
|
||||
boost::serialization::singleton<
|
||||
typename
|
||||
typename
|
||||
boost::serialization::type_info_implementation< T >::type
|
||||
>::get_const_instance(),
|
||||
t
|
||||
@ -570,13 +572,13 @@ struct load_array_type {
|
||||
template<class T>
|
||||
static void invoke(Archive &ar, T &t){
|
||||
typedef typename remove_extent< T >::type value_type;
|
||||
|
||||
|
||||
// convert integers to correct enum to load
|
||||
// determine number of elements in the array. Consider the
|
||||
// fact that some machines will align elements on boundries
|
||||
// fact that some machines will align elements on boundaries
|
||||
// other than characters.
|
||||
std::size_t current_count = sizeof(t) / (
|
||||
static_cast<char *>(static_cast<void *>(&t[1]))
|
||||
static_cast<char *>(static_cast<void *>(&t[1]))
|
||||
- static_cast<char *>(static_cast<void *>(&t[0]))
|
||||
);
|
||||
boost::serialization::collection_size_type count;
|
||||
|
@ -4,18 +4,20 @@
|
||||
// MS compatible compilers support #pragma once
|
||||
#if defined(_MSC_VER)
|
||||
# pragma once
|
||||
#pragma inline_depth(511)
|
||||
#if !defined(__clang__)
|
||||
#pragma inline_depth(255)
|
||||
#pragma inline_recursion(on)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__MWERKS__)
|
||||
#pragma inline_depth(511)
|
||||
#pragma inline_depth(255)
|
||||
#endif
|
||||
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// oserializer.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)
|
||||
@ -36,8 +38,8 @@
|
||||
#include <boost/mpl/identity.hpp>
|
||||
#include <boost/mpl/bool_fwd.hpp>
|
||||
|
||||
#ifndef BOOST_SERIALIZATION_DEFAULT_TYPE_INFO
|
||||
#include <boost/serialization/extended_type_info_typeid.hpp>
|
||||
#ifndef BOOST_SERIALIZATION_DEFAULT_TYPE_INFO
|
||||
#include <boost/serialization/extended_type_info_typeid.hpp>
|
||||
#endif
|
||||
#include <boost/serialization/throw_exception.hpp>
|
||||
#include <boost/serialization/smart_cast.hpp>
|
||||
@ -105,37 +107,37 @@ template<class Archive, class T>
|
||||
class oserializer : public basic_oserializer
|
||||
{
|
||||
private:
|
||||
// private constructor to inhibit any existence other than the
|
||||
// private constructor to inhibit any existence other than the
|
||||
// static one
|
||||
public:
|
||||
explicit BOOST_DLLEXPORT oserializer() :
|
||||
basic_oserializer(
|
||||
boost::serialization::singleton<
|
||||
typename
|
||||
typename
|
||||
boost::serialization::type_info_implementation< T >::type
|
||||
>::get_const_instance()
|
||||
)
|
||||
{}
|
||||
virtual BOOST_DLLEXPORT void save_object_data(
|
||||
basic_oarchive & ar,
|
||||
BOOST_DLLEXPORT void save_object_data(
|
||||
basic_oarchive & ar,
|
||||
const void *x
|
||||
) const BOOST_USED;
|
||||
virtual bool class_info() const {
|
||||
return boost::serialization::implementation_level< T >::value
|
||||
) const BOOST_OVERRIDE BOOST_USED;
|
||||
bool class_info() const BOOST_OVERRIDE {
|
||||
return boost::serialization::implementation_level< T >::value
|
||||
>= boost::serialization::object_class_info;
|
||||
}
|
||||
virtual bool tracking(const unsigned int /* flags */) const {
|
||||
bool tracking(const unsigned int /* flags */) const BOOST_OVERRIDE {
|
||||
return boost::serialization::tracking_level< T >::value == boost::serialization::track_always
|
||||
|| (boost::serialization::tracking_level< T >::value == boost::serialization::track_selectively
|
||||
&& serialized_as_pointer());
|
||||
}
|
||||
virtual version_type version() const {
|
||||
version_type version() const BOOST_OVERRIDE {
|
||||
return version_type(::boost::serialization::version< T >::value);
|
||||
}
|
||||
virtual bool is_polymorphic() const {
|
||||
bool is_polymorphic() const BOOST_OVERRIDE {
|
||||
return boost::is_polymorphic< T >::value;
|
||||
}
|
||||
virtual ~oserializer(){}
|
||||
~oserializer() BOOST_OVERRIDE {}
|
||||
};
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
@ -144,7 +146,7 @@ public:
|
||||
|
||||
template<class Archive, class T>
|
||||
BOOST_DLLEXPORT void oserializer<Archive, T>::save_object_data(
|
||||
basic_oarchive & ar,
|
||||
basic_oarchive & ar,
|
||||
const void *x
|
||||
) const {
|
||||
// make sure call is routed through the highest interface that might
|
||||
@ -167,19 +169,19 @@ class pointer_oserializer :
|
||||
public basic_pointer_oserializer
|
||||
{
|
||||
private:
|
||||
const basic_oserializer &
|
||||
get_basic_serializer() const {
|
||||
const basic_oserializer &
|
||||
get_basic_serializer() const BOOST_OVERRIDE {
|
||||
return boost::serialization::singleton<
|
||||
oserializer<Archive, T>
|
||||
>::get_const_instance();
|
||||
}
|
||||
virtual BOOST_DLLEXPORT void save_object_ptr(
|
||||
BOOST_DLLEXPORT void save_object_ptr(
|
||||
basic_oarchive & ar,
|
||||
const void * x
|
||||
) const BOOST_USED;
|
||||
) const BOOST_OVERRIDE BOOST_USED;
|
||||
public:
|
||||
pointer_oserializer();
|
||||
~pointer_oserializer();
|
||||
~pointer_oserializer() BOOST_OVERRIDE;
|
||||
};
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
@ -196,11 +198,11 @@ BOOST_DLLEXPORT void pointer_oserializer<Archive, T>::save_object_ptr(
|
||||
// be specialized by the user.
|
||||
T * t = static_cast<T *>(const_cast<void *>(x));
|
||||
const unsigned int file_version = boost::serialization::version< T >::value;
|
||||
Archive & ar_impl
|
||||
Archive & ar_impl
|
||||
= boost::serialization::smart_cast_reference<Archive &>(ar);
|
||||
boost::serialization::save_construct_data_adl<Archive, T>(
|
||||
ar_impl,
|
||||
t,
|
||||
ar_impl,
|
||||
t,
|
||||
file_version
|
||||
);
|
||||
ar_impl << boost::serialization::make_nvp(NULL, * t);
|
||||
@ -210,14 +212,14 @@ template<class Archive, class T>
|
||||
pointer_oserializer<Archive, T>::pointer_oserializer() :
|
||||
basic_pointer_oserializer(
|
||||
boost::serialization::singleton<
|
||||
typename
|
||||
typename
|
||||
boost::serialization::type_info_implementation< T >::type
|
||||
>::get_const_instance()
|
||||
)
|
||||
{
|
||||
// make sure appropriate member function is instantiated
|
||||
boost::serialization::singleton<
|
||||
oserializer<Archive, T>
|
||||
oserializer<Archive, T>
|
||||
>::get_mutable_instance().set_bpos(this);
|
||||
archive_serializer_map<Archive>::insert(this);
|
||||
}
|
||||
@ -244,8 +246,8 @@ struct save_non_pointer_type {
|
||||
// make sure call is routed through the highest interface that might
|
||||
// be specialized by the user.
|
||||
boost::serialization::serialize_adl(
|
||||
ar,
|
||||
const_cast<T &>(t),
|
||||
ar,
|
||||
const_cast<T &>(t),
|
||||
::boost::serialization::version< T >::value
|
||||
);
|
||||
}
|
||||
@ -281,7 +283,7 @@ struct save_non_pointer_type {
|
||||
|
||||
template<class T>
|
||||
static void invoke(Archive & ar, const T & t){
|
||||
typedef
|
||||
typedef
|
||||
typename mpl::eval_if<
|
||||
// if its primitive
|
||||
mpl::equal_to<
|
||||
@ -310,7 +312,7 @@ struct save_non_pointer_type {
|
||||
// else
|
||||
// do a fast save only tracking is turned off
|
||||
mpl::identity<save_conditional>
|
||||
> > >::type typex;
|
||||
> > >::type typex;
|
||||
check_object_versioning< T >();
|
||||
typex::invoke(ar, t);
|
||||
}
|
||||
@ -344,15 +346,15 @@ struct save_pointer_type {
|
||||
|
||||
template<class T>
|
||||
static const basic_pointer_oserializer * register_type(Archive &ar, T* const /*t*/){
|
||||
// there should never be any need to save an abstract polymorphic
|
||||
// there should never be any need to save an abstract polymorphic
|
||||
// class pointer. Inhibiting code generation for this
|
||||
// permits abstract base classes to be used - note: exception
|
||||
// virtual serialize functions used for plug-ins
|
||||
typedef
|
||||
typedef
|
||||
typename mpl::eval_if<
|
||||
boost::serialization::is_abstract< T >,
|
||||
mpl::identity<abstract>,
|
||||
mpl::identity<non_abstract>
|
||||
mpl::identity<non_abstract>
|
||||
>::type typex;
|
||||
return typex::template register_type< T >(ar);
|
||||
}
|
||||
@ -361,10 +363,10 @@ struct save_pointer_type {
|
||||
{
|
||||
template<class T>
|
||||
static void save(
|
||||
Archive &ar,
|
||||
Archive &ar,
|
||||
T & t
|
||||
){
|
||||
const basic_pointer_oserializer & bpos =
|
||||
const basic_pointer_oserializer & bpos =
|
||||
boost::serialization::singleton<
|
||||
pointer_oserializer<Archive, T>
|
||||
>::get_const_instance();
|
||||
@ -377,13 +379,13 @@ struct save_pointer_type {
|
||||
{
|
||||
template<class T>
|
||||
static void save(
|
||||
Archive &ar,
|
||||
Archive &ar,
|
||||
T & t
|
||||
){
|
||||
typename
|
||||
typename
|
||||
boost::serialization::type_info_implementation< T >::type const
|
||||
& i = boost::serialization::singleton<
|
||||
typename
|
||||
typename
|
||||
boost::serialization::type_info_implementation< T >::type
|
||||
>::get_const_instance();
|
||||
|
||||
@ -417,8 +419,8 @@ struct save_pointer_type {
|
||||
// convert pointer to more derived type. if this is thrown
|
||||
// it means that the base/derived relationship hasn't be registered
|
||||
vp = serialization::void_downcast(
|
||||
*true_type,
|
||||
*this_type,
|
||||
*true_type,
|
||||
*this_type,
|
||||
static_cast<const void *>(&t)
|
||||
);
|
||||
if(NULL == vp){
|
||||
@ -431,7 +433,7 @@ struct save_pointer_type {
|
||||
);
|
||||
}
|
||||
|
||||
// since true_type is valid, and this only gets made if the
|
||||
// since true_type is valid, and this only gets made if the
|
||||
// pointer oserializer object has been created, this should never
|
||||
// fail
|
||||
const basic_pointer_oserializer * bpos
|
||||
@ -454,7 +456,7 @@ struct save_pointer_type {
|
||||
|
||||
template<class T>
|
||||
static void save(
|
||||
Archive & ar,
|
||||
Archive & ar,
|
||||
const T & t
|
||||
){
|
||||
check_pointer_level< T >();
|
||||
@ -471,7 +473,7 @@ struct save_pointer_type {
|
||||
static void invoke(Archive &ar, const TPtr t){
|
||||
register_type(ar, t);
|
||||
if(NULL == t){
|
||||
basic_oarchive & boa
|
||||
basic_oarchive & boa
|
||||
= boost::serialization::smart_cast_reference<basic_oarchive &>(ar);
|
||||
boa.save_null_pointer();
|
||||
save_access::end_preamble(ar);
|
||||
@ -498,11 +500,11 @@ struct save_array_type
|
||||
template<class T>
|
||||
static void invoke(Archive &ar, const T &t){
|
||||
typedef typename boost::remove_extent< T >::type value_type;
|
||||
|
||||
|
||||
save_access::end_preamble(ar);
|
||||
// consider alignment
|
||||
std::size_t c = sizeof(t) / (
|
||||
static_cast<const char *>(static_cast<const void *>(&t[1]))
|
||||
static_cast<const char *>(static_cast<const void *>(&t[1]))
|
||||
- static_cast<const char *>(static_cast<const void *>(&t[0]))
|
||||
);
|
||||
boost::serialization::collection_size_type count(c);
|
||||
@ -522,7 +524,7 @@ struct save_array_type
|
||||
|
||||
template<class Archive, class T>
|
||||
inline void save(Archive & ar, /*const*/ T &t){
|
||||
typedef
|
||||
typedef
|
||||
typename mpl::eval_if<is_pointer< T >,
|
||||
mpl::identity<detail::save_pointer_type<Archive> >,
|
||||
//else
|
||||
|
@ -56,125 +56,125 @@ class polymorphic_iarchive_route :
|
||||
{
|
||||
private:
|
||||
// these are used by the serialization library.
|
||||
virtual void load_object(
|
||||
void load_object(
|
||||
void *t,
|
||||
const basic_iserializer & bis
|
||||
){
|
||||
) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::load_object(t, bis);
|
||||
}
|
||||
virtual const basic_pointer_iserializer * load_pointer(
|
||||
const basic_pointer_iserializer * load_pointer(
|
||||
void * & t,
|
||||
const basic_pointer_iserializer * bpis_ptr,
|
||||
const basic_pointer_iserializer * (*finder)(
|
||||
const boost::serialization::extended_type_info & type
|
||||
)
|
||||
){
|
||||
) BOOST_OVERRIDE {
|
||||
return ArchiveImplementation::load_pointer(t, bpis_ptr, finder);
|
||||
}
|
||||
virtual void set_library_version(library_version_type archive_library_version){
|
||||
void set_library_version(boost::serialization::library_version_type archive_library_version) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::set_library_version(archive_library_version);
|
||||
}
|
||||
virtual library_version_type get_library_version() const{
|
||||
boost::serialization::library_version_type get_library_version() const BOOST_OVERRIDE {
|
||||
return ArchiveImplementation::get_library_version();
|
||||
}
|
||||
virtual unsigned int get_flags() const {
|
||||
unsigned int get_flags() const BOOST_OVERRIDE {
|
||||
return ArchiveImplementation::get_flags();
|
||||
}
|
||||
virtual void delete_created_pointers(){
|
||||
void delete_created_pointers() BOOST_OVERRIDE {
|
||||
ArchiveImplementation::delete_created_pointers();
|
||||
}
|
||||
virtual void reset_object_address(
|
||||
void reset_object_address(
|
||||
const void * new_address,
|
||||
const void * old_address
|
||||
){
|
||||
) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::reset_object_address(new_address, old_address);
|
||||
}
|
||||
virtual void load_binary(void * t, std::size_t size){
|
||||
void load_binary(void * t, std::size_t size) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::load_binary(t, size);
|
||||
}
|
||||
// primitive types the only ones permitted by polymorphic archives
|
||||
virtual void load(bool & t){
|
||||
void load(bool & t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
virtual void load(char & t){
|
||||
void load(char & t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
virtual void load(signed char & t){
|
||||
void load(signed char & t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
virtual void load(unsigned char & t){
|
||||
void load(unsigned char & t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
#ifndef BOOST_NO_CWCHAR
|
||||
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
|
||||
virtual void load(wchar_t & t){
|
||||
void load(wchar_t & t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
virtual void load(short & t){
|
||||
void load(short & t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
virtual void load(unsigned short & t){
|
||||
void load(unsigned short & t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
virtual void load(int & t){
|
||||
void load(int & t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
virtual void load(unsigned int & t){
|
||||
void load(unsigned int & t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
virtual void load(long & t){
|
||||
void load(long & t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
virtual void load(unsigned long & t){
|
||||
void load(unsigned long & t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
#if defined(BOOST_HAS_LONG_LONG)
|
||||
virtual void load(boost::long_long_type & t){
|
||||
void load(boost::long_long_type & t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
virtual void load(boost::ulong_long_type & t){
|
||||
void load(boost::ulong_long_type & t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
#elif defined(BOOST_HAS_MS_INT64)
|
||||
virtual void load(__int64 & t){
|
||||
void load(__int64 & t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
virtual void load(unsigned __int64 & t){
|
||||
void load(unsigned __int64 & t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
#endif
|
||||
virtual void load(float & t){
|
||||
void load(float & t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
virtual void load(double & t){
|
||||
void load(double & t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
virtual void load(std::string & t){
|
||||
void load(std::string & t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
#ifndef BOOST_NO_STD_WSTRING
|
||||
virtual void load(std::wstring & t){
|
||||
void load(std::wstring & t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::load(t);
|
||||
}
|
||||
#endif
|
||||
// used for xml and other tagged formats default does nothing
|
||||
virtual void load_start(const char * name){
|
||||
void load_start(const char * name) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::load_start(name);
|
||||
}
|
||||
virtual void load_end(const char * name){
|
||||
void load_end(const char * name) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::load_end(name);
|
||||
}
|
||||
virtual void register_basic_serializer(const basic_iserializer & bis){
|
||||
void register_basic_serializer(const basic_iserializer & bis) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::register_basic_serializer(bis);
|
||||
}
|
||||
virtual helper_collection &
|
||||
get_helper_collection(){
|
||||
helper_collection &
|
||||
get_helper_collection() BOOST_OVERRIDE {
|
||||
return ArchiveImplementation::get_helper_collection();
|
||||
}
|
||||
public:
|
||||
// this can't be inheriteded because they appear in mulitple
|
||||
// this can't be inherited because they appear in multiple
|
||||
// parents
|
||||
typedef mpl::bool_<true> is_loading;
|
||||
typedef mpl::bool_<false> is_saving;
|
||||
@ -190,7 +190,7 @@ public:
|
||||
}
|
||||
// register type function
|
||||
template<class T>
|
||||
const basic_pointer_iserializer *
|
||||
const basic_pointer_iserializer *
|
||||
register_type(T * t = NULL){
|
||||
return ArchiveImplementation::register_type(t);
|
||||
}
|
||||
@ -202,7 +202,7 @@ public:
|
||||
) :
|
||||
ArchiveImplementation(is, flags)
|
||||
{}
|
||||
virtual ~polymorphic_iarchive_route(){};
|
||||
~polymorphic_iarchive_route() BOOST_OVERRIDE {}
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
@ -56,116 +56,116 @@ class polymorphic_oarchive_route :
|
||||
{
|
||||
private:
|
||||
// these are used by the serialization library.
|
||||
virtual void save_object(
|
||||
void save_object(
|
||||
const void *x,
|
||||
const detail::basic_oserializer & bos
|
||||
){
|
||||
) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::save_object(x, bos);
|
||||
}
|
||||
virtual void save_pointer(
|
||||
void save_pointer(
|
||||
const void * t,
|
||||
const detail::basic_pointer_oserializer * bpos_ptr
|
||||
){
|
||||
) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::save_pointer(t, bpos_ptr);
|
||||
}
|
||||
virtual void save_null_pointer(){
|
||||
void save_null_pointer() BOOST_OVERRIDE {
|
||||
ArchiveImplementation::save_null_pointer();
|
||||
}
|
||||
// primitive types the only ones permitted by polymorphic archives
|
||||
virtual void save(const bool t){
|
||||
void save(const bool t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
virtual void save(const char t){
|
||||
void save(const char t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
virtual void save(const signed char t){
|
||||
void save(const signed char t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
virtual void save(const unsigned char t){
|
||||
void save(const unsigned char t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
#ifndef BOOST_NO_CWCHAR
|
||||
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
|
||||
virtual void save(const wchar_t t){
|
||||
void save(const wchar_t t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
virtual void save(const short t){
|
||||
void save(const short t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
virtual void save(const unsigned short t){
|
||||
void save(const unsigned short t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
virtual void save(const int t){
|
||||
void save(const int t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
virtual void save(const unsigned int t){
|
||||
void save(const unsigned int t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
virtual void save(const long t){
|
||||
void save(const long t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
virtual void save(const unsigned long t){
|
||||
void save(const unsigned long t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
#if defined(BOOST_HAS_LONG_LONG)
|
||||
virtual void save(const boost::long_long_type t){
|
||||
void save(const boost::long_long_type t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
virtual void save(const boost::ulong_long_type t){
|
||||
void save(const boost::ulong_long_type t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
#elif defined(BOOST_HAS_MS_INT64)
|
||||
virtual void save(const boost::int64_t t){
|
||||
void save(const boost::int64_t t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
virtual void save(const boost::uint64_t t){
|
||||
void save(const boost::uint64_t t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
#endif
|
||||
virtual void save(const float t){
|
||||
void save(const float t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
virtual void save(const double t){
|
||||
void save(const double t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
virtual void save(const std::string & t){
|
||||
void save(const std::string & t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
#ifndef BOOST_NO_STD_WSTRING
|
||||
virtual void save(const std::wstring & t){
|
||||
void save(const std::wstring & t) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::save(t);
|
||||
}
|
||||
#endif
|
||||
virtual library_version_type get_library_version() const{
|
||||
boost::serialization::library_version_type get_library_version() const BOOST_OVERRIDE {
|
||||
return ArchiveImplementation::get_library_version();
|
||||
}
|
||||
virtual unsigned int get_flags() const {
|
||||
unsigned int get_flags() const BOOST_OVERRIDE {
|
||||
return ArchiveImplementation::get_flags();
|
||||
}
|
||||
virtual void save_binary(const void * t, std::size_t size){
|
||||
void save_binary(const void * t, std::size_t size) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::save_binary(t, size);
|
||||
}
|
||||
// used for xml and other tagged formats default does nothing
|
||||
virtual void save_start(const char * name){
|
||||
void save_start(const char * name) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::save_start(name);
|
||||
}
|
||||
virtual void save_end(const char * name){
|
||||
void save_end(const char * name) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::save_end(name);
|
||||
}
|
||||
virtual void end_preamble(){
|
||||
void end_preamble() BOOST_OVERRIDE {
|
||||
ArchiveImplementation::end_preamble();
|
||||
}
|
||||
virtual void register_basic_serializer(const detail::basic_oserializer & bos){
|
||||
void register_basic_serializer(const detail::basic_oserializer & bos) BOOST_OVERRIDE {
|
||||
ArchiveImplementation::register_basic_serializer(bos);
|
||||
}
|
||||
virtual helper_collection &
|
||||
get_helper_collection(){
|
||||
helper_collection &
|
||||
get_helper_collection() BOOST_OVERRIDE {
|
||||
return ArchiveImplementation::get_helper_collection();
|
||||
}
|
||||
public:
|
||||
// this can't be inheriteded because they appear in mulitple
|
||||
// this can't be inherited because they appear in multiple
|
||||
// parents
|
||||
typedef mpl::bool_<false> is_loading;
|
||||
typedef mpl::bool_<true> is_saving;
|
||||
@ -181,7 +181,7 @@ public:
|
||||
}
|
||||
// register type function
|
||||
template<class T>
|
||||
const basic_pointer_oserializer *
|
||||
const basic_pointer_oserializer *
|
||||
register_type(T * t = NULL){
|
||||
return ArchiveImplementation::register_type(t);
|
||||
}
|
||||
@ -193,7 +193,7 @@ public:
|
||||
) :
|
||||
ArchiveImplementation(os, flags)
|
||||
{}
|
||||
virtual ~polymorphic_oarchive_route(){};
|
||||
~polymorphic_oarchive_route() BOOST_OVERRIDE {}
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
@ -4,7 +4,7 @@
|
||||
#ifndef BOOST_ARCHIVE_DETAIL_REGISTER_ARCHIVE_DWA2006521_HPP
|
||||
# define BOOST_ARCHIVE_DETAIL_REGISTER_ARCHIVE_DWA2006521_HPP
|
||||
|
||||
namespace boost { namespace archive { namespace detail {
|
||||
namespace boost { namespace archive { namespace detail {
|
||||
|
||||
// No instantiate_ptr_serialization overloads generated by
|
||||
// BOOST_SERIALIZATION_REGISTER_ARCHIVE that lexically follow the call
|
||||
|
@ -17,7 +17,6 @@
|
||||
#include <boost/archive/detail/decl.hpp>
|
||||
#define BOOST_UTF8_BEGIN_NAMESPACE \
|
||||
namespace boost { namespace archive { namespace detail {
|
||||
#define BOOST_UTF8_DECL BOOST_ARCHIVE_DECL
|
||||
#define BOOST_UTF8_END_NAMESPACE }}}
|
||||
|
||||
#include <boost/detail/utf8_codecvt_facet.hpp>
|
||||
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// dinkumware.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)
|
||||
@ -29,7 +29,7 @@ namespace std {
|
||||
|
||||
// define i/o operators for 64 bit integers
|
||||
template<class CharType>
|
||||
basic_ostream<CharType> &
|
||||
basic_ostream<CharType> &
|
||||
operator<<(basic_ostream<CharType> & os, boost::uint64_t t){
|
||||
// octal rendering of 64 bit number would be 22 octets + eos
|
||||
CharType d[23];
|
||||
@ -66,7 +66,7 @@ operator<<(basic_ostream<CharType> & os, boost::uint64_t t){
|
||||
}
|
||||
|
||||
template<class CharType>
|
||||
basic_ostream<CharType> &
|
||||
basic_ostream<CharType> &
|
||||
operator<<(basic_ostream<CharType> &os, boost::int64_t t){
|
||||
if(0 <= t){
|
||||
os << static_cast<boost::uint64_t>(t);
|
||||
@ -79,7 +79,7 @@ operator<<(basic_ostream<CharType> &os, boost::int64_t t){
|
||||
}
|
||||
|
||||
template<class CharType>
|
||||
basic_istream<CharType> &
|
||||
basic_istream<CharType> &
|
||||
operator>>(basic_istream<CharType> &is, boost::int64_t & t){
|
||||
CharType d;
|
||||
do{
|
||||
@ -119,7 +119,7 @@ operator>>(basic_istream<CharType> &is, boost::int64_t & t){
|
||||
}
|
||||
|
||||
template<class CharType>
|
||||
basic_istream<CharType> &
|
||||
basic_istream<CharType> &
|
||||
operator>>(basic_istream<CharType> &is, boost::uint64_t & t){
|
||||
boost::int64_t it;
|
||||
is >> it;
|
||||
@ -127,10 +127,8 @@ operator>>(basic_istream<CharType> &is, boost::uint64_t & t){
|
||||
return is;
|
||||
}
|
||||
|
||||
//#endif
|
||||
|
||||
template<>
|
||||
class back_insert_iterator<basic_string<char> > : public
|
||||
class back_insert_iterator<basic_string<char> > : public
|
||||
iterator<output_iterator_tag, char>
|
||||
{
|
||||
public:
|
||||
@ -140,7 +138,7 @@ public:
|
||||
explicit back_insert_iterator(container_type & s)
|
||||
: container(& s)
|
||||
{} // construct with container
|
||||
|
||||
|
||||
back_insert_iterator<container_type> & operator=(
|
||||
container_type::const_reference Val_
|
||||
){ // push value into container
|
||||
@ -167,7 +165,7 @@ protected:
|
||||
container_type *container; // pointer to container
|
||||
};
|
||||
|
||||
template<char>
|
||||
template<char>
|
||||
inline back_insert_iterator<basic_string<char> > back_inserter(
|
||||
basic_string<char> & s
|
||||
){
|
||||
@ -175,7 +173,7 @@ inline back_insert_iterator<basic_string<char> > back_inserter(
|
||||
}
|
||||
|
||||
template<>
|
||||
class back_insert_iterator<basic_string<wchar_t> > : public
|
||||
class back_insert_iterator<basic_string<wchar_t> > : public
|
||||
iterator<output_iterator_tag, wchar_t>
|
||||
{
|
||||
public:
|
||||
@ -185,7 +183,7 @@ public:
|
||||
explicit back_insert_iterator(container_type & s)
|
||||
: container(& s)
|
||||
{} // construct with container
|
||||
|
||||
|
||||
back_insert_iterator<container_type> & operator=(
|
||||
container_type::const_reference Val_
|
||||
){ // push value into container
|
||||
@ -212,7 +210,7 @@ protected:
|
||||
container_type *container; // pointer to container
|
||||
};
|
||||
|
||||
template<wchar_t>
|
||||
template<wchar_t>
|
||||
inline back_insert_iterator<basic_string<wchar_t> > back_inserter(
|
||||
basic_string<wchar_t> & s
|
||||
){
|
||||
|
@ -22,7 +22,7 @@ namespace std{
|
||||
#endif
|
||||
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#include <boost/detail/endian.hpp>
|
||||
#include <boost/predef/other/endian.h>
|
||||
|
||||
#include <boost/archive/basic_binary_iarchive.hpp>
|
||||
|
||||
@ -48,7 +48,7 @@ basic_binary_iarchive<Archive>::load_override(class_name_type & t){
|
||||
|
||||
template<class Archive>
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
|
||||
basic_binary_iarchive<Archive>::init(void){
|
||||
basic_binary_iarchive<Archive>::init() {
|
||||
// read signature in an archive version independent manner
|
||||
std::string file_signature;
|
||||
|
||||
@ -84,12 +84,12 @@ basic_binary_iarchive<Archive>::init(void){
|
||||
|
||||
// make sure the version of the reading archive library can
|
||||
// support the format of the archive being read
|
||||
library_version_type input_library_version;
|
||||
boost::serialization::library_version_type input_library_version;
|
||||
//* this->This() >> input_library_version;
|
||||
{
|
||||
int v = 0;
|
||||
v = this->This()->m_sb.sbumpc();
|
||||
#if defined(BOOST_LITTLE_ENDIAN)
|
||||
#if BOOST_ENDIAN_LITTLE_BYTE
|
||||
if(v < 6){
|
||||
;
|
||||
}
|
||||
@ -111,11 +111,11 @@ basic_binary_iarchive<Archive>::init(void){
|
||||
// version 8+ followed by a zero
|
||||
this->This()->m_sb.sbumpc();
|
||||
}
|
||||
#elif defined(BOOST_BIG_ENDIAN)
|
||||
#elif BOOST_ENDIAN_BIG_BYTE
|
||||
if(v == 0)
|
||||
v = this->This()->m_sb.sbumpc();
|
||||
#endif
|
||||
input_library_version = static_cast<library_version_type>(v);
|
||||
input_library_version = static_cast<boost::serialization::library_version_type>(v);
|
||||
}
|
||||
|
||||
#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205))
|
||||
|
@ -34,7 +34,7 @@ basic_binary_oarchive<Archive>::init(){
|
||||
const std::string file_signature(BOOST_ARCHIVE_SIGNATURE());
|
||||
* this->This() << file_signature;
|
||||
// write library version
|
||||
const library_version_type v(BOOST_ARCHIVE_VERSION());
|
||||
const boost::serialization::library_version_type v(BOOST_ARCHIVE_VERSION());
|
||||
* this->This() << v;
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ basic_text_iarchive<Archive>::load_override(class_name_type & t){
|
||||
|
||||
template<class Archive>
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
|
||||
basic_text_iarchive<Archive>::init(void){
|
||||
basic_text_iarchive<Archive>::init() {
|
||||
// read signature in an archive version independent manner
|
||||
std::string file_signature;
|
||||
* this->This() >> file_signature;
|
||||
@ -56,7 +56,7 @@ basic_text_iarchive<Archive>::init(void){
|
||||
|
||||
// make sure the version of the reading archive library can
|
||||
// support the format of the archive being read
|
||||
library_version_type input_library_version;
|
||||
boost::serialization::library_version_type input_library_version;
|
||||
* this->This() >> input_library_version;
|
||||
|
||||
#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205))
|
||||
|
@ -112,8 +112,8 @@ basic_text_iprimitive<IStream>::basic_text_iprimitive(
|
||||
) :
|
||||
is(is_),
|
||||
flags_saver(is_),
|
||||
precision_saver(is_),
|
||||
#ifndef BOOST_NO_STD_LOCALE
|
||||
precision_saver(is_),
|
||||
codecvt_null_facet(1),
|
||||
archive_locale(is.getloc(), & codecvt_null_facet),
|
||||
locale_saver(is)
|
||||
@ -125,6 +125,7 @@ basic_text_iprimitive<IStream>::basic_text_iprimitive(
|
||||
is_ >> std::noboolalpha;
|
||||
}
|
||||
#else
|
||||
precision_saver(is_)
|
||||
{}
|
||||
#endif
|
||||
|
||||
|
@ -54,7 +54,7 @@ basic_text_oarchive<Archive>::init(){
|
||||
const std::string file_signature(BOOST_ARCHIVE_SIGNATURE());
|
||||
* this->This() << file_signature;
|
||||
// write library version
|
||||
const library_version_type v(BOOST_ARCHIVE_VERSION());
|
||||
const boost::serialization::library_version_type v(BOOST_ARCHIVE_VERSION());
|
||||
* this->This() << v;
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,6 @@
|
||||
|
||||
#include <cstddef> // NULL
|
||||
#include <algorithm> // std::copy
|
||||
#include <exception> // std::uncaught_exception
|
||||
#include <boost/config.hpp>
|
||||
#if defined(BOOST_NO_STDC_NAMESPACE)
|
||||
namespace std{
|
||||
@ -18,6 +17,8 @@ namespace std{
|
||||
} // namespace std
|
||||
#endif
|
||||
|
||||
#include <boost/core/uncaught_exceptions.hpp>
|
||||
|
||||
#include <boost/archive/basic_text_oprimitive.hpp>
|
||||
|
||||
#include <boost/archive/iterators/base64_from_binary.hpp>
|
||||
@ -86,8 +87,8 @@ basic_text_oprimitive<OStream>::basic_text_oprimitive(
|
||||
) :
|
||||
os(os_),
|
||||
flags_saver(os_),
|
||||
precision_saver(os_),
|
||||
#ifndef BOOST_NO_STD_LOCALE
|
||||
precision_saver(os_),
|
||||
codecvt_null_facet(1),
|
||||
archive_locale(os.getloc(), & codecvt_null_facet),
|
||||
locale_saver(os)
|
||||
@ -99,6 +100,7 @@ basic_text_oprimitive<OStream>::basic_text_oprimitive(
|
||||
os_ << std::noboolalpha;
|
||||
}
|
||||
#else
|
||||
precision_saver(os_)
|
||||
{}
|
||||
#endif
|
||||
|
||||
@ -106,7 +108,7 @@ basic_text_oprimitive<OStream>::basic_text_oprimitive(
|
||||
template<class OStream>
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL
|
||||
basic_text_oprimitive<OStream>::~basic_text_oprimitive(){
|
||||
if(std::uncaught_exception())
|
||||
if(boost::core::uncaught_exceptions() > 0)
|
||||
return;
|
||||
os << std::endl;
|
||||
}
|
||||
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// basic_xml_grammar.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)
|
||||
@ -70,7 +70,7 @@ public:
|
||||
// one compiler (Compaq C++ 6.5 in strict_ansi mode) chokes otherwise.
|
||||
struct return_values;
|
||||
friend struct return_values;
|
||||
|
||||
|
||||
private:
|
||||
typedef typename std::basic_istream<CharType> IStream;
|
||||
typedef typename std::basic_string<CharType> StringType;
|
||||
@ -81,16 +81,16 @@ private:
|
||||
> scanner_t;
|
||||
typedef typename boost::spirit::classic::rule<scanner_t> rule_t;
|
||||
// Start grammar definition
|
||||
rule_t
|
||||
rule_t
|
||||
Reference,
|
||||
Eq,
|
||||
Eq,
|
||||
STag,
|
||||
ETag,
|
||||
LetterOrUnderscoreOrColon,
|
||||
AttValue,
|
||||
CharRef1,
|
||||
CharRef2,
|
||||
CharRef,
|
||||
AttValue,
|
||||
CharRef1,
|
||||
CharRef2,
|
||||
CharRef,
|
||||
AmpRef,
|
||||
LTRef,
|
||||
GTRef,
|
||||
@ -127,11 +127,11 @@ private:
|
||||
chset_t
|
||||
BaseChar,
|
||||
Ideographic,
|
||||
Char,
|
||||
Letter,
|
||||
Char,
|
||||
Letter,
|
||||
Digit,
|
||||
CombiningChar,
|
||||
Extender,
|
||||
Extender,
|
||||
Sch,
|
||||
NameChar;
|
||||
|
||||
@ -139,7 +139,7 @@ private:
|
||||
|
||||
bool my_parse(
|
||||
IStream & is,
|
||||
const rule_t &rule_,
|
||||
const rule_t &rule_,
|
||||
const CharType delimiter = L'>'
|
||||
) const ;
|
||||
public:
|
||||
|
@ -37,7 +37,6 @@ basic_xml_iarchive<Archive>::load_start(const char *name){
|
||||
}
|
||||
// don't check start tag at highest level
|
||||
++depth;
|
||||
return;
|
||||
}
|
||||
|
||||
template<class Archive>
|
||||
|
@ -115,14 +115,7 @@ text_iarchive_impl<Archive>::text_iarchive_impl(
|
||||
0 != (flags & no_codecvt)
|
||||
),
|
||||
basic_text_iarchive<Archive>(flags)
|
||||
{
|
||||
if(0 == (flags & no_header))
|
||||
#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205))
|
||||
this->init();
|
||||
#else
|
||||
this->basic_text_iarchive<Archive>::init();
|
||||
#endif
|
||||
}
|
||||
{}
|
||||
|
||||
} // namespace archive
|
||||
} // namespace boost
|
||||
|
@ -93,12 +93,6 @@ text_oarchive_impl<Archive>::text_oarchive_impl(
|
||||
),
|
||||
basic_text_oarchive<Archive>(flags)
|
||||
{
|
||||
if(0 == (flags & no_header))
|
||||
#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205))
|
||||
this->init();
|
||||
#else
|
||||
this->basic_text_oarchive<Archive>::init();
|
||||
#endif
|
||||
}
|
||||
|
||||
template<class Archive>
|
||||
|
@ -108,8 +108,6 @@ text_wiarchive_impl<Archive>::text_wiarchive_impl(
|
||||
),
|
||||
basic_text_iarchive<Archive>(flags)
|
||||
{
|
||||
if(0 == (flags & no_header))
|
||||
basic_text_iarchive<Archive>::init();
|
||||
}
|
||||
|
||||
} // archive
|
||||
|
@ -11,7 +11,6 @@
|
||||
#include <boost/config.hpp>
|
||||
#include <cstring> // memcpy
|
||||
#include <cstddef> // NULL
|
||||
#include <exception>
|
||||
|
||||
#if defined(BOOST_NO_STDC_NAMESPACE)
|
||||
namespace std{
|
||||
@ -34,6 +33,7 @@ namespace std{
|
||||
#include <boost/archive/dinkumware.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/core/uncaught_exceptions.hpp>
|
||||
#include <boost/core/no_exceptions_support.hpp>
|
||||
|
||||
#include <boost/archive/xml_archive_exception.hpp>
|
||||
@ -165,7 +165,7 @@ BOOST_ARCHIVE_DECL void
|
||||
xml_iarchive_impl<Archive>::init(){
|
||||
gimpl->init(is);
|
||||
this->set_library_version(
|
||||
library_version_type(gimpl->rv.version)
|
||||
boost::serialization::library_version_type(gimpl->rv.version)
|
||||
);
|
||||
}
|
||||
|
||||
@ -181,15 +181,12 @@ xml_iarchive_impl<Archive>::xml_iarchive_impl(
|
||||
),
|
||||
basic_xml_iarchive<Archive>(flags),
|
||||
gimpl(new xml_grammar())
|
||||
{
|
||||
if(0 == (flags & no_header))
|
||||
init();
|
||||
}
|
||||
{}
|
||||
|
||||
template<class Archive>
|
||||
BOOST_ARCHIVE_DECL
|
||||
xml_iarchive_impl<Archive>::~xml_iarchive_impl(){
|
||||
if(std::uncaught_exception())
|
||||
if(boost::core::uncaught_exceptions() > 0)
|
||||
return;
|
||||
if(0 == (this->get_flags() & no_header)){
|
||||
gimpl->windup(is);
|
||||
|
@ -10,7 +10,6 @@
|
||||
#include <iomanip>
|
||||
#include <algorithm> // std::copy
|
||||
#include <string>
|
||||
#include <exception>
|
||||
|
||||
#include <cstring> // strlen
|
||||
#include <boost/config.hpp> // msvc 6.0 needs this to suppress warnings
|
||||
@ -20,6 +19,7 @@ namespace std{
|
||||
} // namespace std
|
||||
#endif
|
||||
|
||||
#include <boost/core/uncaught_exceptions.hpp>
|
||||
#include <boost/archive/iterators/xml_escape.hpp>
|
||||
#include <boost/archive/iterators/ostream_iterator.hpp>
|
||||
|
||||
@ -109,10 +109,7 @@ xml_oarchive_impl<Archive>::xml_oarchive_impl(
|
||||
0 != (flags & no_codecvt)
|
||||
),
|
||||
basic_xml_oarchive<Archive>(flags)
|
||||
{
|
||||
if(0 == (flags & no_header))
|
||||
this->init();
|
||||
}
|
||||
{}
|
||||
|
||||
template<class Archive>
|
||||
BOOST_ARCHIVE_DECL void
|
||||
@ -132,7 +129,7 @@ xml_oarchive_impl<Archive>::save_binary(const void *address, std::size_t count){
|
||||
template<class Archive>
|
||||
BOOST_ARCHIVE_DECL
|
||||
xml_oarchive_impl<Archive>::~xml_oarchive_impl(){
|
||||
if(std::uncaught_exception())
|
||||
if(boost::core::uncaught_exceptions() > 0)
|
||||
return;
|
||||
if(0 == (this->get_flags() & no_header))
|
||||
this->windup();
|
||||
|
@ -20,13 +20,13 @@ namespace std{
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <algorithm> // std::copy
|
||||
#include <exception> // uncaught exception
|
||||
#include <boost/detail/workaround.hpp> // Dinkumware and RogueWave
|
||||
#if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1)
|
||||
#include <boost/archive/dinkumware.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/io/ios_state.hpp>
|
||||
#include <boost/core/uncaught_exceptions.hpp>
|
||||
#include <boost/core/no_exceptions_support.hpp>
|
||||
#include <boost/serialization/string.hpp>
|
||||
|
||||
@ -143,7 +143,7 @@ BOOST_WARCHIVE_DECL void
|
||||
xml_wiarchive_impl<Archive>::init(){
|
||||
gimpl->init(is);
|
||||
this->set_library_version(
|
||||
library_version_type(gimpl->rv.version)
|
||||
boost::serialization::library_version_type(gimpl->rv.version)
|
||||
);
|
||||
}
|
||||
|
||||
@ -169,14 +169,12 @@ xml_wiarchive_impl<Archive>::xml_wiarchive_impl(
|
||||
is_.sync();
|
||||
is_.imbue(archive_locale);
|
||||
}
|
||||
if(0 == (flags & no_header))
|
||||
init();
|
||||
}
|
||||
|
||||
template<class Archive>
|
||||
BOOST_WARCHIVE_DECL
|
||||
xml_wiarchive_impl<Archive>::~xml_wiarchive_impl(){
|
||||
if(std::uncaught_exception())
|
||||
if(boost::core::uncaught_exceptions() > 0)
|
||||
return;
|
||||
if(0 == (this->get_flags() & no_header)){
|
||||
gimpl->windup(is);
|
||||
|
@ -13,7 +13,6 @@
|
||||
#include <string>
|
||||
#include <algorithm> // std::copy
|
||||
#include <locale>
|
||||
#include <exception>
|
||||
|
||||
#include <cstring> // strlen
|
||||
#include <cstdlib> // mbtowc
|
||||
@ -32,6 +31,8 @@ namespace std{
|
||||
} // namespace std
|
||||
#endif
|
||||
|
||||
#include <boost/core/uncaught_exceptions.hpp>
|
||||
|
||||
#include <boost/archive/xml_woarchive.hpp>
|
||||
#include <boost/archive/detail/utf8_codecvt_facet.hpp>
|
||||
|
||||
@ -132,14 +133,12 @@ xml_woarchive_impl<Archive>::xml_woarchive_impl(
|
||||
os_.flush();
|
||||
os_.imbue(archive_locale);
|
||||
}
|
||||
if(0 == (flags & no_header))
|
||||
this->init();
|
||||
}
|
||||
|
||||
template<class Archive>
|
||||
BOOST_WARCHIVE_DECL
|
||||
xml_woarchive_impl<Archive>::~xml_woarchive_impl(){
|
||||
if(std::uncaught_exception())
|
||||
if(boost::core::uncaught_exceptions() > 0)
|
||||
return;
|
||||
if(0 == (this->get_flags() & no_header)){
|
||||
os << L"</boost_serialization>";
|
||||
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// base64_from_binary.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,15 +20,15 @@
|
||||
|
||||
#include <cstddef> // size_t
|
||||
#if defined(BOOST_NO_STDC_NAMESPACE)
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
namespace std{
|
||||
using ::size_t;
|
||||
} // namespace std
|
||||
#endif
|
||||
|
||||
#include <boost/iterator/transform_iterator.hpp>
|
||||
#include <boost/archive/iterators/dataflow_exception.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace archive {
|
||||
namespace iterators {
|
||||
|
||||
@ -68,10 +68,10 @@ struct from_6_bit {
|
||||
|
||||
//template<class Base, class CharType = typename Base::value_type>
|
||||
template<
|
||||
class Base,
|
||||
class Base,
|
||||
class CharType = typename boost::iterator_value<Base>::type
|
||||
>
|
||||
class base64_from_binary :
|
||||
class base64_from_binary :
|
||||
public transform_iterator<
|
||||
detail::from_6_bit<CharType>,
|
||||
Base
|
||||
@ -93,7 +93,7 @@ public:
|
||||
)
|
||||
{}
|
||||
// intel 7.1 doesn't like default copy constructor
|
||||
base64_from_binary(const base64_from_binary & rhs) :
|
||||
base64_from_binary(const base64_from_binary & rhs) :
|
||||
super_t(
|
||||
Base(rhs.base_reference()),
|
||||
detail::from_6_bit<CharType>()
|
||||
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// binary_from_base64.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,7 +24,7 @@
|
||||
#include <boost/iterator/transform_iterator.hpp>
|
||||
#include <boost/archive/iterators/dataflow_exception.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace archive {
|
||||
namespace iterators {
|
||||
|
||||
@ -78,7 +78,7 @@ struct to_6_bit {
|
||||
// ideal. This is also addressed here.
|
||||
|
||||
template<
|
||||
class Base,
|
||||
class Base,
|
||||
class CharType = typename boost::iterator_value<Base>::type
|
||||
>
|
||||
class binary_from_base64 : public
|
||||
@ -102,7 +102,7 @@ public:
|
||||
)
|
||||
{}
|
||||
// intel 7.1 doesn't like default copy constructor
|
||||
binary_from_base64(const binary_from_base64 & rhs) :
|
||||
binary_from_base64(const binary_from_base64 & rhs) :
|
||||
super_t(
|
||||
Base(rhs.base_reference()),
|
||||
detail::to_6_bit<CharType>()
|
||||
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// dataflow_exception.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)
|
||||
@ -46,7 +46,7 @@ public:
|
||||
dataflow_exception(exception_code c = other_exception) : code(c)
|
||||
{}
|
||||
|
||||
virtual const char *what( ) const throw( )
|
||||
const char *what( ) const throw( ) BOOST_OVERRIDE
|
||||
{
|
||||
const char *msg = "unknown exception code";
|
||||
switch(code){
|
||||
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// escape.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,7 +22,7 @@
|
||||
#include <boost/iterator/iterator_adaptor.hpp>
|
||||
#include <boost/iterator/iterator_traits.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace archive {
|
||||
namespace iterators {
|
||||
|
||||
@ -30,10 +30,10 @@ namespace iterators {
|
||||
// insert escapes into text
|
||||
|
||||
template<class Derived, class Base>
|
||||
class escape :
|
||||
class escape :
|
||||
public boost::iterator_adaptor<
|
||||
Derived,
|
||||
Base,
|
||||
Derived,
|
||||
Base,
|
||||
typename boost::iterator_value<Base>::type,
|
||||
single_pass_traversal_tag,
|
||||
typename boost::iterator_value<Base>::type
|
||||
@ -44,8 +44,8 @@ class escape :
|
||||
friend class boost::iterator_core_access;
|
||||
|
||||
typedef typename boost::iterator_adaptor<
|
||||
Derived,
|
||||
Base,
|
||||
Derived,
|
||||
Base,
|
||||
base_value_type,
|
||||
single_pass_traversal_tag,
|
||||
base_value_type
|
||||
@ -58,7 +58,7 @@ class escape :
|
||||
m_full = true;
|
||||
}
|
||||
|
||||
//Access the value referred to
|
||||
//Access the value referred to
|
||||
reference_type dereference() const {
|
||||
if(!m_full)
|
||||
const_cast<this_t *>(this)->dereference_impl();
|
||||
@ -98,7 +98,7 @@ class escape :
|
||||
bool m_full;
|
||||
base_value_type m_current_value;
|
||||
public:
|
||||
escape(Base base) :
|
||||
escape(Base base) :
|
||||
super_t(base),
|
||||
m_bnext(NULL),
|
||||
m_bend(NULL),
|
||||
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// insert_linebreaks.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)
|
||||
@ -26,18 +26,18 @@ namespace std{ using ::memcpy; }
|
||||
#include <boost/iterator/iterator_adaptor.hpp>
|
||||
#include <boost/iterator/iterator_traits.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace archive {
|
||||
namespace iterators {
|
||||
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// insert line break every N characters
|
||||
template<
|
||||
class Base,
|
||||
int N,
|
||||
class Base,
|
||||
int N,
|
||||
class CharType = typename boost::iterator_value<Base>::type
|
||||
>
|
||||
class insert_linebreaks :
|
||||
class insert_linebreaks :
|
||||
public iterator_adaptor<
|
||||
insert_linebreaks<Base, N, CharType>,
|
||||
Base,
|
||||
@ -86,7 +86,7 @@ public:
|
||||
m_count(0)
|
||||
{}
|
||||
// intel 7.1 doesn't like default copy constructor
|
||||
insert_linebreaks(const insert_linebreaks & rhs) :
|
||||
insert_linebreaks(const insert_linebreaks & rhs) :
|
||||
super_t(rhs.base_reference()),
|
||||
m_count(rhs.m_count)
|
||||
{}
|
||||
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// istream_iterator.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,13 +25,13 @@
|
||||
#include <istream>
|
||||
#include <boost/iterator/iterator_facade.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace archive {
|
||||
namespace iterators {
|
||||
|
||||
// given a type, make an input iterator based on a pointer to that type
|
||||
template<class Elem = char>
|
||||
class istream_iterator :
|
||||
class istream_iterator :
|
||||
public boost::iterator_facade<
|
||||
istream_iterator<Elem>,
|
||||
Elem,
|
||||
@ -48,13 +48,13 @@ class istream_iterator :
|
||||
Elem
|
||||
> super_t;
|
||||
typedef typename std::basic_istream<Elem> istream_type;
|
||||
|
||||
|
||||
bool equal(const this_t & rhs) const {
|
||||
// note: only works for comparison against end of stream
|
||||
return m_istream == rhs.m_istream;
|
||||
}
|
||||
|
||||
//Access the value referred to
|
||||
//Access the value referred to
|
||||
Elem dereference() const {
|
||||
return static_cast<Elem>(m_istream->peek());
|
||||
}
|
||||
|
@ -9,7 +9,7 @@
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// mb_from_wchar.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,7 @@
|
||||
#endif
|
||||
#include <boost/config.hpp>
|
||||
#if defined(BOOST_NO_STDC_NAMESPACE)
|
||||
namespace std{
|
||||
namespace std{
|
||||
using ::mbstate_t;
|
||||
} // namespace std
|
||||
#endif
|
||||
@ -31,7 +31,7 @@ namespace std{
|
||||
#include <boost/archive/detail/utf8_codecvt_facet.hpp>
|
||||
#include <boost/iterator/iterator_adaptor.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace boost {
|
||||
namespace archive {
|
||||
namespace iterators {
|
||||
|
||||
@ -41,8 +41,8 @@ namespace iterators {
|
||||
template<class Base> // the input iterator
|
||||
class mb_from_wchar
|
||||
: public boost::iterator_adaptor<
|
||||
mb_from_wchar<Base>,
|
||||
Base,
|
||||
mb_from_wchar<Base>,
|
||||
Base,
|
||||
wchar_t,
|
||||
single_pass_traversal_tag,
|
||||
char
|
||||
@ -51,8 +51,8 @@ class mb_from_wchar
|
||||
friend class boost::iterator_core_access;
|
||||
|
||||
typedef typename boost::iterator_adaptor<
|
||||
mb_from_wchar<Base>,
|
||||
Base,
|
||||
mb_from_wchar<Base>,
|
||||
Base,
|
||||
wchar_t,
|
||||
single_pass_traversal_tag,
|
||||
char
|
||||
@ -75,7 +75,7 @@ class mb_from_wchar
|
||||
bool equal(const mb_from_wchar<Base> & rhs) const {
|
||||
// once the value is filled, the base_reference has been incremented
|
||||
// so don't permit comparison anymore.
|
||||
return
|
||||
return
|
||||
0 == m_bend
|
||||
&& 0 == m_bnext
|
||||
&& this->base_reference() == rhs.base_reference()
|
||||
@ -102,7 +102,7 @@ class mb_from_wchar
|
||||
void increment(){
|
||||
if(++m_bnext < m_bend)
|
||||
return;
|
||||
m_bend =
|
||||
m_bend =
|
||||
m_bnext = 0;
|
||||
++(this->base_reference());
|
||||
m_full = false;
|
||||
@ -127,7 +127,7 @@ public:
|
||||
m_full(false)
|
||||
{}
|
||||
// intel 7.1 doesn't like default copy constructor
|
||||
mb_from_wchar(const mb_from_wchar & rhs) :
|
||||
mb_from_wchar(const mb_from_wchar & rhs) :
|
||||
super_t(rhs.base_reference()),
|
||||
m_bend(rhs.m_bend),
|
||||
m_bnext(rhs.m_bnext),
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user