Commit 387d0c4e authored by Dick Hollenbeck's avatar Dick Hollenbeck

*) Refinements to ExternalProject_Add( boost )

*) Enhancements to make_lexer().
*) Support multi-threaded build.
*) Switch to "bzr patch" from patch.exe for Windows users.
parents a23dcccc 70b8e6b6

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

include/boost
downloads-by-cmake
common/netlist_keywords.* common/netlist_keywords.*
common/netlist_lexer.h common/netlist_lexer.h
common/pcb_plot_params_lexer.h common/pcb_plot_params_lexer.h
...@@ -12,7 +14,6 @@ pcbnew/dialogs/dialog_freeroute_exchange_help_html.h ...@@ -12,7 +14,6 @@ pcbnew/dialogs/dialog_freeroute_exchange_help_html.h
pcbnew/pcb_plot_params_keywords.cpp pcbnew/pcb_plot_params_keywords.cpp
pcbnew/pcb_plot_params_lexer.h pcbnew/pcb_plot_params_lexer.h
Makefile Makefile
CMakeFiles
CMakeCache.txt CMakeCache.txt
auto_renamed_to_cpp auto_renamed_to_cpp
Testing Testing
...@@ -20,7 +21,6 @@ version.h ...@@ -20,7 +21,6 @@ version.h
config.h config.h
install_manifest.txt install_manifest.txt
Documentation/doxygen Documentation/doxygen
*.cmake
*.bak *.bak
common/pcb_plot_params_keywords.cpp common/pcb_plot_params_keywords.cpp
include/pcb_plot_params_lexer.h include/pcb_plot_params_lexer.h
......
project(kicad) project(kicad)
# The minimum CMake version requirement could be different under unix, OSX, or Windows cmake_minimum_required(VERSION 2.8.4 FATAL_ERROR)
if(WIN32) # because of http://public.kitware.com/Bug/view.php?id=10395
cmake_minimum_required(VERSION 2.8.0 FATAL_ERROR) # win32 and win64
elseif(APPLE)
cmake_minimum_required(VERSION 2.8.0 FATAL_ERROR) # OSX
else()
cmake_minimum_required(VERSION 2.6.4 FATAL_ERROR) # Linux, Unix, and everything else.
endif()
# Path to local CMake modules. # Path to local CMake modules.
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules) set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules)
...@@ -243,6 +237,12 @@ mark_as_advanced(KICAD_BIN ...@@ -243,6 +237,12 @@ mark_as_advanced(KICAD_BIN
include(Functions) include(Functions)
include( ExternalProject )
# All CMake downloads go here, up in the source tree, not in the build dir where they
# would have to be downloaded over and over again.
set( DOWNLOAD_DIR ${PROJECT_SOURCE_DIR}/downloads-by-cmake )
#================================================ #================================================
# Find libraries that are needed to build KiCad. # Find libraries that are needed to build KiCad.
#================================================ #================================================
...@@ -254,14 +254,11 @@ include(CheckFindPackageResult) ...@@ -254,14 +254,11 @@ include(CheckFindPackageResult)
find_package(OpenGL QUIET) find_package(OpenGL QUIET)
check_find_package_result(OPENGL_FOUND "OpenGL") check_find_package_result(OPENGL_FOUND "OpenGL")
###################### ##########################
# Find Boost library # # Download Boost library #
###################### ##########################
# kicad now includes needed boost files. include( download_boost )
# the two next lines can be uncommented to use the native boost lib.
# but this is not a good idea
#find_package(Boost 1.36 QUIET)
#check_find_package_result(Boost_FOUND "Boost")
########################## ##########################
# Find wxWidgets library # # Find wxWidgets library #
...@@ -356,9 +353,9 @@ set(INC_AFTER ...@@ -356,9 +353,9 @@ set(INC_AFTER
# 'CMakeLists.txt' files to process # 'CMakeLists.txt' files to process
#================================================ #================================================
############ ############################
# Binaries # # Binaries (CMake targets) #
############ ############################
add_subdirectory(bitmaps_png) add_subdirectory(bitmaps_png)
add_subdirectory(common) add_subdirectory(common)
...@@ -377,6 +374,18 @@ add_subdirectory(tools) ...@@ -377,6 +374,18 @@ add_subdirectory(tools)
#add_subdirectory(new) #add_subdirectory(new)
# Make all libs and executables depend on ExternalProject_Add( boost ),
# except perhaps bitmap lib
add_dependencies( pcbnew boost )
add_dependencies( eeschema boost )
add_dependencies( cvpcb boost )
add_dependencies( common boost )
add_dependencies( pcbcommon boost )
add_dependencies( 3d-viewer boost )
add_dependencies( pcad2kicadpcb boost )
add_dependencies( polygon boost )
############# #############
# Resources # # Resources #
############# #############
......
...@@ -23,7 +23,10 @@ ...@@ -23,7 +23,10 @@
# Function make_lexer # Function make_lexer
# is a standard way to invoke TokenList2DsnLexer.cmake # is a standard way to invoke TokenList2DsnLexer.cmake.
# Extra arguments are treated as source files which depend on the generated
# outHeaderFile
function( make_lexer inputFile outHeaderFile outCppFile enum ) function( make_lexer inputFile outHeaderFile outCppFile enum )
add_custom_command( add_custom_command(
OUTPUT ${outHeaderFile} OUTPUT ${outHeaderFile}
...@@ -41,5 +44,14 @@ function( make_lexer inputFile outHeaderFile outCppFile enum ) ...@@ -41,5 +44,14 @@ function( make_lexer inputFile outHeaderFile outCppFile enum )
${outCppFile} from ${outCppFile} from
${inputFile}" ${inputFile}"
) )
# extra_args, if any, are treated as source files (typically headers) which
# are known to depend on the generated outHeader.
foreach( extra_arg ${ARGN} )
set_source_files_properties( ${extra_arg}
PROPERTIES OBJECT_DEPENDS ${outHeaderFile}
)
endforeach()
endfunction() endfunction()
# This program source code file is part of KICAD, a free EDA CAD application.
#
# Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
# Copyright (C) 2013 Kicad Developers, see AUTHORS.txt for contributors.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, you may find one here:
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# or you may search the http://www.gnu.org website for the version 2 license,
# or you may write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
# Download and patch boost headers to a particular version.
# Assumes include( ExternalProject ) was done inline previous to this file.
set( BOOST_RELEASE 1.53.0 )
set( BOOST_MD5 a00d22605d5dbcfb4c9936a9b35bc4c2 ) # re-calc this on every RELEASE change
string( REGEX REPLACE "\\." "_" BOOST_VERS "${BOOST_RELEASE}" )
set( PREFIX ${DOWNLOAD_DIR}/boost_${BOOST_VERS} )
ExternalProject_Add( boost
PREFIX ${PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL http://downloads.sourceforge.net/project/boost/boost/${BOOST_RELEASE}/boost_${BOOST_VERS}.tar.bz2
URL_MD5 ${BOOST_MD5}
# The patch command executes with the working directory set to <SOURCE_DIR>
PATCH_COMMAND bzr patch -p0 ${PROJECT_SOURCE_DIR}/patches/boost.patch
CONFIGURE_COMMAND ""
# remove then re-copy into the include/boost directory during next two steps:
BUILD_COMMAND ${CMAKE_COMMAND} -E remove_directory ${PROJECT_SOURCE_DIR}/include/boost
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR>/boost ${PROJECT_SOURCE_DIR}/include/boost
)
# <SOURCE_DIR> = ${PREFIX}/src/boost
# Add extra steps, so that we can easily regenerate any boost patch needed for the above.
# There is a Bazaar 'boost scratch repo' in <SOURCE_DIR> and after committing pristine
# download, the patch is applied. This lets you regenerate a new patch at any time
# easily, simply by editing the working tree in <SOURCE_DIR> and doing "bzr diff" in there.
ExternalProject_Add_Step( boost bzr_commit_boost
COMMAND bzr ci -q -m pristine <SOURCE_DIR>
COMMENT "committing pristine boost files to 'boost scratch repo'"
DEPENDERS patch
)
ExternalProject_Add_Step( boost bzr_add_boost
COMMAND bzr add -q <SOURCE_DIR>
COMMENT "adding pristine boost files to 'boost scratch repo'"
DEPENDERS bzr_commit_boost
)
ExternalProject_Add_Step( boost bzr_init_boost
COMMAND bzr init -q <SOURCE_DIR>
COMMENT "creating 'boost scratch repo' specifically for boost to track boost patches"
DEPENDERS bzr_add_boost
DEPENDEES download
)
...@@ -753,4 +753,3 @@ endforeach() ...@@ -753,4 +753,3 @@ endforeach()
#add_library( bitmaps SHARED ${CPP_LIST} ) #add_library( bitmaps SHARED ${CPP_LIST} )
add_library( bitmaps STATIC ${CPP_LIST} ) add_library( bitmaps STATIC ${CPP_LIST} )
...@@ -150,13 +150,15 @@ set_source_files_properties( ${PCB_COMMON_SRCS} PROPERTIES ...@@ -150,13 +150,15 @@ set_source_files_properties( ${PCB_COMMON_SRCS} PROPERTIES
add_library(pcbcommon STATIC ${PCB_COMMON_SRCS}) add_library(pcbcommon STATIC ${PCB_COMMON_SRCS})
# auto-generate netlist_lexer.h and netlist_keywords.cpp # auto-generate netlist_lexer.h and netlist_keywords.cpp
make_lexer( make_lexer(
${CMAKE_CURRENT_SOURCE_DIR}/netlist.keywords ${CMAKE_CURRENT_SOURCE_DIR}/netlist.keywords
${PROJECT_SOURCE_DIR}/include/netlist_lexer.h ${PROJECT_SOURCE_DIR}/include/netlist_lexer.h
${CMAKE_CURRENT_SOURCE_DIR}/netlist_keywords.cpp ${CMAKE_CURRENT_SOURCE_DIR}/netlist_keywords.cpp
NL_T NL_T
# Pass header file with dependency on *_lexer.h as extra_arg
${CMAKE_PROJECT_SOURCE_DIR}/pcbnew/netlist_reader.h
) )
# auto-generate pcb_plot_params_lexer.h and pcb_plot_params_keywords.cpp # auto-generate pcb_plot_params_lexer.h and pcb_plot_params_keywords.cpp
...@@ -165,17 +167,25 @@ make_lexer( ...@@ -165,17 +167,25 @@ make_lexer(
${PROJECT_SOURCE_DIR}/include/pcb_plot_params_lexer.h ${PROJECT_SOURCE_DIR}/include/pcb_plot_params_lexer.h
${CMAKE_CURRENT_SOURCE_DIR}/pcb_plot_params_keywords.cpp ${CMAKE_CURRENT_SOURCE_DIR}/pcb_plot_params_keywords.cpp
PCBPLOTPARAMS_T PCBPLOTPARAMS_T
# Pass header file with dependency on *_lexer.h as extra_arg
${PROJECT_SOURCE_DIR}/pcbnew/pcb_plot_params.h
) )
# auto-generate pcbnew_sexpr.h and pcbnew_sexpr.cpp # auto-generate pcbnew_sexpr.h and pcbnew_sexpr.cpp
make_lexer( ${CMAKE_CURRENT_SOURCE_DIR}/pcb.keywords make_lexer(
${CMAKE_CURRENT_SOURCE_DIR}/pcb.keywords
${PROJECT_SOURCE_DIR}/include/pcb_lexer.h ${PROJECT_SOURCE_DIR}/include/pcb_lexer.h
${CMAKE_CURRENT_SOURCE_DIR}/pcb_keywords.cpp ${CMAKE_CURRENT_SOURCE_DIR}/pcb_keywords.cpp
PCB_KEYS_T PCB_KEYS_T
# Pass header file with dependency on *_lexer.h as extra_arg
${PROJECT_SOURCE_DIR}/pcbnew/pcb_parser.h
) )
# auto-generate pcbnew s-expression footprint library table code. # auto-generate pcbnew s-expression footprint library table code.
make_lexer( ${CMAKE_CURRENT_SOURCE_DIR}/fp_lib_table.keywords make_lexer(
${CMAKE_CURRENT_SOURCE_DIR}/fp_lib_table.keywords
${PROJECT_SOURCE_DIR}/include/fp_lib_table_lexer.h ${PROJECT_SOURCE_DIR}/include/fp_lib_table_lexer.h
${CMAKE_CURRENT_SOURCE_DIR}/fp_lib_table_keywords.cpp ${CMAKE_CURRENT_SOURCE_DIR}/fp_lib_table_keywords.cpp
FP_LIB_TABLE_T FP_LIB_TABLE_T
......
...@@ -198,6 +198,9 @@ make_lexer( ...@@ -198,6 +198,9 @@ make_lexer(
${CMAKE_CURRENT_SOURCE_DIR}/template_fieldnames_lexer.h ${CMAKE_CURRENT_SOURCE_DIR}/template_fieldnames_lexer.h
${CMAKE_CURRENT_SOURCE_DIR}/template_fieldnames_keywords.cpp ${CMAKE_CURRENT_SOURCE_DIR}/template_fieldnames_keywords.cpp
TFIELD_T TFIELD_T
# Pass header file with dependency on *_lexer.h as extra_arg
template_fieldnames.h
) )
add_executable(eeschema WIN32 MACOSX_BUNDLE add_executable(eeschema WIN32 MACOSX_BUNDLE
......
//-----------------------------------------------------------------------------
// boost aligned_storage.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2002-2003
// Eric Friedman, Itay Maman
//
// Distributed under 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)
#ifndef BOOST_ALIGNED_STORAGE_HPP
#define BOOST_ALIGNED_STORAGE_HPP
#include <cstddef> // for std::size_t
#include "boost/config.hpp"
#include "boost/detail/workaround.hpp"
#include "boost/type_traits/alignment_of.hpp"
#include "boost/type_traits/type_with_alignment.hpp"
#include "boost/type_traits/is_pod.hpp"
#include "boost/mpl/eval_if.hpp"
#include "boost/mpl/identity.hpp"
#include "boost/type_traits/detail/bool_trait_def.hpp"
namespace boost {
namespace detail { namespace aligned_storage {
BOOST_STATIC_CONSTANT(
std::size_t
, alignment_of_max_align = ::boost::alignment_of<max_align>::value
);
//
// To be TR1 conforming this must be a POD type:
//
template <
std::size_t size_
, std::size_t alignment_
>
struct aligned_storage_imp
{
union data_t
{
char buf[size_];
typename mpl::eval_if_c<
alignment_ == std::size_t(-1)
, mpl::identity<detail::max_align>
, type_with_alignment<alignment_>
>::type align_;
} data_;
void* address() const { return const_cast<aligned_storage_imp*>(this); }
};
template< std::size_t alignment_ >
struct aligned_storage_imp<0u,alignment_>
{
/* intentionally empty */
void* address() const { return 0; }
};
}} // namespace detail::aligned_storage
template <
std::size_t size_
, std::size_t alignment_ = std::size_t(-1)
>
class aligned_storage :
#ifndef __BORLANDC__
private
#else
public
#endif
detail::aligned_storage::aligned_storage_imp<size_, alignment_>
{
public: // constants
typedef detail::aligned_storage::aligned_storage_imp<size_, alignment_> type;
BOOST_STATIC_CONSTANT(
std::size_t
, size = size_
);
BOOST_STATIC_CONSTANT(
std::size_t
, alignment = (
alignment_ == std::size_t(-1)
? ::boost::detail::aligned_storage::alignment_of_max_align
: alignment_
)
);
#if defined(__GNUC__) &&\
(__GNUC__ > 3) ||\
(__GNUC__ == 3 && (__GNUC_MINOR__ > 2 ||\
(__GNUC_MINOR__ == 2 && __GNUC_PATCHLEVEL__ >=3)))
private: // noncopyable
aligned_storage(const aligned_storage&);
aligned_storage& operator=(const aligned_storage&);
#else // gcc less than 3.2.3
public: // _should_ be noncopyable, but GCC compiler emits error
aligned_storage(const aligned_storage&);
aligned_storage& operator=(const aligned_storage&);
#endif // gcc < 3.2.3 workaround
public: // structors
aligned_storage()
{
}
~aligned_storage()
{
}
public: // accessors
void* address()
{
return static_cast<type*>(this)->address();
}
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
const void* address() const
{
return static_cast<const type*>(this)->address();
}
#else // MSVC6
const void* address() const;
#endif // MSVC6 workaround
};
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
// MSVC6 seems not to like inline functions with const void* returns, so we
// declare the following here:
template <std::size_t S, std::size_t A>
const void* aligned_storage<S,A>::address() const
{
return const_cast< aligned_storage<S,A>* >(this)->address();
}
#endif // MSVC6 workaround
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
//
// Make sure that is_pod recognises aligned_storage<>::type
// as a POD (Note that aligned_storage<> itself is not a POD):
//
template <std::size_t size_, std::size_t alignment_>
struct is_pod<boost::detail::aligned_storage::aligned_storage_imp<size_,alignment_> >
BOOST_TT_AUX_BOOL_C_BASE(true)
{
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(true)
};
#endif
} // namespace boost
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_ALIGNED_STORAGE_HPP
// See http://www.boost.org/libs/any for Documentation.
#ifndef BOOST_ANY_INCLUDED
#define BOOST_ANY_INCLUDED
// what: variant type boost::any
// who: contributed by Kevlin Henney,
// with features contributed and bugs found by
// Ed Brey, Mark Rodgers, Peter Dimov, and James Curran
// when: July 2001
// where: tested with BCC 5.5, MSVC 6.0, and g++ 2.95
#include <algorithm>
#include <typeinfo>
#include "boost/config.hpp"
#include <boost/type_traits/remove_reference.hpp>
#include <boost/type_traits/is_reference.hpp>
#include <boost/throw_exception.hpp>
#include <boost/static_assert.hpp>
// See boost/python/type_id.hpp
// TODO: add BOOST_TYPEID_COMPARE_BY_NAME to config.hpp
# if (defined(__GNUC__) && __GNUC__ >= 3) \
|| defined(_AIX) \
|| ( defined(__sgi) && defined(__host_mips)) \
|| (defined(__hpux) && defined(__HP_aCC)) \
|| (defined(linux) && defined(__INTEL_COMPILER) && defined(__ICC))
# define BOOST_AUX_ANY_TYPE_ID_NAME
#include <cstring>
# endif
namespace boost
{
class any
{
public: // structors
any()
: content(0)
{
}
template<typename ValueType>
any(const ValueType & value)
: content(new holder<ValueType>(value))
{
}
any(const any & other)
: content(other.content ? other.content->clone() : 0)
{
}
~any()
{
delete content;
}
public: // modifiers
any & swap(any & rhs)
{
std::swap(content, rhs.content);
return *this;
}
template<typename ValueType>
any & operator=(const ValueType & rhs)
{
any(rhs).swap(*this);
return *this;
}
any & operator=(any rhs)
{
rhs.swap(*this);
return *this;
}
public: // queries
bool empty() const
{
return !content;
}
const std::type_info & type() const
{
return content ? content->type() : typeid(void);
}
#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
private: // types
#else
public: // types (public so any_cast can be non-friend)
#endif
class placeholder
{
public: // structors
virtual ~placeholder()
{
}
public: // queries
virtual const std::type_info & type() const = 0;
virtual placeholder * clone() const = 0;
};
template<typename ValueType>
class holder : public placeholder
{
public: // structors
holder(const ValueType & value)
: held(value)
{
}
public: // queries
virtual const std::type_info & type() const
{
return typeid(ValueType);
}
virtual placeholder * clone() const
{
return new holder(held);
}
public: // representation
ValueType held;
private: // intentionally left unimplemented
holder & operator=(const holder &);
};
#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
private: // representation
template<typename ValueType>
friend ValueType * any_cast(any *);
template<typename ValueType>
friend ValueType * unsafe_any_cast(any *);
#else
public: // representation (public so any_cast can be non-friend)
#endif
placeholder * content;
};
class bad_any_cast : public std::bad_cast
{
public:
virtual const char * what() const throw()
{
return "boost::bad_any_cast: "
"failed conversion using boost::any_cast";
}
};
template<typename ValueType>
ValueType * any_cast(any * operand)
{
return operand &&
#ifdef BOOST_AUX_ANY_TYPE_ID_NAME
std::strcmp(operand->type().name(), typeid(ValueType).name()) == 0
#else
operand->type() == typeid(ValueType)
#endif
? &static_cast<any::holder<ValueType> *>(operand->content)->held
: 0;
}
template<typename ValueType>
inline const ValueType * any_cast(const any * operand)
{
return any_cast<ValueType>(const_cast<any *>(operand));
}
template<typename ValueType>
ValueType any_cast(any & operand)
{
typedef BOOST_DEDUCED_TYPENAME remove_reference<ValueType>::type nonref;
#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
// If 'nonref' is still reference type, it means the user has not
// specialized 'remove_reference'.
// Please use BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION macro
// to generate specialization of remove_reference for your class
// See type traits library documentation for details
BOOST_STATIC_ASSERT(!is_reference<nonref>::value);
#endif
nonref * result = any_cast<nonref>(&operand);
if(!result)
boost::throw_exception(bad_any_cast());
return *result;
}
template<typename ValueType>
inline ValueType any_cast(const any & operand)
{
typedef BOOST_DEDUCED_TYPENAME remove_reference<ValueType>::type nonref;
#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
// The comment in the above version of 'any_cast' explains when this
// assert is fired and what to do.
BOOST_STATIC_ASSERT(!is_reference<nonref>::value);
#endif
return any_cast<const nonref &>(const_cast<any &>(operand));
}
// Note: The "unsafe" versions of any_cast are not part of the
// public interface and may be removed at any time. They are
// required where we know what type is stored in the any and can't
// use typeid() comparison, e.g., when our types may travel across
// different shared libraries.
template<typename ValueType>
inline ValueType * unsafe_any_cast(any * operand)
{
return &static_cast<any::holder<ValueType> *>(operand->content)->held;
}
template<typename ValueType>
inline const ValueType * unsafe_any_cast(const any * operand)
{
return unsafe_any_cast<ValueType>(const_cast<any *>(operand));
}
}
// Copyright Kevlin Henney, 2000, 2001, 2002. All rights reserved.
//
// Distributed under 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)
#endif
#ifndef BOOST_ARCHIVE_ADD_FACET_HPP
#define BOOST_ARCHIVE_ADD_FACET_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// add_facet.hpp
// (C) Copyright 2003 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
#include <locale>
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
// does STLport uses native STL for locales?
#if (defined(__SGI_STL_PORT)&& defined(_STLP_NO_OWN_IOSTREAMS))
// and this native STL lib is old Dinkumware (has not defined _CPPLIB_VER)
# if (defined(_YVALS) && !defined(__IBMCPP__)) || !defined(_CPPLIB_VER)
# define BOOST_ARCHIVE_OLD_DINKUMWARE_BENEATH_STLPORT
# endif
#endif
namespace boost {
namespace archive {
template<class Facet>
inline std::locale *
add_facet(const std::locale &l, Facet * f){
return
#if defined BOOST_ARCHIVE_OLD_DINKUMWARE_BENEATH_STLPORT
// std namespace used for native locale
new std::locale(std::_Addfac(l, f));
#elif BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) // old Dinkumwar
// std namespace used for native locale
new std::locale(std::_Addfac(l, f));
#else
// standard compatible
new std::locale(l, f);
#endif
}
} // namespace archive
} // namespace boost
#undef BOOST_ARCHIVE_OLD_DINKUMWARE_BENEATH_STLPORT
#endif // BOOST_ARCHIVE_ADD_FACET_HPP
#ifndef BOOST_ARCHIVE_ARCHIVE_EXCEPTION_HPP
#define BOOST_ARCHIVE_ARCHIVE_EXCEPTION_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// archive/archive_exception.hpp:
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
#include <exception>
#include <boost/assert.hpp>
#include <string>
#include <boost/config.hpp>
#include <boost/preprocessor/empty.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
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
namespace boost {
namespace archive {
//////////////////////////////////////////////////////////////////////
// exceptions thrown by archives
//
class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) archive_exception :
public virtual std::exception
{
protected:
char m_buffer[128];
public:
typedef enum {
no_exception, // initialized without code
other_exception, // any excepton not listed below
unregistered_class, // attempt to serialize a pointer of an
// an unregistered class
invalid_signature, // first line of archive does not contain
// expected string
unsupported_version,// archive created with library version
// subsequent to this one
pointer_conflict, // an attempt has been made to directly
// serialize an object which has
// already been serialzed through a pointer.
// Were this permited, the archive load would result
// in the creation of an extra copy of the obect.
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
input_stream_error, // error on input stream
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
// void_cast_register
unsupported_class_version, // type saved with a version # greater than the
// one used by the program. This indicates that the proggram
// needs to be rebuilt.
multiple_code_instantiation, // code for implementing serialization for some
// type has been instantiated in more than one module.
output_stream_error // error on input stream
} exception_code;
public:
exception_code code;
archive_exception(
exception_code c,
const char * e1 = NULL,
const char * e2 = NULL
);
virtual ~archive_exception() throw();
virtual const char *what() const throw();
protected:
unsigned int
append(unsigned int l, const char * a);
archive_exception();
};
}// namespace archive
}// namespace boost
#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
#endif //BOOST_ARCHIVE_ARCHIVE_EXCEPTION_HPP
#ifndef BOOST_ARCHIVE_BASIC_ARCHIVE_HPP
#define BOOST_ARCHIVE_BASIC_ARCHIVE_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_archive.hpp:
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
#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/archive/detail/auto_link_archive.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
namespace boost {
namespace archive {
#if defined(_MSC_VER)
#pragma warning( push )
#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_VERSION();
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) {};
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_) :
t(t_.t)
{}
version_type & operator=(const version_type & rhs){
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 {
private:
typedef int_least16_t base_type;
base_type t;
public:
// should be private - but then can't use BOOST_STRONG_TYPE below
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_) :
t(t_.t)
{}
class_id_type & operator=(const class_id_type & rhs){
t = rhs.t;
return *this;
}
// used for text output
operator int () const {
return t;
}
// used for text input
operator int_least16_t &() {
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)
class object_id_type {
private:
typedef uint_least32_t base_type;
base_type t;
public:
object_id_type(): t(0) {};
// note: presumes that size_t >= unsigned int.
explicit object_id_type(const std::size_t & t_) : t(t_){
BOOST_ASSERT(t_ <= boost::integer_traits<base_type>::const_max);
}
object_id_type(const object_id_type & t_) :
t(t_.t)
{}
object_id_type & operator=(const object_id_type & rhs){
t = rhs.t;
return *this;
}
// used for text output
operator uint_least32_t () const {
return t;
}
// used for text input
operator uint_least32_t & () {
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)
#pragma warning( pop )
#endif
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;
}
bool operator==(const tracking_type & rhs) const {
return t == rhs.t;
}
bool operator==(const bool & rhs) const {
return t == rhs;
}
tracking_type & operator=(const tracking_type & rhs){
t = rhs.t;
return *this;
}
};
struct class_name_type :
private boost::noncopyable
{
char *t;
operator const char * & () const {
return const_cast<const char * &>(t);
}
operator char * () {
return t;
}
explicit class_name_type(const char *key_)
: t(const_cast<char *>(key_)){}
explicit class_name_type(char *key_)
: t(key_){}
class_name_type & operator=(const class_name_type & rhs){
t = rhs.t;
return *this;
}
};
enum archive_flags {
no_header = 1, // suppress archive header info
no_codecvt = 2, // suppress alteration of codecvt facet
no_xml_tag_checking = 4, // suppress checking of xml tags
no_tracking = 8, // suppress ALL tracking
flags_last = 8
};
BOOST_ARCHIVE_DECL(const char *)
BOOST_ARCHIVE_SIGNATURE();
/* NOTE : Warning : Warning : Warning : Warning : Warning
* 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
* inherently wrong in doing this - but you have to be super
* careful because it's easy to get wrong and start breaking
* old archives !!!
*/
#define BOOST_ARCHIVE_STRONG_TYPEDEF(T, D) \
class D : public T { \
public: \
explicit D(const T tt) : T(tt){} \
}; \
/**/
BOOST_ARCHIVE_STRONG_TYPEDEF(class_id_type, class_id_reference_type)
BOOST_ARCHIVE_STRONG_TYPEDEF(class_id_type, class_id_optional_type)
BOOST_ARCHIVE_STRONG_TYPEDEF(object_id_type, object_reference_type)
}// namespace archive
}// namespace boost
#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
#include <boost/serialization/level.hpp>
// 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::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)
BOOST_CLASS_IMPLEMENTATION(boost::archive::class_id_optional_type, primitive_type)
BOOST_CLASS_IMPLEMENTATION(boost::archive::class_name_type, primitive_type)
BOOST_CLASS_IMPLEMENTATION(boost::archive::object_id_type, primitive_type)
BOOST_CLASS_IMPLEMENTATION(boost::archive::object_reference_type, primitive_type)
BOOST_CLASS_IMPLEMENTATION(boost::archive::tracking_type, primitive_type)
#include <boost/serialization/is_bitwise_serializable.hpp>
// 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::archive::version_type)
BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::class_id_type)
BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::class_id_reference_type)
BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::class_id_optional_type)
BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::class_name_type)
BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::object_id_type)
BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::object_reference_type)
BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::tracking_type)
#endif //BOOST_ARCHIVE_BASIC_ARCHIVE_HPP
#ifndef BOOST_ARCHIVE_BASIC_BINARY_IARCHIVE_HPP
#define BOOST_ARCHIVE_BASIC_BINARY_IARCHIVE_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_binary_iarchive.hpp
//
// archives stored as native binary - this should be the fastest way
// to archive the state of a group of obects. It makes no attempt to
// convert to any canonical form.
// 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 .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/serialization/pfto.hpp>
#include <boost/archive/basic_archive.hpp>
#include <boost/archive/detail/common_iarchive.hpp>
#include <boost/serialization/collection_size_type.hpp>
#include <boost/serialization/string.hpp>
#include <boost/serialization/item_version_type.hpp>
#include <boost/integer_traits.hpp>
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable : 4511 4512)
#endif
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
namespace boost {
namespace archive {
/////////////////////////////////////////////////////////////////////////
// class basic_binary_iarchive - read serialized objects from a input binary stream
template<class Archive>
class basic_binary_iarchive :
public detail::common_iarchive<Archive>
{
protected:
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
public:
#elif defined(BOOST_MSVC)
// for some inexplicable reason insertion of "class" generates compile erro
// on msvc 7.1
friend detail::interface_iarchive<Archive>;
#else
friend class detail::interface_iarchive<Archive>;
#endif
// intermediate level to support override of operators
// 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;
template<class T>
void load_override(T & t, BOOST_PFTO int version){
this->detail_common_iarchive::load_override(t, static_cast<int>(version));
}
// include these to trap a change in binary format which
// isn't specifically handled
// upto 32K classes
BOOST_STATIC_ASSERT(sizeof(class_id_type) == sizeof(int_least16_t));
BOOST_STATIC_ASSERT(sizeof(class_id_reference_type) == sizeof(int_least16_t));
// upto 2G objects
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
void load_override(class_id_optional_type & /* t */, int){}
void load_override(tracking_type & t, int /*version*/){
library_version_type lvt = this->get_library_version();
if(boost::archive::library_version_type(6) < lvt){
int_least8_t x=0;
* this->This() >> x;
t = boost::archive::tracking_type(x);
}
else{
bool x=0;
* this->This() >> x;
t = boost::archive::tracking_type(x);
}
}
void load_override(class_id_type & t, int version){
library_version_type lvt = this->get_library_version();
if(boost::archive::library_version_type(7) < lvt){
this->detail_common_iarchive::load_override(t, version);
}
else
if(boost::archive::library_version_type(6) < lvt){
int_least16_t x=0;
* this->This() >> x;
t = boost::archive::class_id_type(x);
}
else{
int x=0;
* this->This() >> x;
t = boost::archive::class_id_type(x);
}
}
void load_override(class_id_reference_type & t, int version){
load_override(static_cast<class_id_type &>(t), version);
}
#if 0
void load_override(class_id_reference_type & t, int version){
library_version_type lvt = this->get_library_version();
if(boost::archive::library_version_type(7) < lvt){
this->detail_common_iarchive::load_override(t, version);
}
else
if(boost::archive::library_version_type(6) < lvt){
int_least16_t x=0;
* this->This() >> x;
t = boost::archive::class_id_reference_type(
boost::archive::class_id_type(x)
);
}
else{
int x=0;
* this->This() >> x;
t = boost::archive::class_id_reference_type(
boost::archive::class_id_type(x)
);
}
}
#endif
void load_override(version_type & t, int version){
library_version_type lvt = this->get_library_version();
if(boost::archive::library_version_type(7) < lvt){
this->detail_common_iarchive::load_override(t, version);
}
else
if(boost::archive::library_version_type(6) < lvt){
uint_least8_t x=0;
* this->This() >> x;
t = boost::archive::version_type(x);
}
else
if(boost::archive::library_version_type(5) < lvt){
uint_least16_t x=0;
* this->This() >> x;
t = boost::archive::version_type(x);
}
else
if(boost::archive::library_version_type(2) < lvt){
// upto 255 versions
unsigned char x=0;
* this->This() >> x;
t = version_type(x);
}
else{
unsigned int x=0;
* this->This() >> x;
t = boost::archive::version_type(x);
}
}
void load_override(boost::serialization::item_version_type & t, int version){
library_version_type lvt = this->get_library_version();
// if(boost::archive::library_version_type(7) < lvt){
if(boost::archive::library_version_type(6) < lvt){
this->detail_common_iarchive::load_override(t, version);
}
else
if(boost::archive::library_version_type(6) < lvt){
uint_least16_t x=0;
* this->This() >> x;
t = boost::serialization::item_version_type(x);
}
else{
unsigned int x=0;
* this->This() >> x;
t = boost::serialization::item_version_type(x);
}
}
void load_override(serialization::collection_size_type & t, int version){
if(boost::archive::library_version_type(5) < this->get_library_version()){
this->detail_common_iarchive::load_override(t, version);
}
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, int);
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
init();
basic_binary_iarchive(unsigned int flags) :
detail::common_iarchive<Archive>(flags)
{}
};
} // namespace archive
} // namespace boost
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
#endif // BOOST_ARCHIVE_BASIC_BINARY_IARCHIVE_HPP
#ifndef BOOST_ARCHIVE_BINARY_IPRIMITIVE_HPP
#define BOOST_ARCHIVE_BINARY_IPRIMITIVE_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
#if defined(_MSC_VER)
#pragma warning( disable : 4800 )
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_binary_iprimitive.hpp
//
// archives stored as native binary - this should be the fastest way
// to archive the state of a group of obects. It makes no attempt to
// convert to any canonical form.
// 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 .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
#include <iosfwd>
#include <boost/assert.hpp>
#include <locale>
#include <cstring> // std::memcpy
#include <cstddef> // std::size_t
#include <streambuf> // basic_streambuf
#include <string>
#include <boost/config.hpp>
#if defined(BOOST_NO_STDC_NAMESPACE)
namespace std{
using ::memcpy;
using ::size_t;
} // namespace std
#endif
#include <boost/cstdint.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/serialization/throw_exception.hpp>
#include <boost/integer.hpp>
#include <boost/integer_traits.hpp>
#include <boost/archive/basic_streambuf_locale_saver.hpp>
#include <boost/archive/archive_exception.hpp>
#include <boost/mpl/placeholders.hpp>
#include <boost/serialization/is_bitwise_serializable.hpp>
#include <boost/serialization/array.hpp>
#include <boost/archive/detail/auto_link_archive.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
namespace boost {
namespace archive {
/////////////////////////////////////////////////////////////////////////////
// class binary_iarchive - read serialized objects from a input binary stream
template<class Archive, class Elem, class Tr>
class basic_binary_iprimitive
{
#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
friend class load_access;
protected:
#else
public:
#endif
std::basic_streambuf<Elem, Tr> & m_sb;
// return a pointer to the most derived class
Archive * This(){
return static_cast<Archive *>(this);
}
#ifndef BOOST_NO_STD_LOCALE
boost::scoped_ptr<std::locale> archive_locale;
basic_streambuf_locale_saver<Elem, Tr> locale_saver;
#endif
// main template for serilization of primitive types
template<class T>
void load(T & t){
load_binary(& t, sizeof(T));
}
/////////////////////////////////////////////////////////
// fundamental types that need special treatment
// trap usage of invalid uninitialized boolean
void load(bool & t){
load_binary(& t, sizeof(t));
int i = t;
BOOST_ASSERT(0 == i || 1 == i);
(void)i; // warning suppression for release builds.
}
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
load(std::string &s);
#ifndef BOOST_NO_STD_WSTRING
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
load(std::wstring &ws);
#endif
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
load(char * t);
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
load(wchar_t * t);
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
init();
BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
basic_binary_iprimitive(
std::basic_streambuf<Elem, Tr> & sb,
bool no_codecvt
);
BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
~basic_binary_iprimitive();
public:
// we provide an optimized load for all fundamental types
// 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 BOOST_DEDUCED_TYPENAME boost::serialization::is_bitwise_serializable< T >::type type;
};
#else
struct apply : public boost::serialization::is_bitwise_serializable< T > {};
#endif
};
// the optimized load_array dispatches to load_binary
template <class ValueType>
void load_array(serialization::array<ValueType>& a, unsigned int)
{
load_binary(a.address(),a.count()*sizeof(ValueType));
}
void
load_binary(void *address, std::size_t count);
};
template<class Archive, class Elem, class Tr>
inline void
basic_binary_iprimitive<Archive, Elem, Tr>::load_binary(
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))
<= 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),
s
);
if(scount != s)
boost::serialization::throw_exception(
archive_exception(archive_exception::input_stream_error)
);
// note: an optimizer should eliminate the following for char files
BOOST_ASSERT(count % sizeof(Elem) <= boost::integer_traits<std::streamsize>::const_max);
s = static_cast<std::streamsize>(count % sizeof(Elem));
if(0 < s){
// if(is.fail())
// boost::serialization::throw_exception(
// archive_exception(archive_exception::stream_error)
// );
Elem t;
scount = m_sb.sgetn(& t, 1);
if(scount != 1)
boost::serialization::throw_exception(
archive_exception(archive_exception::input_stream_error)
);
std::memcpy(static_cast<char*>(address) + (count - s), &t, s);
}
}
} // namespace archive
} // namespace boost
#include <boost/archive/detail/abi_suffix.hpp> // pop pragmas
#endif // BOOST_ARCHIVE_BINARY_IPRIMITIVE_HPP
#ifndef BOOST_ARCHIVE_BASIC_BINARY_OARCHIVE_HPP
#define BOOST_ARCHIVE_BASIC_BINARY_OARCHIVE_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_binary_oarchive.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
// archives stored as native binary - this should be the fastest way
// to archive the state of a group of obects. It makes no attempt to
// convert to any canonical form.
// IN GENERAL, ARCHIVES CREATED WITH THIS CLASS WILL NOT BE READABLE
// ON PLATFORM APART FROM THE ONE THEY ARE CREATE ON
#include <boost/assert.hpp>
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/serialization/pfto.hpp>
#include <boost/integer.hpp>
#include <boost/integer_traits.hpp>
#include <boost/archive/detail/common_oarchive.hpp>
#include <boost/serialization/string.hpp>
#include <boost/serialization/collection_size_type.hpp>
#include <boost/serialization/item_version_type.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable : 4511 4512)
#endif
namespace boost {
namespace archive {
//////////////////////////////////////////////////////////////////////
// class basic_binary_oarchive - write serialized objects to a binary output stream
// note: this archive has no pretensions to portability. Archive format
// may vary across machine architectures and compilers. About the only
// guarentee is that an archive created with this code will be readable
// by a program built with the same tools for the same machne. This class
// 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 basic_binary_oarchive :
public archive::detail::common_oarchive<Archive>
{
protected:
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
public:
#elif defined(BOOST_MSVC)
// for some inexplicable reason insertion of "class" generates compile erro
// on msvc 7.1
friend detail::interface_oarchive<Archive>;
#else
friend class detail::interface_oarchive<Archive>;
#endif
// any datatype not specifed below will be handled by base class
typedef detail::common_oarchive<Archive> detail_common_oarchive;
template<class T>
void save_override(const T & t, BOOST_PFTO int version){
this->detail_common_oarchive::save_override(t, static_cast<int>(version));
}
// include these to trap a change in binary format which
// isn't specifically handled
BOOST_STATIC_ASSERT(sizeof(tracking_type) == sizeof(bool));
// upto 32K classes
BOOST_STATIC_ASSERT(sizeof(class_id_type) == sizeof(int_least16_t));
BOOST_STATIC_ASSERT(sizeof(class_id_reference_type) == sizeof(int_least16_t));
// upto 2G objects
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
void save_override(const class_id_optional_type & /* t */, int){}
// enable this if we decide to support generation of previous versions
#if 0
void save_override(const boost::archive::version_type & t, int version){
library_version_type lvt = this->get_library_version();
if(boost::archive::library_version_type(7) < lvt){
this->detail_common_oarchive::save_override(t, version);
}
else
if(boost::archive::library_version_type(6) < lvt){
const boost::uint_least16_t x = t;
* this->This() << x;
}
else{
const unsigned int x = t;
* this->This() << x;
}
}
void save_override(const boost::serialization::item_version_type & t, int version){
library_version_type lvt = this->get_library_version();
if(boost::archive::library_version_type(7) < lvt){
this->detail_common_oarchive::save_override(t, version);
}
else
if(boost::archive::library_version_type(6) < lvt){
const boost::uint_least16_t x = t;
* this->This() << x;
}
else{
const unsigned int x = t;
* this->This() << x;
}
}
void save_override(class_id_type & t, int version){
library_version_type lvt = this->get_library_version();
if(boost::archive::library_version_type(7) < lvt){
this->detail_common_oarchive::save_override(t, version);
}
else
if(boost::archive::library_version_type(6) < lvt){
const boost::int_least16_t x = t;
* this->This() << x;
}
else{
const int x = t;
* this->This() << x;
}
}
void save_override(class_id_reference_type & t, int version){
save_override(static_cast<class_id_type &>(t), version);
}
#endif
// explicitly convert to char * to avoid compile ambiguities
void save_override(const class_name_type & t, int){
const std::string s(t);
* this->This() << s;
}
#if 0
void save_override(const serialization::collection_size_type & t, int){
if (get_library_version() < boost::archive::library_version_type(6)){
unsigned int x=0;
* this->This() >> x;
t = serialization::collection_size_type(x);
}
else{
* this->This() >> t;
}
}
#endif
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
init();
basic_binary_oarchive(unsigned int flags) :
detail::common_oarchive<Archive>(flags)
{}
};
} // namespace archive
} // namespace boost
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
#endif // BOOST_ARCHIVE_BASIC_BINARY_OARCHIVE_HPP
#ifndef BOOST_ARCHIVE_BASIC_BINARY_OPRIMITIVE_HPP
#define BOOST_ARCHIVE_BASIC_BINARY_OPRIMITIVE_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_binary_oprimitive.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
// archives stored as native binary - this should be the fastest way
// to archive the state of a group of obects. It makes no attempt to
// convert to any canonical form.
// IN GENERAL, ARCHIVES CREATED WITH THIS CLASS WILL NOT BE READABLE
// ON PLATFORM APART FROM THE ONE THEY ARE CREATE ON
#include <iosfwd>
#include <boost/assert.hpp>
#include <locale>
#include <streambuf> // basic_streambuf
#include <string>
#include <cstddef> // size_t
#include <boost/config.hpp>
#if defined(BOOST_NO_STDC_NAMESPACE)
namespace std{
using ::size_t;
} // namespace std
#endif
#include <boost/cstdint.hpp>
#include <boost/integer.hpp>
#include <boost/integer_traits.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/serialization/throw_exception.hpp>
#include <boost/archive/basic_streambuf_locale_saver.hpp>
#include <boost/archive/archive_exception.hpp>
#include <boost/serialization/is_bitwise_serializable.hpp>
#include <boost/mpl/placeholders.hpp>
#include <boost/serialization/array.hpp>
#include <boost/archive/detail/auto_link_archive.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
namespace boost {
namespace archive {
/////////////////////////////////////////////////////////////////////////
// class basic_binary_oprimitive - binary output of prmitives
template<class Archive, class Elem, class Tr>
class basic_binary_oprimitive
{
#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
friend class save_access;
protected:
#else
public:
#endif
std::basic_streambuf<Elem, Tr> & m_sb;
// return a pointer to the most derived class
Archive * This(){
return static_cast<Archive *>(this);
}
#ifndef BOOST_NO_STD_LOCALE
boost::scoped_ptr<std::locale> archive_locale;
basic_streambuf_locale_saver<Elem, Tr> locale_saver;
#endif
// default saving of primitives.
template<class T>
void save(const T & t)
{
save_binary(& t, sizeof(T));
}
/////////////////////////////////////////////////////////
// fundamental types that need special treatment
// trap usage of invalid uninitialized boolean which would
// otherwise crash on load.
void save(const bool t){
BOOST_ASSERT(0 == static_cast<int>(t) || 1 == static_cast<int>(t));
save_binary(& t, sizeof(t));
}
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
save(const std::string &s);
#ifndef BOOST_NO_STD_WSTRING
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
save(const std::wstring &ws);
#endif
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
save(const char * t);
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
save(const wchar_t * t);
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
init();
BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
basic_binary_oprimitive(
std::basic_streambuf<Elem, Tr> & sb,
bool no_codecvt
);
BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
~basic_binary_oprimitive();
public:
// we provide an optimized save for all fundamental types
// 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 BOOST_DEDUCED_TYPENAME boost::serialization::is_bitwise_serializable< T >::type type;
};
#else
struct apply : public boost::serialization::is_bitwise_serializable< T > {};
#endif
};
// the optimized save_array dispatches to save_binary
template <class ValueType>
void save_array(boost::serialization::array<ValueType> const& a, unsigned int)
{
save_binary(a.address(),a.count()*sizeof(ValueType));
}
void save_binary(const void *address, std::size_t count);
};
template<class Archive, class Elem, class Tr>
inline void
basic_binary_oprimitive<Archive, Elem, Tr>::save_binary(
const void *address,
std::size_t count
){
//BOOST_ASSERT(
// static_cast<std::size_t>((std::numeric_limits<std::streamsize>::max)()) >= count
//);
// note: if the following assertions fail
// a likely cause is that the output stream is set to "text"
// mode where by cr characters recieve special treatment.
// be sure that the output stream is opened with ios::binary
//if(os.fail())
// boost::serialization::throw_exception(
// archive_exception(archive_exception::output_stream_error)
// );
// figure number of elements to output - round up
count = ( count + sizeof(Elem) - 1)
/ sizeof(Elem);
BOOST_ASSERT(count <= std::size_t(boost::integer_traits<std::streamsize>::const_max));
std::streamsize scount = m_sb.sputn(
static_cast<const Elem *>(address),
static_cast<std::streamsize>(count)
);
if(count != static_cast<std::size_t>(scount))
boost::serialization::throw_exception(
archive_exception(archive_exception::output_stream_error)
);
//os.write(
// static_cast<const BOOST_DEDUCED_TYPENAME OStream::char_type *>(address),
// count
//);
//BOOST_ASSERT(os.good());
}
} //namespace boost
} //namespace archive
#include <boost/archive/detail/abi_suffix.hpp> // pop pragmas
#endif // BOOST_ARCHIVE_BASIC_BINARY_OPRIMITIVE_HPP
#ifndef BOOST_ARCHIVE_BASIC_STREAMBUF_LOCALE_SAVER_HPP
#define BOOST_ARCHIVE_BASIC_STREAMBUF_LOCALE_SAVER_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_streambuf_local_saver.hpp
// (C) Copyright 2005 Robert Ramey - http://www.rrsd.com
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
// note derived from boost/io/ios_state.hpp
// Copyright 2002, 2005 Daryle Walker. Use, modification, and distribution
// are subject to the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or a copy at <http://www.boost.org/LICENSE_1_0.txt>.)
// See <http://www.boost.org/libs/io/> for the library's home page.
#ifndef BOOST_NO_STD_LOCALE
#include <locale> // for std::locale
#include <streambuf> // for std::basic_streambuf
#include <boost/config.hpp>
#include <boost/noncopyable.hpp>
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable : 4511 4512)
#endif
namespace boost{
namespace archive{
template < typename Ch, class Tr >
class basic_streambuf_locale_saver :
private boost::noncopyable
{
public:
typedef ::std::basic_streambuf<Ch, Tr> state_type;
typedef ::std::locale aspect_type;
explicit basic_streambuf_locale_saver( state_type &s )
: s_save_( s ), a_save_( s.getloc() )
{}
basic_streambuf_locale_saver( state_type &s, aspect_type const &a )
: s_save_( s ), a_save_( s.pubimbue(a) )
{}
~basic_streambuf_locale_saver()
{ this->restore(); }
void restore()
{ s_save_.pubimbue( a_save_ ); }
private:
state_type & s_save_;
aspect_type const a_save_;
};
} // archive
} // boost
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
#endif // BOOST_NO_STD_LOCALE
#endif // BOOST_ARCHIVE_BASIC_STREAMBUF_LOCALE_SAVER_HPP
#ifndef BOOST_ARCHIVE_BASIC_TEXT_IARCHIVE_HPP
#define BOOST_ARCHIVE_BASIC_TEXT_IARCHIVE_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_text_iarchive.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
// archives stored as text - note these ar templated on the basic
// stream templates to accommodate wide (and other?) kind of characters
//
// note the fact that on libraries without wide characters, ostream is
// is not a specialization of basic_ostream which in fact is not defined
// in such cases. So we can't use basic_ostream<IStream::char_type> but rather
// use two template parameters
#include <boost/config.hpp>
#include <boost/serialization/pfto.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/archive/detail/common_iarchive.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable : 4511 4512)
#endif
namespace boost {
namespace archive {
/////////////////////////////////////////////////////////////////////////
// class basic_text_iarchive - read serialized objects from a input text stream
template<class Archive>
class basic_text_iarchive :
public detail::common_iarchive<Archive>
{
protected:
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
public:
#elif defined(BOOST_MSVC)
// for some inexplicable reason insertion of "class" generates compile erro
// on msvc 7.1
friend detail::interface_iarchive<Archive>;
#else
friend class detail::interface_iarchive<Archive>;
#endif
// intermediate level to support override of operators
// 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, BOOST_PFTO int){
this->detail_common_iarchive::load_override(t, 0);
}
// text file don't include the optional information
void load_override(class_id_optional_type & /*t*/, int){}
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
load_override(class_name_type & t, int);
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
init(void);
basic_text_iarchive(unsigned int flags) :
detail::common_iarchive<Archive>(flags)
{}
~basic_text_iarchive(){}
};
} // namespace archive
} // namespace boost
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
#endif // BOOST_ARCHIVE_BASIC_TEXT_IARCHIVE_HPP
#ifndef BOOST_ARCHIVE_BASIC_TEXT_IPRIMITIVE_HPP
#define BOOST_ARCHIVE_BASIC_TEXT_IPRIMITIVE_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_text_iprimitive.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
// archives stored as text - note these are templated on the basic
// stream templates to accommodate wide (and other?) kind of characters
//
// Note the fact that on libraries without wide characters, ostream is
// not a specialization of basic_ostream which in fact is not defined
// in such cases. So we can't use basic_ostream<IStream::char_type> but rather
// use two template parameters
#include <boost/assert.hpp>
#include <locale>
#include <cstddef> // size_t
#include <boost/config.hpp>
#if defined(BOOST_NO_STDC_NAMESPACE)
namespace std{
using ::size_t;
#if ! defined(BOOST_DINKUMWARE_STDLIB) && ! defined(__SGI_STL_PORT)
using ::locale;
#endif
} // namespace std
#endif
#include <boost/detail/workaround.hpp>
#if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1)
#include <boost/archive/dinkumware.hpp>
#endif
#include <boost/limits.hpp>
#include <boost/io/ios_state.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/static_assert.hpp>
#include <boost/serialization/throw_exception.hpp>
#include <boost/archive/archive_exception.hpp>
#include <boost/archive/basic_streambuf_locale_saver.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
namespace boost {
namespace archive {
/////////////////////////////////////////////////////////////////////////
// class basic_text_iarchive - load serialized objects from a input text stream
#if defined(_MSC_VER)
#pragma warning( push )
#pragma warning( disable : 4244 4267 )
#endif
template<class IStream>
class basic_text_iprimitive
{
#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
protected:
#else
public:
#endif
IStream &is;
io::ios_flags_saver flags_saver;
io::ios_precision_saver precision_saver;
#ifndef BOOST_NO_STD_LOCALE
boost::scoped_ptr<std::locale> archive_locale;
basic_streambuf_locale_saver<
BOOST_DEDUCED_TYPENAME IStream::char_type,
BOOST_DEDUCED_TYPENAME IStream::traits_type
> locale_saver;
#endif
template<class T>
void load(T & t)
{
if(! is.fail()){
is >> t;
return;
}
boost::serialization::throw_exception(
archive_exception(archive_exception::input_stream_error)
);
}
void load(char & t)
{
short int i;
load(i);
t = i;
}
void load(signed char & t)
{
short int i;
load(i);
t = i;
}
void load(unsigned char & t)
{
unsigned short int i;
load(i);
t = i;
}
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
void load(wchar_t & t)
{
BOOST_STATIC_ASSERT(sizeof(wchar_t) <= sizeof(int));
int i;
load(i);
t = i;
}
#endif
BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
basic_text_iprimitive(IStream &is, bool no_codecvt);
BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
~basic_text_iprimitive();
public:
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
load_binary(void *address, std::size_t count);
};
#if defined(_MSC_VER)
#pragma warning( pop )
#endif
} // namespace archive
} // namespace boost
#include <boost/archive/detail/abi_suffix.hpp> // pop pragmas
#endif // BOOST_ARCHIVE_BASIC_TEXT_IPRIMITIVE_HPP
#ifndef BOOST_ARCHIVE_BASIC_TEXT_OARCHIVE_HPP
#define BOOST_ARCHIVE_BASIC_TEXT_OARCHIVE_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_text_oarchive.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
// archives stored as text - note these ar templated on the basic
// stream templates to accommodate wide (and other?) kind of characters
//
// note the fact that on libraries without wide characters, ostream is
// is not a specialization of basic_ostream which in fact is not defined
// in such cases. So we can't use basic_ostream<OStream::char_type> but rather
// use two template parameters
#include <boost/assert.hpp>
#include <boost/config.hpp>
#include <boost/serialization/pfto.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/archive/detail/common_oarchive.hpp>
#include <boost/serialization/string.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable : 4511 4512)
#endif
namespace boost {
namespace archive {
/////////////////////////////////////////////////////////////////////////
// class basic_text_oarchive
template<class Archive>
class basic_text_oarchive :
public detail::common_oarchive<Archive>
{
protected:
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
|| BOOST_WORKAROUND(__BORLANDC__,BOOST_TESTED_AT(0x560))
public:
#elif defined(BOOST_MSVC)
// for some inexplicable reason insertion of "class" generates compile erro
// on msvc 7.1
friend detail::interface_oarchive<Archive>;
#else
friend class detail::interface_oarchive<Archive>;
#endif
enum {
none,
eol,
space
} delimiter;
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
newtoken();
void newline(){
delimiter = eol;
}
// default processing - kick back to base class. Note the
// extra stuff to get it passed borland compilers
typedef detail::common_oarchive<Archive> detail_common_oarchive;
template<class T>
void save_override(T & t, BOOST_PFTO int){
this->detail_common_oarchive::save_override(t, 0);
}
// start new objects on a new line
void save_override(const object_id_type & t, int){
this->This()->newline();
this->detail_common_oarchive::save_override(t, 0);
}
// text file don't include the optional information
void save_override(const class_id_optional_type & /* t */, int){}
void save_override(const class_name_type & t, int){
const std::string s(t);
* this->This() << s;
}
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
init();
basic_text_oarchive(unsigned int flags) :
detail::common_oarchive<Archive>(flags),
delimiter(none)
{}
~basic_text_oarchive(){}
};
} // namespace archive
} // namespace boost
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
#endif // BOOST_ARCHIVE_BASIC_TEXT_OARCHIVE_HPP
#ifndef BOOST_ARCHIVE_BASIC_TEXT_OPRIMITIVE_HPP
#define BOOST_ARCHIVE_BASIC_TEXT_OPRIMITIVE_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_text_oprimitive.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
// archives stored as text - note these ar templated on the basic
// stream templates to accommodate wide (and other?) kind of characters
//
// note the fact that on libraries without wide characters, ostream is
// is not a specialization of basic_ostream which in fact is not defined
// in such cases. So we can't use basic_ostream<OStream::char_type> but rather
// use two template parameters
#include <iomanip>
#include <locale>
#include <boost/config/no_tr1/cmath.hpp> // isnan
#include <boost/assert.hpp>
#include <cstddef> // size_t
#include <boost/config.hpp>
#include <boost/static_assert.hpp>
#include <boost/detail/workaround.hpp>
#if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1)
#include <boost/archive/dinkumware.hpp>
#endif
#if defined(BOOST_NO_STDC_NAMESPACE)
namespace std{
using ::size_t;
#if ! defined(BOOST_DINKUMWARE_STDLIB) && ! defined(__SGI_STL_PORT)
using ::locale;
#endif
} // namespace std
#endif
#include <boost/limits.hpp>
#include <boost/integer.hpp>
#include <boost/io/ios_state.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/serialization/throw_exception.hpp>
#include <boost/archive/archive_exception.hpp>
#include <boost/archive/basic_streambuf_locale_saver.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
namespace boost {
namespace archive {
class save_access;
/////////////////////////////////////////////////////////////////////////
// class basic_text_oprimitive - output of prmitives to stream
template<class OStream>
class basic_text_oprimitive
{
#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
protected:
#else
public:
#endif
OStream &os;
io::ios_flags_saver flags_saver;
io::ios_precision_saver precision_saver;
#ifndef BOOST_NO_STD_LOCALE
boost::scoped_ptr<std::locale> archive_locale;
basic_streambuf_locale_saver<
BOOST_DEDUCED_TYPENAME OStream::char_type,
BOOST_DEDUCED_TYPENAME OStream::traits_type
> locale_saver;
#endif
// default saving of primitives.
template<class T>
void save(const T &t){
if(os.fail())
boost::serialization::throw_exception(
archive_exception(archive_exception::output_stream_error)
);
os << t;
}
/////////////////////////////////////////////////////////
// fundamental types that need special treatment
void save(const bool t){
// trap usage of invalid uninitialized boolean which would
// otherwise crash on load.
BOOST_ASSERT(0 == static_cast<int>(t) || 1 == static_cast<int>(t));
if(os.fail())
boost::serialization::throw_exception(
archive_exception(archive_exception::output_stream_error)
);
os << t;
}
void save(const signed char t)
{
save(static_cast<short int>(t));
}
void save(const unsigned char t)
{
save(static_cast<short unsigned int>(t));
}
void save(const char t)
{
save(static_cast<short int>(t));
}
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
void save(const wchar_t t)
{
BOOST_STATIC_ASSERT(sizeof(wchar_t) <= sizeof(int));
save(static_cast<int>(t));
}
#endif
void save(const float t)
{
// must be a user mistake - can't serialize un-initialized data
if(os.fail())
boost::serialization::throw_exception(
archive_exception(archive_exception::output_stream_error)
);
os << std::setprecision(std::numeric_limits<float>::digits10 + 2);
os << t;
}
void save(const double t)
{
// must be a user mistake - can't serialize un-initialized data
if(os.fail())
boost::serialization::throw_exception(
archive_exception(archive_exception::output_stream_error)
);
os << std::setprecision(std::numeric_limits<double>::digits10 + 2);
os << t;
}
BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
basic_text_oprimitive(OStream & os, bool no_codecvt);
BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
~basic_text_oprimitive();
public:
// unformatted append of one character
void put(BOOST_DEDUCED_TYPENAME OStream::char_type c){
if(os.fail())
boost::serialization::throw_exception(
archive_exception(archive_exception::output_stream_error)
);
os.put(c);
}
// unformatted append of null terminated string
void put(const char * s){
while('\0' != *s)
os.put(*s++);
}
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
save_binary(const void *address, std::size_t count);
};
} //namespace boost
} //namespace archive
#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
#endif // BOOST_ARCHIVE_BASIC_TEXT_OPRIMITIVE_HPP
#ifndef BOOST_ARCHIVE_BASIC_XML_TEXT_ARCHIVE_HPP
#define BOOST_ARCHIVE_BASIC_XML_TEXT_ARCHIVE_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_xml_archive.hpp:
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
#include <boost/archive/archive_exception.hpp>
#include <boost/archive/detail/auto_link_archive.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
namespace boost {
namespace archive {
// constant strings used in xml i/o
extern
BOOST_ARCHIVE_DECL(const char *)
BOOST_ARCHIVE_XML_OBJECT_ID();
extern
BOOST_ARCHIVE_DECL(const char *)
BOOST_ARCHIVE_XML_OBJECT_REFERENCE();
extern
BOOST_ARCHIVE_DECL(const char *)
BOOST_ARCHIVE_XML_CLASS_ID();
extern
BOOST_ARCHIVE_DECL(const char *)
BOOST_ARCHIVE_XML_CLASS_ID_REFERENCE();
extern
BOOST_ARCHIVE_DECL(const char *)
BOOST_ARCHIVE_XML_CLASS_NAME();
extern
BOOST_ARCHIVE_DECL(const char *)
BOOST_ARCHIVE_XML_TRACKING();
extern
BOOST_ARCHIVE_DECL(const char *)
BOOST_ARCHIVE_XML_VERSION();
extern
BOOST_ARCHIVE_DECL(const char *)
BOOST_ARCHIVE_XML_SIGNATURE();
}// namespace archive
}// namespace boost
#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
#endif // BOOST_ARCHIVE_BASIC_XML_TEXT_ARCHIVE_HPP
#ifndef BOOST_ARCHIVE_BASIC_XML_IARCHIVE_HPP
#define BOOST_ARCHIVE_BASIC_XML_IARCHIVE_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_xml_iarchive.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
#include <boost/config.hpp>
#include <boost/serialization/pfto.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/archive/detail/common_iarchive.hpp>
#include <boost/serialization/nvp.hpp>
#include <boost/serialization/string.hpp>
#include <boost/mpl/assert.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable : 4511 4512)
#endif
namespace boost {
namespace archive {
/////////////////////////////////////////////////////////////////////////
// class xml_iarchive - read serialized objects from a input text stream
template<class Archive>
class basic_xml_iarchive :
public detail::common_iarchive<Archive>
{
protected:
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
public:
#elif defined(BOOST_MSVC)
// for some inexplicable reason insertion of "class" generates compile erro
// on msvc 7.1
friend detail::interface_oarchive<Archive>;
#else
friend class detail::interface_oarchive<Archive>;
#endif
unsigned int depth;
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
load_start(const char *name);
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
load_end(const char *name);
// Anything not an attribute and not a name-value pair is an
// should be trapped here.
template<class T>
void load_override(T & t, BOOST_PFTO int)
{
// If your program fails to compile here, its most likely due to
// not specifying an nvp wrapper around the variable to
// be serialized.
BOOST_MPL_ASSERT((serialization::is_wrapper< T >));
this->detail_common_iarchive::load_override(t, 0);
}
// Anything not an attribute - see below - should be a name value
// pair and be processed here
typedef detail::common_iarchive<Archive> detail_common_iarchive;
template<class T>
void load_override(
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
const
#endif
boost::serialization::nvp< T > & t,
int
){
this->This()->load_start(t.name());
this->detail_common_iarchive::load_override(t.value(), 0);
this->This()->load_end(t.name());
}
// specific overrides for attributes - handle as
// primitives. These are not name-value pairs
// so they have to be intercepted here and passed on to load.
// although the class_id is included in the xml text file in order
// to make the file self describing, it isn't used when loading
// an xml archive. So we can skip it here. Note: we MUST override
// it otherwise it will be loaded as a normal primitive w/o tag and
// leaving the archive in an undetermined state
void load_override(class_id_optional_type & /* t */, int){}
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
load_override(object_id_type & t, int);
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
load_override(version_type & t, int);
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
load_override(class_id_type & t, int);
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
load_override(tracking_type & t, int);
// class_name_type can't be handled here as it depends upon the
// char type used by the stream. So require the derived implementation
// handle this.
// void load_override(class_name_type & t, int);
BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
basic_xml_iarchive(unsigned int flags);
BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
~basic_xml_iarchive();
};
} // namespace archive
} // namespace boost
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
#endif // BOOST_ARCHIVE_BASIC_XML_IARCHIVE_HPP
#ifndef BOOST_ARCHIVE_BASIC_XML_OARCHIVE_HPP
#define BOOST_ARCHIVE_BASIC_XML_OARCHIVE_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_xml_oarchive.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
#include <boost/config.hpp>
#include <boost/archive/detail/common_oarchive.hpp>
#include <boost/serialization/nvp.hpp>
#include <boost/serialization/tracking.hpp>
#include <boost/serialization/string.hpp>
#include <boost/mpl/assert.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable : 4511 4512)
#endif
namespace boost {
namespace archive {
//////////////////////////////////////////////////////////////////////
// class basic_xml_oarchive - write serialized objects to a xml output stream
template<class Archive>
class basic_xml_oarchive :
public detail::common_oarchive<Archive>
{
protected:
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
public:
#elif defined(BOOST_MSVC)
// for some inexplicable reason insertion of "class" generates compile erro
// on msvc 7.1
friend detail::interface_oarchive<Archive>;
friend class save_access;
#else
friend class detail::interface_oarchive<Archive>;
friend class save_access;
#endif
// special stuff for xml output
unsigned int depth;
bool indent_next;
bool pending_preamble;
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
indent();
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
init();
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
write_attribute(
const char *attribute_name,
int t,
const char *conjunction = "=\""
);
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
write_attribute(
const char *attribute_name,
const char *key
);
// helpers used below
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
save_start(const char *name);
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
save_end(const char *name);
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
end_preamble();
// Anything not an attribute and not a name-value pair is an
// error and should be trapped here.
template<class T>
void save_override(T & t, BOOST_PFTO int)
{
// If your program fails to compile here, its most likely due to
// not specifying an nvp wrapper around the variable to
// be serialized.
BOOST_MPL_ASSERT((serialization::is_wrapper< T >));
this->detail_common_oarchive::save_override(t, 0);
}
// special treatment for name-value pairs.
typedef detail::common_oarchive<Archive> detail_common_oarchive;
template<class T>
void save_override(
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
const
#endif
::boost::serialization::nvp< T > & t,
int
){
this->This()->save_start(t.name());
this->detail_common_oarchive::save_override(t.const_value(), 0);
this->This()->save_end(t.name());
}
// specific overrides for attributes - not name value pairs so we
// want to trap them before the above "fall through"
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
save_override(const object_id_type & t, int);
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
save_override(const object_reference_type & t, int);
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
save_override(const version_type & t, int);
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
save_override(const class_id_type & t, int);
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
save_override(const class_id_optional_type & t, int);
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
save_override(const class_id_reference_type & t, int);
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
save_override(const class_name_type & t, int);
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
save_override(const tracking_type & t, int);
BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
basic_xml_oarchive(unsigned int flags);
BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
~basic_xml_oarchive();
};
} // namespace archive
} // namespace boost
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
#endif // BOOST_ARCHIVE_BASIC_XML_OARCHIVE_HPP
#ifndef BOOST_ARCHIVE_BINARY_IARCHIVE_HPP
#define BOOST_ARCHIVE_BINARY_IARCHIVE_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// binary_iarchive.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
#include <istream>
#include <boost/archive/binary_iarchive_impl.hpp>
#include <boost/archive/detail/register_archive.hpp>
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable : 4511 4512)
#endif
namespace boost {
namespace archive {
// do not derive from the classes below. If you want to extend this functionality
// via inhertance, derived from text_iarchive_impl instead. This will
// preserve correct static polymorphism.
// same as binary_iarchive below - without the shared_ptr_helper
class naked_binary_iarchive :
public binary_iarchive_impl<
boost::archive::naked_binary_iarchive,
std::istream::char_type,
std::istream::traits_type
>
{
public:
naked_binary_iarchive(std::istream & is, unsigned int flags = 0) :
binary_iarchive_impl<
naked_binary_iarchive, std::istream::char_type, std::istream::traits_type
>(is, flags)
{}
naked_binary_iarchive(std::streambuf & bsb, unsigned int flags = 0) :
binary_iarchive_impl<
naked_binary_iarchive, std::istream::char_type, std::istream::traits_type
>(bsb, flags)
{}
};
} // namespace archive
} // namespace boost
// note special treatment of shared_ptr. This type needs a special
// structure associated with every archive. We created a "mix-in"
// class to provide this functionality. Since shared_ptr holds a
// special esteem in the boost library - we included it here by default.
#include <boost/archive/shared_ptr_helper.hpp>
namespace boost {
namespace archive {
// do not derive from this class. If you want to extend this functionality
// via inhertance, derived from binary_iarchive_impl instead. This will
// preserve correct static polymorphism.
class binary_iarchive :
public binary_iarchive_impl<
boost::archive::binary_iarchive,
std::istream::char_type,
std::istream::traits_type
>,
public detail::shared_ptr_helper
{
public:
binary_iarchive(std::istream & is, unsigned int flags = 0) :
binary_iarchive_impl<
binary_iarchive, std::istream::char_type, std::istream::traits_type
>(is, 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)
{}
};
} // namespace archive
} // namespace boost
// required by export
BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::binary_iarchive)
BOOST_SERIALIZATION_USE_ARRAY_OPTIMIZATION(boost::archive::binary_iarchive)
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
#endif // BOOST_ARCHIVE_BINARY_IARCHIVE_HPP
#ifndef BOOST_ARCHIVE_BINARY_IARCHIVE_IMPL_HPP
#define BOOST_ARCHIVE_BINARY_IARCHIVE_IMPL_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// binary_iarchive_impl.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
#include <istream>
#include <boost/serialization/pfto.hpp>
#include <boost/archive/basic_binary_iprimitive.hpp>
#include <boost/archive/basic_binary_iarchive.hpp>
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable : 4511 4512)
#endif
namespace boost {
namespace archive {
template<class Archive, class Elem, class Tr>
class binary_iarchive_impl :
public basic_binary_iprimitive<Archive, Elem, Tr>,
public basic_binary_iarchive<Archive>
{
#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
public:
#else
friend class detail::interface_iarchive<Archive>;
friend class basic_binary_iarchive<Archive>;
friend class load_access;
protected:
#endif
// note: the following should not needed - but one compiler (vc 7.1)
// fails to compile one test (test_shared_ptr) without it !!!
// make this protected so it can be called from a derived archive
template<class T>
void load_override(T & t, BOOST_PFTO int){
this->basic_binary_iarchive<Archive>::load_override(t, 0L);
}
void init(unsigned int flags){
if(0 != (flags & no_header))
return;
#if ! defined(__MWERKS__)
this->basic_binary_iarchive<Archive>::init();
this->basic_binary_iprimitive<Archive, Elem, Tr>::init();
#else
basic_binary_iarchive<Archive>::init();
basic_binary_iprimitive<Archive, Elem, Tr>::init();
#endif
}
binary_iarchive_impl(
std::basic_streambuf<Elem, Tr> & bsb,
unsigned int flags
) :
basic_binary_iprimitive<Archive, Elem, Tr>(
bsb,
0 != (flags & no_codecvt)
),
basic_binary_iarchive<Archive>(flags)
{
init(flags);
}
binary_iarchive_impl(
std::basic_istream<Elem, Tr> & is,
unsigned int flags
) :
basic_binary_iprimitive<Archive, Elem, Tr>(
* is.rdbuf(),
0 != (flags & no_codecvt)
),
basic_binary_iarchive<Archive>(flags)
{
init(flags);
}
};
} // namespace archive
} // namespace boost
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
#endif // BOOST_ARCHIVE_BINARY_IARCHIVE_IMPL_HPP
#ifndef BOOST_ARCHIVE_BINARY_OARCHIVE_HPP
#define BOOST_ARCHIVE_BINARY_OARCHIVE_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// binary_oarchive.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
#include <ostream>
#include <boost/config.hpp>
#include <boost/archive/binary_oarchive_impl.hpp>
#include <boost/archive/detail/register_archive.hpp>
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable : 4511 4512)
#endif
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_oarchive :
public binary_oarchive_impl<
binary_oarchive, std::ostream::char_type, std::ostream::traits_type
>
{
public:
binary_oarchive(std::ostream & os, unsigned int flags = 0) :
binary_oarchive_impl<
binary_oarchive, std::ostream::char_type, std::ostream::traits_type
>(os, 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)
{}
};
typedef binary_oarchive naked_binary_oarchive;
} // namespace archive
} // namespace boost
// required by export
BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::binary_oarchive)
BOOST_SERIALIZATION_USE_ARRAY_OPTIMIZATION(boost::archive::binary_oarchive)
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
#endif // BOOST_ARCHIVE_BINARY_OARCHIVE_HPP
#ifndef BOOST_ARCHIVE_BINARY_OARCHIVE_IMPL_HPP
#define BOOST_ARCHIVE_BINARY_OARCHIVE_IMPL_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// binary_oarchive_impl.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
#include <ostream>
#include <boost/config.hpp>
#include <boost/serialization/pfto.hpp>
#include <boost/archive/basic_binary_oprimitive.hpp>
#include <boost/archive/basic_binary_oarchive.hpp>
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable : 4511 4512)
#endif
namespace boost {
namespace archive {
template<class Archive, class Elem, class Tr>
class binary_oarchive_impl :
public basic_binary_oprimitive<Archive, Elem, Tr>,
public basic_binary_oarchive<Archive>
{
#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
public:
#else
friend class detail::interface_oarchive<Archive>;
friend class basic_binary_oarchive<Archive>;
friend class save_access;
protected:
#endif
// note: the following should not needed - but one compiler (vc 7.1)
// fails to compile one test (test_shared_ptr) without it !!!
// make this protected so it can be called from a derived archive
template<class T>
void save_override(T & t, BOOST_PFTO int){
this->basic_binary_oarchive<Archive>::save_override(t, 0L);
}
void init(unsigned int flags) {
if(0 != (flags & no_header))
return;
#if ! defined(__MWERKS__)
this->basic_binary_oarchive<Archive>::init();
this->basic_binary_oprimitive<Archive, Elem, Tr>::init();
#else
basic_binary_oarchive<Archive>::init();
basic_binary_oprimitive<Archive, Elem, Tr>::init();
#endif
}
binary_oarchive_impl(
std::basic_streambuf<Elem, Tr> & bsb,
unsigned int flags
) :
basic_binary_oprimitive<Archive, Elem, Tr>(
bsb,
0 != (flags & no_codecvt)
),
basic_binary_oarchive<Archive>(flags)
{
init(flags);
}
binary_oarchive_impl(
std::basic_ostream<Elem, Tr> & os,
unsigned int flags
) :
basic_binary_oprimitive<Archive, Elem, Tr>(
* os.rdbuf(),
0 != (flags & no_codecvt)
),
basic_binary_oarchive<Archive>(flags)
{
init(flags);
}
};
} // namespace archive
} // namespace boost
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
#endif // BOOST_ARCHIVE_BINARY_OARCHIVE_IMPL_HPP
#ifndef BOOST_ARCHIVE_BINARY_WIARCHIVE_HPP
#define BOOST_ARCHIVE_BINARY_WIARCHIVE_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// binary_wiarchive.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
#include <boost/config.hpp>
#ifdef BOOST_NO_STD_WSTREAMBUF
#error "wide char i/o not supported on this platform"
#else
#include <istream> // wistream
#include <boost/archive/binary_iarchive_impl.hpp>
#include <boost/archive/detail/register_archive.hpp>
namespace boost {
namespace archive {
// same as binary_wiarchive below - without the shared_ptr_helper
class naked_binary_wiarchive :
public binary_iarchive_impl<
boost::archive::naked_binary_wiarchive,
std::wistream::char_type,
std::wistream::traits_type
>
{
public:
naked_binary_wiarchive(std::wistream & is, unsigned int flags = 0) :
binary_iarchive_impl<
naked_binary_wiarchive,
std::wistream::char_type,
std::wistream::traits_type
>(is, flags)
{}
naked_binary_wiarchive(std::wstreambuf & bsb, unsigned int flags = 0) :
binary_iarchive_impl<
naked_binary_wiarchive,
std::wistream::char_type,
std::wistream::traits_type
>(bsb, flags)
{}
};
} // namespace archive
} // namespace boost
// note special treatment of shared_ptr. This type needs a special
// structure associated with every archive. We created a "mix-in"
// class to provide this functionality. Since shared_ptr holds a
// special esteem in the boost library - we included it here by default.
#include <boost/archive/shared_ptr_helper.hpp>
namespace boost {
namespace archive {
class binary_wiarchive :
public binary_iarchive_impl<
binary_wiarchive, std::wistream::char_type, std::wistream::traits_type
>
{
public:
binary_wiarchive(std::wistream & is, unsigned int flags = 0) :
binary_iarchive_impl<
binary_wiarchive, std::wistream::char_type, std::wistream::traits_type
>(is, flags)
{}
binary_wiarchive(std::wstreambuf & bsb, unsigned int flags = 0) :
binary_iarchive_impl<
binary_wiarchive, std::wistream::char_type, std::wistream::traits_type
>(bsb, flags)
{}
};
} // namespace archive
} // namespace boost
// required by export
BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::binary_wiarchive)
#endif // BOOST_NO_STD_WSTREAMBUF
#endif // BOOST_ARCHIVE_BINARY_WIARCHIVE_HPP
#ifndef BOOST_ARCHIVE_BINARY_WOARCHIVE_HPP
#define BOOST_ARCHIVE_BINARY_WOARCHIVE_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// binary_woarchive.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
#include <boost/config.hpp>
#ifdef BOOST_NO_STD_WSTREAMBUF
#error "wide char i/o not supported on this platform"
#else
#include <ostream>
#include <boost/archive/binary_oarchive_impl.hpp>
#include <boost/archive/detail/register_archive.hpp>
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 :
public binary_oarchive_impl<
binary_woarchive, std::wostream::char_type, std::wostream::traits_type
>
{
public:
binary_woarchive(std::wostream & os, unsigned int flags = 0) :
binary_oarchive_impl<
binary_woarchive, std::wostream::char_type, std::wostream::traits_type
>(os, flags)
{}
binary_woarchive(std::wstreambuf & bsb, unsigned int flags = 0) :
binary_oarchive_impl<
binary_woarchive, std::wostream::char_type, std::wostream::traits_type
>(bsb, flags)
{}
};
typedef binary_woarchive naked_binary_woarchive;
} // namespace archive
} // namespace boost
// required by export
BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::binary_woarchive)
#endif // BOOST_NO_STD_WSTREAMBUF
#endif // BOOST_ARCHIVE_BINARY_WOARCHIVE_HPP
#ifndef BOOST_ARCHIVE_CODECVT_NULL_HPP
#define BOOST_ARCHIVE_CODECVT_NULL_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// codecvt_null.hpp:
// (C) Copyright 2004 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
#include <locale>
#include <cstddef> // NULL, size_t
#include <cwchar> // for mbstate_t
#include <boost/config.hpp>
#include <boost/archive/detail/auto_link_archive.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
#if defined(BOOST_NO_STDC_NAMESPACE)
namespace std {
// For STLport on WinCE, BOOST_NO_STDC_NAMESPACE can get defined if STLport is putting symbols in its own namespace.
// In the case of codecvt, however, this does not mean that codecvt is in the global namespace (it will be in STLport's namespace)
# if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
using ::codecvt;
# endif
using ::mbstate_t;
using ::size_t;
} // namespace
#endif
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable : 4511 4512)
#endif
namespace boost {
namespace archive {
template<class Ch>
class codecvt_null;
template<>
class codecvt_null<char> : public std::codecvt<char, char, std::mbstate_t>
{
virtual bool do_always_noconv() const throw() {
return true;
}
public:
explicit codecvt_null(std::size_t no_locale_manage = 0) :
std::codecvt<char, char, std::mbstate_t>(no_locale_manage)
{}
};
template<>
class codecvt_null<wchar_t> : public std::codecvt<wchar_t, char, std::mbstate_t>
{
virtual BOOST_WARCHIVE_DECL(std::codecvt_base::result)
do_out(
std::mbstate_t & state,
const wchar_t * first1,
const wchar_t * last1,
const wchar_t * & next1,
char * first2,
char * last2,
char * & next2
) const;
virtual BOOST_WARCHIVE_DECL(std::codecvt_base::result)
do_in(
std::mbstate_t & state,
const char * first1,
const char * last1,
const char * & next1,
wchar_t * first2,
wchar_t * last2,
wchar_t * & next2
) const;
virtual int do_encoding( ) const throw( ){
return sizeof(wchar_t) / sizeof(char);
}
virtual int do_max_length( ) const throw( ){
return do_encoding();
}
};
} // namespace archive
} // namespace boost
#ifdef BOOST_MSVC
# pragma warning(pop)
#endif
#include <boost/archive/detail/abi_suffix.hpp> // pop pragmas
#endif //BOOST_ARCHIVE_CODECVT_NULL_HPP
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// abi_prefix.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
#include <boost/config/abi_prefix.hpp> // must be the last header
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable : 4251 4231 4660 4275)
#endif
#if defined( __BORLANDC__ )
#pragma nopushoptwarn
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// abi_suffix.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
#include <boost/config/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
#if defined( __BORLANDC__ )
#pragma nopushoptwarn
#endif
#ifndef BOOST_ARCHIVE_SERIALIZER_MAP_HPP
#define BOOST_ARCHIVE_SERIALIZER_MAP_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// archive_serializer_map.hpp: extenstion of type_info required for
// serialization.
// (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)
// 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.
#include <boost/config.hpp>
#include <boost/archive/detail/auto_link_archive.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
namespace boost {
namespace serialization {
class extended_type_info;
} // namespace serialization
namespace archive {
namespace detail {
class basic_serializer;
template<class Archive>
class BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
archive_serializer_map {
public:
static bool insert(const basic_serializer * bs);
static void erase(const basic_serializer * bs);
static const basic_serializer * find(
const boost::serialization::extended_type_info & type_
);
};
} // namespace detail
} // namespace archive
} // namespace boost
#include <boost/archive/detail/abi_suffix.hpp> // must be the last header
#endif //BOOST_ARCHIVE_SERIALIZER_MAP_HPP
#ifndef BOOST_ARCHIVE_DETAIL_AUTO_LINK_ARCHIVE_HPP
#define BOOST_ARCHIVE_DETAIL_AUTO_LINK_ARCHIVE_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// auto_link_archive.hpp
//
// (c) Copyright Robert Ramey 2004
// Use, modification, and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See 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 ------------------------------//
#include <boost/archive/detail/decl.hpp>
#if !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_SERIALIZATION_NO_LIB) \
&& !defined(BOOST_ARCHIVE_SOURCE) && !defined(BOOST_WARCHIVE_SOURCE) \
&& !defined(BOOST_SERIALIZATION_SOURCE)
// Set the name of our library, this will get undef'ed by auto_link.hpp
// once it's done with it:
//
#define BOOST_LIB_NAME boost_serialization
//
// If we're importing code from a dll, then tell auto_link.hpp about it:
//
#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SERIALIZATION_DYN_LINK)
# define BOOST_DYN_LINK
#endif
//
// And include the header that does the work:
//
#include <boost/config/auto_link.hpp>
#endif // auto-linking disabled
#endif // BOOST_ARCHIVE_DETAIL_AUTO_LINK_ARCHIVE_HPP
#ifndef BOOST_ARCHIVE_DETAIL_AUTO_LINK_WARCHIVE_HPP
#define BOOST_ARCHIVE_DETAIL_AUTO_LINK_WARCHIVE_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// auto_link_warchive.hpp
//
// (c) Copyright Robert Ramey 2004
// Use, modification, and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See 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 ------------------------------//
#include <boost/archive/detail/decl.hpp>
#if !defined(BOOST_WARCHIVE_SOURCE) \
&& !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_SERIALIZATION_NO_LIB)
// Set the name of our library, this will get undef'ed by auto_link.hpp
// once it's done with it:
//
#define BOOST_LIB_NAME boost_wserialization
//
// If we're importing code from a dll, then tell auto_link.hpp about it:
//
#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SERIALIZATION_DYN_LINK)
# define BOOST_DYN_LINK
#endif
//
// And include the header that does the work:
//
#include <boost/config/auto_link.hpp>
#endif // auto-linking disabled
#endif // ARCHIVE_DETAIL_AUTO_LINK_ARCHIVE_HPP
#ifndef BOOST_ARCHIVE_DETAIL_BASIC_ARCHIVE_IMPL_HPP
#define BOOST_ARCHIVE_DETAIL_BASIC_ARCHIVE_IMPL_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_archive_impl.hpp:
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
// can't use this - much as I'd like to as borland doesn't support it
// #include <boost/scoped_ptr.hpp>
#include <set>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
namespace boost {
namespace serialization {
class extended_type_info;
} // namespace serialization
namespace archive {
namespace detail {
//////////////////////////////////////////////////////////////////////
class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_archive_impl
{
};
} // namespace detail
} // namespace serialization
} // namespace boost
#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
#endif //BOOST_ARCHIVE_DETAIL_BASIC_ARCHIVE_IMPL_HPP
#ifndef BOOST_ARCHIVE_DETAIL_BASIC_CONFIG_HPP
#define BOOST_ARCHIVE_DETAIL_BASIC_CONFIG_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
// basic_config.hpp ---------------------------------------------//
// (c) Copyright Robert Ramey 2004
// Use, modification, and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See 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
#include <boost/config.hpp>
#ifdef BOOST_HAS_DECLSPEC // defined in config system
// we need to import/export our code only if the user has specifically
// asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost
// libraries to be dynamically linked, or BOOST_ARCHIVE_DYN_LINK
// if they want just this one to be dynamically linked:
#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_ARCHIVE_DYN_LINK)
// export if this is our own source, otherwise import:
#ifdef BOOST_ARCHIVE_SOURCE
# define BOOST_ARCHIVE_DECL __declspec(dllexport)
#else
# define BOOST_ARCHIVE_DECL __declspec(dllimport)
#endif // BOOST_ARCHIVE_SOURCE
#endif // DYN_LINK
#endif // BOOST_HAS_DECLSPEC
//
// if BOOST_ARCHIVE_DECL isn't defined yet define it now:
#ifndef BOOST_ARCHIVE_DECL
#define BOOST_ARCHIVE_DECL
#endif
#endif // BOOST_ARCHIVE_DETAIL_BASIC_CONFIG_HPP
#ifndef BOOST_ARCHIVE_DETAIL_BASIC_IARCHIVE_HPP
#define BOOST_ARCHIVE_DETAIL_BASIC_IARCHIVE_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_iarchive.hpp:
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
// can't use this - much as I'd like to as borland doesn't support it
// #include <boost/scoped_ptr.hpp>
#include <boost/config.hpp>
#include <boost/noncopyable.hpp>
#include <boost/type_traits/broken_compiler_spec.hpp>
#include <boost/serialization/tracking_enum.hpp>
#include <boost/archive/basic_archive.hpp>
#include <boost/archive/detail/decl.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
namespace boost {
namespace serialization {
class extended_type_info;
} // namespace serialization
namespace archive {
namespace detail {
class basic_iarchive_impl;
class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iserializer;
class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer;
//////////////////////////////////////////////////////////////////////
// class basic_iarchive - read serialized objects from a input stream
class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iarchive :
private boost::noncopyable
{
friend class basic_iarchive_impl;
// hide implementation of this class to minimize header conclusion
// in client code. I couldn't used scoped pointer with borland
// boost::scoped_ptr<basic_iarchive_impl> pimpl;
basic_iarchive_impl * pimpl;
virtual void vload(version_type &t) = 0;
virtual void vload(object_id_type &t) = 0;
virtual void vload(class_id_type &t) = 0;
virtual void vload(class_id_optional_type &t) = 0;
virtual void vload(class_name_type &t) = 0;
virtual void vload(tracking_type &t) = 0;
protected:
basic_iarchive(unsigned int flags);
// account for bogus gcc warning
#if defined(__GNUC__)
virtual
#endif
~basic_iarchive();
public:
// note: NOT part of the public API.
void next_object_pointer(void *t);
void register_basic_serializer(
const basic_iserializer & bis
);
void load_object(
void *t,
const basic_iserializer & bis
);
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 & eti
)
);
// real public API starts here
void
set_library_version(library_version_type archive_library_version);
library_version_type
get_library_version() const;
unsigned int
get_flags() const;
void
reset_object_address(const void * new_address, const void * old_address);
void
delete_created_pointers();
};
} // namespace detail
} // namespace archive
} // namespace boost
// required by smart_cast for compilers not implementing
// partial template specialization
BOOST_TT_BROKEN_COMPILER_SPEC(
boost::archive::detail::basic_iarchive
)
#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
#endif //BOOST_ARCHIVE_DETAIL_BASIC_IARCHIVE_HPP
#ifndef BOOST_ARCHIVE_DETAIL_BASIC_ISERIALIZER_HPP
#define BOOST_ARCHIVE_DETAIL_BASIC_ISERIALIZER_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////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 .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
#include <cstdlib> // NULL
#include <boost/config.hpp>
#include <boost/archive/basic_archive.hpp>
#include <boost/archive/detail/decl.hpp>
#include <boost/archive/detail/basic_serializer.hpp>
#include <boost/archive/detail/auto_link_archive.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable : 4511 4512)
#endif
namespace boost {
namespace serialization {
class extended_type_info;
} // namespace serialization
// forward declarations
namespace archive {
namespace detail {
class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iarchive;
class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer;
class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iserializer :
public basic_serializer
{
private:
basic_pointer_iserializer *m_bpis;
protected:
explicit basic_iserializer(
const boost::serialization::extended_type_info & type
);
// account for bogus gcc warning
#if defined(__GNUC__)
virtual
#endif
~basic_iserializer();
public:
bool serialized_as_pointer() const {
return m_bpis != NULL;
}
void set_bpis(basic_pointer_iserializer *bpis){
m_bpis = bpis;
}
const basic_pointer_iserializer * get_bpis_ptr() const {
return m_bpis;
}
virtual void load_object_data(
basic_iarchive & ar,
void *x,
const unsigned int file_version
) const = 0;
// returns true if class_info should be saved
virtual bool class_info() const = 0 ;
// returns true if objects should be tracked
virtual bool tracking(const unsigned int) const = 0 ;
// returns class version
virtual version_type version() const = 0 ;
// returns true if this class is polymorphic
virtual bool is_polymorphic() const = 0;
virtual void destroy(/*const*/ void *address) const = 0 ;
};
} // namespae detail
} // namespace archive
} // namespace boost
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
#endif // BOOST_ARCHIVE_DETAIL_BASIC_ISERIALIZER_HPP
#ifndef BOOST_ARCHIVE_BASIC_OARCHIVE_HPP
#define BOOST_ARCHIVE_BASIC_OARCHIVE_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_oarchive.hpp:
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
#include <cstddef> // NULL
#include <boost/config.hpp>
#include <boost/noncopyable.hpp>
#include <boost/type_traits/broken_compiler_spec.hpp>
// can't use this - much as I'd like to as borland doesn't support it
// #include <boost/scoped_ptr.hpp>
#include <boost/archive/basic_archive.hpp>
#include <boost/serialization/tracking_enum.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
namespace boost {
namespace serialization {
class extended_type_info;
} // namespace serialization
namespace archive {
namespace detail {
class basic_oarchive_impl;
class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oserializer;
class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer;
//////////////////////////////////////////////////////////////////////
// class basic_oarchive - write serialized objects to an output stream
class BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oarchive :
private boost::noncopyable
{
friend class basic_oarchive_impl;
// hide implementation of this class to minimize header conclusion
// in client code. note: borland can't use scoped_ptr
//boost::scoped_ptr<basic_oarchive_impl> pimpl;
basic_oarchive_impl * pimpl;
// overload these to bracket object attributes. Used to implement
// xml archives
virtual void vsave(const version_type t) = 0;
virtual void vsave(const object_id_type t) = 0;
virtual void vsave(const object_reference_type t) = 0;
virtual void vsave(const class_id_type t) = 0;
virtual void vsave(const class_id_optional_type t) = 0;
virtual void vsave(const class_id_reference_type t) = 0;
virtual void vsave(const class_name_type & t) = 0;
virtual void vsave(const tracking_type t) = 0;
protected:
basic_oarchive(unsigned int flags = 0);
// account for bogus gcc warning
#if defined(__GNUC__)
virtual
#endif
~basic_oarchive();
public:
// note: NOT part of the public interface
void register_basic_serializer(
const basic_oserializer & bos
);
void save_object(
const void *x,
const basic_oserializer & bos
);
void save_pointer(
const void * t,
const basic_pointer_oserializer * bpos_ptr
);
void save_null_pointer(){
vsave(NULL_POINTER_TAG);
}
// real public interface starts here
void end_preamble(); // default implementation does nothing
library_version_type get_library_version() const;
unsigned int get_flags() const;
};
} // namespace detail
} // namespace archive
} // namespace boost
// required by smart_cast for compilers not implementing
// partial template specialization
BOOST_TT_BROKEN_COMPILER_SPEC(
boost::archive::detail::basic_oarchive
)
#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
#endif //BOOST_ARCHIVE_BASIC_OARCHIVE_HPP
#ifndef BOOST_SERIALIZATION_BASIC_OSERIALIZER_HPP
#define BOOST_SERIALIZATION_BASIC_OSERIALIZER_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////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 .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
#include <cstddef> // NULL
#include <boost/config.hpp>
#include <boost/noncopyable.hpp>
#include <boost/archive/basic_archive.hpp>
#include <boost/archive/detail/auto_link_archive.hpp>
#include <boost/archive/detail/basic_serializer.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable : 4511 4512)
#endif
namespace boost {
namespace serialization {
class extended_type_info;
} // namespace serialization
// forward declarations
namespace archive {
namespace detail {
class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oarchive;
class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer;
class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oserializer :
public basic_serializer
{
private:
basic_pointer_oserializer *m_bpos;
protected:
explicit basic_oserializer(
const boost::serialization::extended_type_info & type_
);
// account for bogus gcc warning
#if defined(__GNUC__)
virtual
#endif
~basic_oserializer();
public:
bool serialized_as_pointer() const {
return m_bpos != NULL;
}
void set_bpos(basic_pointer_oserializer *bpos){
m_bpos = bpos;
}
const basic_pointer_oserializer * get_bpos() const {
return m_bpos;
}
virtual void save_object_data(
basic_oarchive & ar, const void * x
) const = 0;
// returns true if class_info should be saved
virtual bool class_info() const = 0;
// returns true if objects should be tracked
virtual bool tracking(const unsigned int flags) const = 0;
// returns class version
virtual version_type version() const = 0;
// returns true if this class is polymorphic
virtual bool is_polymorphic() const = 0;
};
} // namespace detail
} // namespace serialization
} // namespace boost
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
#endif // BOOST_SERIALIZATION_BASIC_OSERIALIZER_HPP
#ifndef BOOST_ARCHIVE_BASIC_POINTER_ISERIALIZER_HPP
#define BOOST_ARCHIVE_BASIC_POINTER_ISERIALIZER_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_pointer_oserializer.hpp: extenstion of type_info required for
// serialization.
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
#include <boost/config.hpp>
#include <boost/noncopyable.hpp>
#include <boost/archive/detail/auto_link_archive.hpp>
#include <boost/archive/detail/basic_serializer.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable : 4511 4512)
#endif
namespace boost {
namespace serialization {
class extended_type_info;
} // namespace serialization
// forward declarations
namespace archive {
namespace detail {
class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iarchive;
class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iserializer;
class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer
: public basic_serializer {
protected:
explicit basic_pointer_iserializer(
const boost::serialization::extended_type_info & type_
);
// account for bogus gcc warning
#if defined(__GNUC__)
virtual
#endif
~basic_pointer_iserializer();
public:
virtual const basic_iserializer & get_basic_serializer() const = 0;
virtual void load_object_ptr(
basic_iarchive & ar,
void * & x,
const unsigned int file_version
) const = 0;
};
} // namespace detail
} // namespace archive
} // namespace boost
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
#endif // BOOST_ARCHIVE_BASIC_POINTER_ISERIALIZER_HPP
#ifndef BOOST_ARCHIVE_BASIC_POINTER_OSERIALIZER_HPP
#define BOOST_ARCHIVE_BASIC_POINTER_OSERIALIZER_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_pointer_oserializer.hpp: extenstion of type_info required for
// serialization.
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
#include <boost/config.hpp>
#include <boost/noncopyable.hpp>
#include <boost/archive/detail/auto_link_archive.hpp>
#include <boost/archive/detail/basic_serializer.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable : 4511 4512)
#endif
namespace boost {
namespace serialization {
class extended_type_info;
} // namespace serialization
namespace archive {
namespace detail {
class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oarchive;
class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oserializer;
class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer :
public basic_serializer
{
protected:
explicit basic_pointer_oserializer(
const boost::serialization::extended_type_info & type_
);
public:
// account for bogus gcc warning
#if defined(__GNUC__)
virtual
#endif
~basic_pointer_oserializer();
virtual const basic_oserializer & get_basic_serializer() const = 0;
virtual void save_object_ptr(
basic_oarchive & ar,
const void * x
) const = 0;
};
} // namespace detail
} // namespace archive
} // namespace boost
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
#endif // BOOST_ARCHIVE_BASIC_POINTER_OSERIALIZER_HPP
#ifndef BOOST_ARCHIVE_BASIC_SERIALIZER_HPP
#define BOOST_ARCHIVE_BASIC_SERIALIZER_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////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 .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
#include <boost/assert.hpp>
#include <cstddef> // NULL
#include <boost/noncopyable.hpp>
#include <boost/config.hpp>
#include <boost/serialization/extended_type_info.hpp>
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable : 4511 4512)
#endif
namespace boost {
namespace archive {
namespace detail {
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)
{
BOOST_ASSERT(NULL != & eti);
}
public:
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)
// leave this here as a reminder not to do this!
// return & lhs.get_eti() < & rhs.get_eti();
return get_eti() < rhs.get_eti();
}
const char * get_debug_info() const {
return m_eti->get_debug_info();
}
const boost::serialization::extended_type_info & get_eti() const {
return * m_eti;
}
};
class basic_serializer_arg : public basic_serializer {
public:
basic_serializer_arg(const serialization::extended_type_info & eti) :
basic_serializer(eti)
{}
};
} // namespace detail
} // namespace archive
} // namespace boost
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
#endif // BOOST_ARCHIVE_BASIC_SERIALIZER_HPP
#ifndef BOOST_SERIALIZER_MAP_HPP
#define BOOST_SERIALIZER_MAP_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////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 .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
#include <set>
#include <boost/config.hpp>
#include <boost/noncopyable.hpp>
#include <boost/archive/detail/auto_link_archive.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
namespace boost {
namespace serialization {
class extended_type_info;
}
namespace archive {
namespace detail {
class basic_serializer;
class BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
basic_serializer_map : public
boost::noncopyable
{
struct type_info_pointer_compare
{
bool operator()(
const basic_serializer * lhs, const basic_serializer * rhs
) const ;
};
typedef std::set<
const basic_serializer *,
type_info_pointer_compare
> map_type;
map_type m_map;
public:
bool insert(const basic_serializer * bs);
void erase(const basic_serializer * bs);
const basic_serializer * find(
const boost::serialization::extended_type_info & type_
) const;
private:
// cw 8.3 requires this
basic_serializer_map& operator=(basic_serializer_map const&);
};
} // namespace detail
} // namespace archive
} // namespace boost
#include <boost/archive/detail/abi_suffix.hpp> // must be the last header
#endif // BOOST_SERIALIZER_MAP_HPP
#ifndef BOOST_ARCHIVE_DETAIL_CHECK_HPP
#define BOOST_ARCHIVE_DETAIL_CHECK_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#pragma inline_depth(511)
#pragma inline_recursion(on)
#endif
#if defined(__MWERKS__)
#pragma inline_depth(511)
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// check.hpp: interface for serialization system.
// (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)
// See http://www.boost.org for updates, documentation, and revision history.
#include <boost/config.hpp>
#include <boost/static_assert.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/or.hpp>
#include <boost/mpl/equal_to.hpp>
#include <boost/mpl/int.hpp>
#include <boost/mpl/not.hpp>
#include <boost/mpl/greater.hpp>
#include <boost/mpl/assert.hpp>
#include <boost/serialization/static_warning.hpp>
#include <boost/serialization/version.hpp>
#include <boost/serialization/level.hpp>
#include <boost/serialization/tracking.hpp>
#include <boost/serialization/wrapper.hpp>
namespace boost {
namespace archive {
namespace detail {
// checks for objects
template<class T>
inline void check_object_level(){
typedef
BOOST_DEDUCED_TYPENAME mpl::greater_equal<
serialization::implementation_level< T >,
mpl::int_<serialization::primitive_type>
>::type typex;
// trap attempts to serialize objects marked
// not_serializable
BOOST_STATIC_ASSERT(typex::value);
}
template<class T>
inline void check_object_versioning(){
typedef
BOOST_DEDUCED_TYPENAME mpl::or_<
BOOST_DEDUCED_TYPENAME mpl::greater<
serialization::implementation_level< T >,
mpl::int_<serialization::object_serializable>
>,
BOOST_DEDUCED_TYPENAME mpl::equal_to<
serialization::version< T >,
mpl::int_<0>
>
> typex;
// trap attempts to serialize with objects that don't
// save class information in the archive with versioning.
BOOST_STATIC_ASSERT(typex::value);
}
template<class T>
inline void check_object_tracking(){
// presume it has already been determined that
// T is not a const
BOOST_STATIC_ASSERT(! boost::is_const< T >::value);
typedef BOOST_DEDUCED_TYPENAME mpl::equal_to<
serialization::tracking_level< T >,
mpl::int_<serialization::track_never>
>::type typex;
// 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
// "rationale" section of the documenation
// for motivation for this checking.
BOOST_STATIC_WARNING(typex::value);
}
// checks for pointers
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
BOOST_DEDUCED_TYPENAME mpl::or_<
BOOST_DEDUCED_TYPENAME mpl::greater<
serialization::implementation_level< T >,
mpl::int_<serialization::object_serializable>
>,
BOOST_DEDUCED_TYPENAME mpl::not_<
BOOST_DEDUCED_TYPENAME mpl::equal_to<
serialization::tracking_level< T >,
mpl::int_<serialization::track_selectively>
>
>
> typex;
// Address the following when serializing to a pointer:
// a) This type doesn't save class information in the
// archive. That is, the serialization trait implementation
// level <= object_serializable.
// b) Tracking for this type is set to "track selectively"
// 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
// 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
// tracking or implementation level traits - or not
// serializing via a pointer.
BOOST_STATIC_WARNING(typex::value);
}
template<class T>
void inline check_pointer_tracking(){
typedef BOOST_DEDUCED_TYPENAME mpl::greater<
serialization::tracking_level< T >,
mpl::int_<serialization::track_never>
>::type typex;
// serializing an object of a type marked "track_never" through a pointer
// could result in creating more objects than were saved!
BOOST_STATIC_WARNING(typex::value);
}
template<class T>
inline void check_const_loading(){
typedef
BOOST_DEDUCED_TYPENAME mpl::or_<
BOOST_DEDUCED_TYPENAME boost::serialization::is_wrapper< T >,
BOOST_DEDUCED_TYPENAME mpl::not_<
BOOST_DEDUCED_TYPENAME boost::is_const< T >
>
>::type typex;
// cannot load data into a "const" object unless it's a
// wrapper around some other non-const object.
BOOST_STATIC_ASSERT(typex::value);
}
} // detail
} // archive
} // boost
#endif // BOOST_ARCHIVE_DETAIL_CHECK_HPP
#ifndef BOOST_ARCHIVE_DETAIL_COMMON_IARCHIVE_HPP
#define BOOST_ARCHIVE_DETAIL_COMMON_IARCHIVE_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// common_iarchive.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
#include <boost/config.hpp>
#include <boost/archive/detail/basic_iarchive.hpp>
#include <boost/archive/detail/basic_pointer_iserializer.hpp>
#include <boost/archive/detail/interface_iarchive.hpp>
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable : 4511 4512)
#endif
namespace boost {
namespace archive {
namespace detail {
class extended_type_info;
// note: referred to as Curiously Recurring Template Patter (CRTP)
template<class Archive>
class common_iarchive :
public basic_iarchive,
public interface_iarchive<Archive>
{
friend class interface_iarchive<Archive>;
private:
virtual void vload(version_type & t){
* this->This() >> t;
}
virtual void vload(object_id_type & t){
* this->This() >> t;
}
virtual void vload(class_id_type & t){
* this->This() >> t;
}
virtual void vload(class_id_optional_type & t){
* this->This() >> t;
}
virtual void vload(tracking_type & t){
* this->This() >> t;
}
virtual void vload(class_name_type &s){
* this->This() >> s;
}
protected:
// default processing - invoke serialization library
template<class T>
void load_override(T & t, BOOST_PFTO int){
archive::load(* this->This(), t);
}
// default implementations of functions which emit start/end tags for
// archive types that require them.
void load_start(const char * /*name*/){}
void load_end(const char * /*name*/){}
// default archive initialization
common_iarchive(unsigned int flags = 0) :
basic_iarchive(flags),
interface_iarchive<Archive>()
{}
};
} // namespace detail
} // namespace archive
} // namespace boost
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
#endif // BOOST_ARCHIVE_DETAIL_COMMON_IARCHIVE_HPP
#ifndef BOOST_ARCHIVE_DETAIL_COMMON_OARCHIVE_HPP
#define BOOST_ARCHIVE_DETAIL_COMMON_OARCHIVE_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// common_oarchive.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
#include <boost/config.hpp>
#include <boost/archive/detail/basic_oarchive.hpp>
#include <boost/archive/detail/interface_oarchive.hpp>
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable : 4511 4512)
#endif
namespace boost {
namespace archive {
namespace detail {
// note: referred to as Curiously Recurring Template Patter (CRTP)
template<class Archive>
class common_oarchive :
public basic_oarchive,
public interface_oarchive<Archive>
{
friend class interface_oarchive<Archive>;
private:
virtual void vsave(const version_type t){
* this->This() << t;
}
virtual void vsave(const object_id_type t){
* this->This() << t;
}
virtual void vsave(const object_reference_type t){
* this->This() << t;
}
virtual void vsave(const class_id_type t){
* this->This() << t;
}
virtual void vsave(const class_id_reference_type t){
* this->This() << t;
}
virtual void vsave(const class_id_optional_type t){
* this->This() << t;
}
virtual void vsave(const class_name_type & t){
* this->This() << t;
}
virtual void vsave(const tracking_type t){
* this->This() << t;
}
protected:
// default processing - invoke serialization library
template<class T>
void save_override(T & t, BOOST_PFTO int){
archive::save(* this->This(), t);
}
void save_start(const char * /*name*/){}
void save_end(const char * /*name*/){}
common_oarchive(unsigned int flags = 0) :
basic_oarchive(flags),
interface_oarchive<Archive>()
{}
};
} // namespace detail
} // namespace archive
} // namespace boost
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
#endif // BOOST_ARCHIVE_DETAIL_COMMON_OARCHIVE_HPP
#ifndef BOOST_ARCHIVE_DETAIL_DECL_HPP
#define BOOST_ARCHIVE_DETAIL_DECL_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2///////// 3/////////4/////////5/////////6/////////7/////////8
// decl.hpp
//
// (c) Copyright Robert Ramey 2004
// Use, modification, and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See 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
#include <boost/config.hpp>
#include <boost/preprocessor/facilities/empty.hpp>
#if defined(BOOST_HAS_DECLSPEC)
#if (defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SERIALIZATION_DYN_LINK))
#if defined(BOOST_ARCHIVE_SOURCE)
#if defined(__BORLANDC__)
#define BOOST_ARCHIVE_DECL(T) T __export
#define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) T __export
#else
#define BOOST_ARCHIVE_DECL(T) __declspec(dllexport) T
#define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) __declspec(dllexport) T
#endif
#else
#if defined(__BORLANDC__)
#define BOOST_ARCHIVE_DECL(T) T __import
#else
#define BOOST_ARCHIVE_DECL(T) __declspec(dllimport) T
#endif
#endif
#if defined(BOOST_WARCHIVE_SOURCE)
#if defined(__BORLANDC__)
#define BOOST_WARCHIVE_DECL(T) T __export
#define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) T __export
#else
#define BOOST_WARCHIVE_DECL(T) __declspec(dllexport) T
#define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) __declspec(dllexport) T
#endif
#else
#if defined(__BORLANDC__)
#define BOOST_WARCHIVE_DECL(T) T __import
#else
#define BOOST_WARCHIVE_DECL(T) __declspec(dllimport) T
#endif
#endif
#if !defined(BOOST_WARCHIVE_SOURCE) && !defined(BOOST_ARCHIVE_SOURCE)
#if defined(__BORLANDC__)
#define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) T __import
#else
#define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) __declspec(dllimport) T
#endif
#endif
#endif
#endif // BOOST_HAS_DECLSPEC
#if ! defined(BOOST_ARCHIVE_DECL)
#define BOOST_ARCHIVE_DECL(T) T
#endif
#if ! defined(BOOST_WARCHIVE_DECL)
#define BOOST_WARCHIVE_DECL(T) T
#endif
#if ! defined(BOOST_ARCHIVE_OR_WARCHIVE_DECL)
#define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) T
#endif
#endif // BOOST_ARCHIVE_DETAIL_DECL_HPP
#ifndef BOOST_ARCHIVE_DETAIL_INTERFACE_IARCHIVE_HPP
#define BOOST_ARCHIVE_DETAIL_INTERFACE_IARCHIVE_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// interface_iarchive.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
#include <cstddef> // NULL
#include <boost/cstdint.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/archive/detail/auto_link_archive.hpp>
#include <boost/archive/detail/iserializer.hpp>
#include <boost/serialization/singleton.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
namespace boost {
namespace archive {
namespace detail {
class BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer;
template<class Archive>
class interface_iarchive
{
protected:
interface_iarchive(){};
public:
/////////////////////////////////////////////////////////
// archive public interface
typedef mpl::bool_<true> is_loading;
typedef mpl::bool_<false> is_saving;
// return a pointer to the most derived class
Archive * This(){
return static_cast<Archive *>(this);
}
template<class T>
const basic_pointer_iserializer *
register_type(T * = NULL){
const basic_pointer_iserializer & bpis =
boost::serialization::singleton<
pointer_iserializer<Archive, T>
>::get_const_instance();
this->This()->register_basic_serializer(bpis.get_basic_serializer());
return & bpis;
}
template<class T>
Archive & operator>>(T & t){
this->This()->load_override(t, 0);
return * this->This();
}
// the & operator
template<class T>
Archive & operator&(T & t){
return *(this->This()) >> t;
}
};
} // namespace detail
} // namespace archive
} // namespace boost
#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
#endif // BOOST_ARCHIVE_DETAIL_INTERFACE_IARCHIVE_HPP
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
// Copyright (c) 2001 Ronald Garcia, Indiana University (garcia@osl.iu.edu)
// Andrew Lumsdaine, Indiana University (lums@osl.iu.edu).
// Distributed under 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)
#ifndef BOOST_ARCHIVE_DETAIL_UTF8_CODECVT_FACET_HPP
#define BOOST_ARCHIVE_DETAIL_UTF8_CODECVT_FACET_HPP
#define BOOST_UTF8_BEGIN_NAMESPACE \
namespace boost { namespace archive { namespace detail {
#define BOOST_UTF8_DECL
#define BOOST_UTF8_END_NAMESPACE }}}
#include <boost/detail/utf8_codecvt_facet.hpp>
#undef BOOST_UTF8_END_NAMESPACE
#undef BOOST_UTF8_DECL
#undef BOOST_UTF8_BEGIN_NAMESPACE
#endif // BOOST_ARCHIVE_DETAIL_UTF8_CODECVT_FACET_HPP
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment