Compare commits

...

125 Commits

Author SHA1 Message Date
Peter Dimov 0ca603daf9 Do not define BOOST_SERIALIZATION_SOURCE in CMakeLists.txt 2021-06-09 19:01:03 +03:00
Peter Dimov b42c138206 Only install under CMake 3.13 or later, otherwise dependencies have no install support 2021-05-29 01:06:18 +03:00
Peter Dimov f13c963569 Fix boost_install call to install both targets 2021-05-29 01:06:05 +03:00
Peter Dimov ff6cc13040 Add CMakeLists.txt 2021-05-29 01:05:48 +03:00
Robert Ramey bcc0bfe073 squash merge all changes in develop into master 2021-05-02 18:31:57 -07:00
Robert Ramey 3ab4da85f2 squash merge into next boost release 2021-02-22 16:33:33 -08:00
Robert Ramey 07de314975 merge into next boost release 2020-11-17 22:18:38 -08:00
Robert Ramey ed44fcd268 changes made in the hope of eliminated “stable” error for functions previously defined in the header. Moved those function to codecvt_null.cpp 2020-07-11 12:02:39 -07:00
Robert Ramey 17fb465af1 Squash-merge develop 2020-07-03 17:11:10 -07:00
EugeneZelenko 753c157497 Use BOOST_OVERRIDE to fix GCC -Wsuggest-override and Clang-tidy modernize-use-override warnings. (#200)
Fix Clang -Wextra-semi and Clang-tidy modernize-redundant-void-arg and readability-redundant-control-flow warnings.
Also fix some misspellings in comments.
2020-05-30 12:37:53 -07:00
Edward Diener 0eec916ab2 Changes for Embarcadero C++ clang-based compilers, targeting Boost 1.74 (#198)
* Change __BORLANDC__ to BOOST_BORLANDC, which is defined in Boost config for the Embarcadero non-clang-based compilers.

* More changes of __BORLANDC__ to BOOST_BORLANDC, which is defined in Boost config for the Embarcadero non-clang-based compilers.

* Embarcadero C++ clang-based compilers use chdir instead of _chdir on Windows. This was reported to them as a bug.

* Revert "Embarcadero C++ clang-based compilers use chdir instead of _chdir on Windows. This was reported to them as a bug."

This reverts commit d00a21f736.

* Put back the chdir definition change to exclude Embarcadero clang-based compilers.
2020-04-21 21:37:34 -07:00
Robert Ramey 88094d44b6 Merge pull request #191 from joaquintides/patch-1
avoided misleading indentation warning
2020-03-03 20:16:59 -08:00
joaquintides 53047f6356 updated to option 1) as requested by Robert 2020-03-03 13:21:46 +01:00
joaquintides 7e0708ea5d avoided misleading indentation warning
Clang 10.0 says:

`../boost/archive/basic_text_oprimitive.hpp:169:13: warning: misleading indentation;
statement is not part of the previous 'if' [-Wmisleading-indentation]`

(see https://www.boost.org/development/tests/develop/output/teeks99-dkr-dc10-2a-multi_index-clang-linux-10~c++2a-warnings.html#test_serialization)
2020-02-24 09:28:20 +01:00
Robert Ramey d0509483ed fixing template parameter in boost unordered map
bumping archive library version.
2020-01-21 14:14:05 -08:00
Robert Ramey d95a1df37a moved archive init call to most derived archive class so that we avoid down casting while in a ctor . The previous behavior was undefined behavior and emits errors when the address sanitizer is enabled. 2020-01-15 23:20:07 -08:00
Robert Ramey eac306d8a6 fixing template parameters for hash_map - used for older compilers. 2020-01-15 15:16:36 -08:00
Robert Ramey 998e6c3d59 corrected template parameter passing for hashed/unordered collections. 2020-01-15 13:18:44 -08:00
Robert Ramey b22ffc63da Fixed some MACRO constants to be consistent with Boost Guidelines. 2019-12-16 06:43:53 -08:00
Robert Ramey 489eef0e17 Merge pull request #184 from kanje/develop
Fix base class offset calculation in void_cast.hpp.
2019-12-12 08:51:43 -08:00
Antons Jeļkins 443dea34ab Fix base class offset calculation in void_cast.hpp.
The current approach generates warnings with ASAN and UBSAN as it features
a magic address which does not hold an object. This change addresses this
issue. The new code produces the same assembly and does not cause any
warnings.

Example:

==72613==ERROR: AddressSanitizer: SEGV on unknown address 0x0000000ffff8
               (pc 0x0000004012d9 bp 0x7ffd5b3eecf0 sp 0x7ffd5b3eece0 T0)
2019-12-10 14:02:05 +01:00
Robert Ramey 76df6df23f Merge branch 'develop' of https://github.com/boostorg/serialization into develop 2019-10-20 14:10:14 -07:00
Robert Ramey 643cce2a9c new test - needs refinement - for pointer adjustment by reset object address 2019-10-20 14:10:04 -07:00
Robert Ramey 098019d074 fixed subtle bug in reset_object_address. Turns out that the address anything loaded as a pointer should not be altered. 2019-10-20 14:08:13 -07:00
Robert Ramey ece3187e24 Merge pull request #181 from HDembinski/strip_trailing_ws
stripping white space
2019-10-20 14:05:54 -07:00
Hans Dembinski c813db7ad7 stripping white space 2019-10-20 22:49:29 +02:00
Robert Ramey f04a8cbe90 shortened name of test in the hopes it fix a test failure one windows with gcc - minnow
removed last references to pfto in documentation
2019-10-11 16:07:10 -07:00
Robert Ramey 0f0409a2ad corrections to last updates.
nvp and make_nvp now back in serialization namespace
corrected removal of array wrapper from array types.
2019-10-05 11:14:56 -07:00
Robert Ramey 6bd667a5bb Merge pull request #172 from TaWeiTu/develop
"reference binding to null pointer" results in an undefined behaviour
2019-09-29 07:53:23 -07:00
Robert Ramey 5dd938f4f1 Merge pull request #173 from glenfe/develop
Use boost::nvp from Boost.Core
2019-09-27 21:37:22 -07:00
Glen Fernandes 4ed898b1d3 Use boost::nvp from Boost.Core 2019-09-27 23:07:06 -04:00
Robert Ramey 7300ff02b9 overlooked files from last commit 2019-09-27 18:19:26 -07:00
Robert Ramey fd8186018b moved nvp into boost core in the hope of curtailing the dependency chain for boost libraries which declare serialization but don’t invoke it. 2019-09-27 15:37:42 -07:00
Robert Ramey c32a663c99 Initial cut on moving declaration/definition of nvp to boost core. 2019-09-15 15:21:55 -07:00
TaWeiTu 48f0844fda reference binding to null pointer is an undefined behaviour 2019-09-02 05:58:06 +08:00
Robert Ramey 84e9ab57a7 Merge pull request #151 from HDembinski/fix_warning
fix for warning regarding use of strerror
2019-03-20 08:17:23 -07:00
Hans Dembinski 0034b070bd fix for warning regarding use of strerror 2019-03-20 08:42:59 +01:00
Robert Ramey 1b11637b1c Merge pull request #146 from MarcelRaad/extra_semi
Fix -Wextra-semi clang warning
2019-03-14 10:19:00 -07:00
Robert Ramey 7d79dc7146 last minute fixes requested by users. Mostly to avoid warnings 2019-03-02 09:39:18 -08:00
Marcel Raad 8d4b2136d2 Fix -Wextra-semi clang warning
Remove superfluous semicolon.
2019-02-25 11:52:18 +01:00
Robert Ramey 7adafcbf01 final? fix for dll tests. Due to quirk in boost build, we can run these tests with static versions of boost. 2018-12-27 09:51:33 -08:00
Robert Ramey 669d266ec7 complete corrections for import/export/visitbility 2018-12-26 13:49:33 -08:00
Robert Ramey 361ed95f4c suppress static library tests for test_dll_exported. B2 generated invalid command line in this case. 2018-12-26 11:40:20 -08:00
Robert Ramey b6d26f9a58 Merge branch 'develop' of https://github.com/boostorg/serialization into develop 2018-12-24 11:19:24 -08:00
Robert Ramey cd8a989be4 update Appveyor files 2018-12-24 11:18:54 -08:00
Robert Ramey ee50f8c911 adjustments to fix “exported” tests. 2018-12-24 08:52:50 -08:00
Robert Ramey d526c0f80e Merge pull request #125 from Kojoley/use-endian-macros-from-predef
Use endian macros from Predef
2018-12-20 08:58:20 -08:00
Robert Ramey a61f5d2563 clean up tests using export/import 2018-12-19 14:40:55 -08:00
Robert Ramey 03c6d23ce8 changes to support more correct import/export for DLL based tests 2018-12-18 13:05:25 -08:00
Robert Ramey 9c770604dc Merge pull request #140 from Lastique/use_uncaught_exceptions
Use uncaught_exceptions from Boost.Core to avoid C++17 warnings
2018-12-17 18:08:52 -08:00
Andrey Semashev b78cd872ec Use uncaught_exceptions from Boost.Core to avoid C++17 warnings.
In C++17, std::uncaught_exception is deprecated in favor of
std::uncaught_exceptions. Use portable uncaught_exceptions implementation
from Boost.Core, which is also available for C++03.
2018-12-17 18:42:53 +03:00
Robert Ramey 6e3d1a89f7 trying to fix visibility issue for imported symbols 2018-12-13 20:44:44 -08:00
Robert Ramey 854dd12473 correction for import/export base and derived types 2018-12-13 10:42:38 -08:00
Robert Ramey f01148e421 minor adjustments to suppress assertions on free psd unix platforms. It seems that this platform doesn't guarantee that static variables aren't destroyed in reverse order of creation. 2018-11-19 10:54:46 -08:00
Robert Ramey cc2a996384 Added in more singleton tests 2018-11-17 13:21:31 -08:00
Robert Ramey 9e98df0a0d Corrected various tests.
improved build under CMake and B2
passes all tests on clang 03 and g++ 6.2
2018-11-14 14:27:46 -08:00
Robert Ramey feb53726e1 improvements to make test_dll_exported and test_exported function as desired. 2018-11-11 18:33:06 -08:00
Robert Ramey b97bcdfeb3 adjustments to address visibility/import/export issues on windows gcc platforms 2018-11-11 04:56:11 -08:00
Robert Ramey 723bd44abd corrections to address issues on test_dll_exported on MSVC platforms 2018-11-09 11:47:27 -08:00
Robert Ramey f297d80d6e Fixed errors in singleton
removed superfluous comma to avoid warning
2018-11-08 21:07:09 -08:00
Robert Ramey efcd46eb1b Just discovered that registering type via EXPORT doesn't work with polymorphic archives !!!
Corrected this.
2018-11-03 06:23:22 -07:00
Robert Ramey 5778b99fd2 fix typo in Jamfile.v2 which breaks Appveyor 2018-10-30 13:17:39 -07:00
Robert Ramey c5549b2d6b adjusted tests to properly handle visibility in DLLS
improvements in CMake files
2018-10-30 02:29:15 -07:00
Robert Ramey 237ff81ac6 added test files for test_mult_shared_lib 2018-10-26 10:42:11 -07:00
Robert Ramey 65f05dc209 Fix of test_dll_exported by altering syntax to accommodate "visibility=hidden"
update for CMakeList.txt files for serialization library - still pending but I'm the only one who uses it.
inclusion of "test" from Alexander Gruber - temporary
2018-10-26 09:56:23 -07:00
Robert Ramey 86996d0637 Merge commit '5c19264436cb257041a9f63f245186bea4490edf' into develop 2018-10-26 09:28:18 -07:00
Peter Dimov 5c19264436 Add clang++-libc++, xcode10, link=static,shared to Travis 2018-10-21 01:19:56 +03:00
Robert Ramey af46ac2da3 removed superfluous header 2018-10-19 14:22:20 -07:00
Robert Ramey e1893dd28c made base grammar visible
made changes in singleton.hpp to address running issue regarding test_dll_exported
fixed integer overflow so that UBAN tests pass
2018-10-11 22:03:51 -07:00
Nikita Kniazev da9c3059f2 Use endian macros from Predef
The `boost/detail/endian.hpp` header is deprecated.
2018-10-04 20:33:10 +03:00
Robert Ramey 28c333ce65 Merge pull request #115 from jmairboeck/fix-trac7240
fix Trac issue 7240 by applying the patch from there

Looks OK to me.
2018-10-03 11:28:31 -07:00
Robert Ramey 5edc5acf27 Merge pull request #124 from Kojoley/tests-fix-catch-by-value
Fixed catch by value warnings in tests
2018-10-03 11:26:06 -07:00
Nikita Kniazev c5120dfd11 Fixed catch by value warnings in tests
warning: catching polymorphic type 'class boost::archive::archive_exception' by value [-Wcatch-value=]
2018-10-02 17:08:10 +03:00
Joachim Mairboeck 87c50e75fa fix Trac issue 7240 by applying the patch from there 2018-08-29 10:16:43 +02:00
Robert Ramey 738695b707 correct msvc version number 2018-05-23 13:28:56 -07:00
Robert Ramey 08455abe23 Reverse previous commit.
Export base class.
Ignore windows warning that base class isn't exported.
2018-05-08 14:08:25 -07:00
Robert Ramey 90e22bb58b adjustments to test_dll_exported to make it pass tests 2018-05-07 10:03:07 -07:00
Robert Ramey 449e659de3 adjust workaround for msvc problem 2018-05-05 13:02:47 -07:00
Robert Ramey 4986fc2097 moved level trait for variant to the correct namespace 2018-05-04 23:30:02 -07:00
Robert Ramey 52cbea8c16 fix gcc warning
bump library version number to 17
2018-05-03 22:56:07 -07:00
Robert Ramey ed435d5a31 Address PR s and issues
a) eliminate warning on narrowing of int to char in unescape
b) eliminate warning on cast of version types
c) fix error which appears when serializing collections of boost::variant
2018-05-03 15:20:08 -07:00
Robert Ramey a362331b93 Merge pull request #106 from res2k/feature/fix-run-tests
Fix tests
2018-04-30 19:14:28 -07:00
Frank Richter b430b6d674 Disable 'test_dll_plugin' - needs more work before it can pass 2018-05-01 01:00:06 +02:00
Frank Richter 2792359662 util/test: Fixes for rules signature change 2018-04-30 23:57:20 +02:00
Frank Richter 7a078733a1 Merge changes from upstream 2018-04-30 22:37:49 +02:00
Robert Ramey 75c224103d Merge pull request #92 from oxygene/patch-1
Use unique header guards for boost_array.hpp
2018-04-30 13:32:55 -07:00
Robert Ramey 297b7c3b52 Merge pull request #94 from res2k/travis-tweaks
Various Appveyor & Travis improvements
2018-04-30 13:30:27 -07:00
Robert Ramey 8ca532a4d5 include test for singleton
update Jamfile
2018-04-30 12:46:23 -07:00
Frank Richter 226af45461 Travis: Enable ccache 2018-04-30 17:25:20 +02:00
Frank Richter b4b8cbab00 Travis: Add at least some tests with static linking 2018-02-07 14:38:59 +01:00
Christof Krüger 3c438dfddb Use unique header guards for boost_array.hpp
Previously boost_array.hpp used the same header guards as array.hpp.

Fixes https://svn.boost.org/trac10/ticket/13437#ticket.
2018-02-06 01:58:38 +01:00
Frank Richter 2b61be1285 Produce distinct jobs for static, shared tests 2018-01-31 09:25:40 +01:00
Frank Richter d3bb8d0e50 Appveyor VMs provide two cores, use them 2018-01-31 08:19:18 +01:00
Frank Richter 89dc4a26b1 Add MSVC to Appveyor build matrix 2018-01-30 13:43:42 +01:00
Frank Richter 6477759341 Try to tweak void_cast to work around ICE on MinGW 2018-01-30 12:45:08 +01:00
Frank Richter 69d1b26937 Pull container_hash git submodule
Needed after move from functional.
2018-01-30 12:44:35 +01:00
Frank Richter bc0279429b Merge upstream changes 2018-01-30 11:52:31 +01:00
Robert Ramey b73329fe45 Merge pull request #81 from masterleinad/improve_appveyor
Improve appveyor setup for MinGW
2017-12-06 09:21:19 -08:00
Daniel Arndt 63b6ffa765 Improve appveyor setup 2017-12-02 13:50:01 +01:00
Robert Ramey 24024425f1 fix failing tests 2017-11-28 10:56:37 -08:00
Robert Ramey 4ee479a03e corrections for dll linkage and testing 2017-11-24 15:51:46 -08:00
Robert Ramey 8378c75f32 corrections to singleton - tested on on all platforms 2017-11-23 12:05:46 -08:00
Robert Ramey 7d216b4761 corrected singleton and ran test_dll_exported on unix,mingv,windows and osx 2017-11-22 21:53:19 -08:00
Robert Ramey f94da2c724 correct error detected in MSVC regarding singleton initialization 2017-11-13 14:06:10 -08:00
Robert Ramey fea1826e06 fix for singleton. This simplifies the visibility for the singleton class.
tested on my own machine for Clang/OSX, gcc on ubuntu and on mingw
2017-11-11 12:14:30 -08:00
Robert Ramey 8eb388fe39 Merge branch 'develop' of https://github.com/boostorg/serialization into develop 2017-11-09 12:54:34 -08:00
Robert Ramey 8bbcca5341 fixed addressor fiasco
simplified singleton visibility
Jamfile
added boost/system to requirements
corrected inclusion tests to include link to serialization library
2017-11-09 12:54:10 -08:00
Peter Dimov 0676016ce3 Simplify .travis.yml 2017-11-09 01:46:54 +02:00
Peter Dimov be2846e2d1 Update .travis.yml 2017-11-09 01:06:08 +02:00
Robert Ramey b87dc62e69 alter visibility to try to address failure to link "common" archive for clang-gnu-linux 3.0 compilers. 2017-11-08 12:08:21 -08:00
Robert Ramey 2c2a4a53d0 add missing test_inclusion2.cpp 2017-11-08 11:26:20 -08:00
Robert Ramey eb35302b76 altered visibility settings for polymorphic_base. Hopefully this should fix text failures for test_dll_exported 2017-11-08 11:03:14 -08:00
Robert Ramey a2a8890dfb fix overload of & when taking address 2017-11-08 08:31:04 -08:00
Robert Ramey f4be906175 Merge branch 'develop' of https://github.com/boostorg/serialization into develop 2017-11-07 15:24:57 -08:00
Robert Ramey 2e8e91a5cc Merge pull request #74 from masterleinad/avoid_nullptr_dereferencing
Avoid dereferencing a nullptr
2017-11-07 15:24:45 -08:00
Robert Ramey 089d57b855 Merge branch 'develop' of https://github.com/boostorg/serialization into develop 2017-11-07 15:08:21 -08:00
Robert Ramey 0ba417dd1c addressed user complaint and rolled back change which called desstructor 2017-11-07 15:08:12 -08:00
Robert Ramey 9e90f233a1 Merge pull request #73 from masterleinad/fix_memory_leaks_tests_1
Fix some memory leaks in tests
2017-11-07 15:04:47 -08:00
Daniel Arndt 9e7cd200e7 Avoid dereferencing a nullptr 2017-11-03 01:02:00 +01:00
Daniel Arndt d327f90bd8 Fix some memory leaks in tests 2017-11-03 00:57:02 +01:00
Robert Ramey 8d0b0db5de alter macro definition to avoid undefined behavior 2017-10-31 16:03:37 -07:00
Robert Ramey daf20da064 address boost serialization test matrix errors
export of test_polymorphic_a
cland/gcc earlier versions don't find private virtual function implementations
2017-10-23 10:48:36 -07:00
Robert Ramey 71851223c3 changes to correct problems found on mingw and cygwin tests 2017-10-22 13:32:38 -07:00
Robert Ramey 64dc620992 remove dependency on <codecvt>
This header seems to have errors in some environments.
It has been deprecated by the C++ committe.
For these reasons, we'll rely solely on Ron Garcia's code convert facet for utf.
2017-10-17 10:55:47 -07:00
Robert Ramey 40314f94df try to fix wide character archives by making ~codecvt_null() non virtual 2017-10-11 14:13:53 -07:00
408 changed files with 4935 additions and 3332 deletions
+28
View File
@@ -0,0 +1,28 @@
# Use, modification, and distribution are
# subject to the Boost Software License, Version 1.0. (See accompanying
# file LICENSE.txt)
#
# Copyright Rene Rivera 2020.
# For Drone CI we use the Starlark scripting language to reduce duplication.
# As the yaml syntax for Drone CI is rather limited.
#
#
globalenv={}
linuxglobalimage="cppalliance/droneubuntu1604:1"
windowsglobalimage="cppalliance/dronevs2019"
def main(ctx):
return [
linux_cxx("TOOLSET=gcc LINK=static,shared Job 0", "g++", packages="", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'LINK': 'static,shared', 'TRAVIS_COMPILER': 'g++', 'DRONE_JOB_UUID': 'b6589fc6ab'}, globalenv=globalenv),
linux_cxx("TOOLSET=gcc LINK=static,shared Job 1", "g++", packages="g++-5", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'LINK': 'static,shared', 'TRAVIS_COMPILER': 'g++-5', 'DRONE_JOB_UUID': '356a192b79'}, globalenv=globalenv),
linux_cxx("TOOLSET=gcc LINK=static,shared Job 2", "g++", packages="g++-6", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'LINK': 'static,shared', 'TRAVIS_COMPILER': 'g++-6', 'DRONE_JOB_UUID': 'da4b9237ba'}, globalenv=globalenv),
linux_cxx("TOOLSET=gcc LINK=static,shared Job 3", "g++", packages="g++-7", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'LINK': 'static,shared', 'TRAVIS_COMPILER': 'g++-7', 'DRONE_JOB_UUID': '77de68daec'}, globalenv=globalenv),
linux_cxx("TOOLSET=clang LINK=static,shared Job 4", "clang++", packages="", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'LINK': 'static,shared', 'TRAVIS_COMPILER': 'clang++', 'DRONE_JOB_UUID': '1b64538924'}, globalenv=globalenv),
linux_cxx("TOOLSET=clang LINK=static,shared Job 5", "clang++", packages="libc++-dev", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'LINK': 'static,shared', 'TRAVIS_COMPILER': 'clang++-libc++', 'DRONE_JOB_UUID': 'ac3478d69a'}, globalenv=globalenv),
osx_cxx("TOOLSET=clang LINK=static,shared Job 6", "clang++", packages="", buildtype="boost", buildscript="drone", environment={'TOOLSET': 'clang', 'LINK': 'static,shared', 'TRAVIS_COMPILER': 'clang++', 'DRONE_JOB_UUID': 'c1dfd96eea'}, globalenv=globalenv),
osx_cxx("TOOLSET=clang LINK=static,shared Job 7", "clang++", packages="", buildtype="boost", buildscript="drone", xcode_version="10", environment={'TOOLSET': 'clang', 'LINK': 'static,shared', 'TRAVIS_COMPILER': 'clang++', 'DRONE_JOB_UUID': '902ba3cda1'}, globalenv=globalenv),
]
# from https://github.com/boostorg/boost-ci
load("@boost_ci//ci/drone/:functions.star", "linux_cxx","windows_cxx","osx_cxx","freebsd_cxx")
+37
View File
@@ -0,0 +1,37 @@
#!/bin/bash
# Copyright 2020 Rene Rivera, Sam Darwin
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt)
set -e
export TRAVIS_BUILD_DIR=$(pwd)
export DRONE_BUILD_DIR=$(pwd)
export TRAVIS_BRANCH=$DRONE_BRANCH
export VCS_COMMIT_ID=$DRONE_COMMIT
export GIT_COMMIT=$DRONE_COMMIT
export REPO_NAME=$DRONE_REPO
export PATH=~/.local/bin:/usr/local/bin:$PATH
if [ "$DRONE_JOB_BUILDTYPE" == "boost" ]; then
echo '==================================> INSTALL'
BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
cd ..
git clone -b $BOOST_BRANCH https://github.com/boostorg/boost.git boost-root
cd boost-root
git submodule update --init tools/build
git submodule update --init libs/config
git submodule update --init tools/boostdep
cp -r $TRAVIS_BUILD_DIR/* libs/serialization
python tools/boostdep/depinst/depinst.py serialization
./bootstrap.sh
./b2 headers
echo '==================================> SCRIPT'
echo "using $TOOLSET : : $TRAVIS_COMPILER ;" > ~/user-config.jam
./b2 -j 3 libs/serialization/test toolset=$TOOLSET link=${LINK:-shared}
fi
+84
View File
@@ -0,0 +1,84 @@
name: POSIX
on:
pull_request:
push:
branches:
- master
- develop
- feature/**
env:
LIBRARY: serialization
UBSAN_OPTIONS: print_stacktrace=1
jobs:
CI:
strategy:
fail-fast: false
matrix:
include:
- toolset: gcc-4.7
cxxstd: "03,11"
os: ubuntu-16.04
install: g++-4.7
- toolset: gcc-4.8
cxxstd: "03,11"
os: ubuntu-16.04
install: g++-4.8
- toolset: gcc-4.9
cxxstd: "03,11"
os: ubuntu-16.04
install: g++-4.9
- toolset: gcc-5
cxxstd: "03,11,14,1z"
os: ubuntu-16.04
- toolset: gcc-6
cxxstd: "03,11,14,1z"
os: ubuntu-16.04
install: g++-6
- toolset: gcc-7
cxxstd: "03,11,14,17"
os: ubuntu-18.04
- toolset: gcc-8
cxxstd: "03,11,14,17,2a"
os: ubuntu-18.04
- toolset: gcc-9
cxxstd: "03,11,14,17,2a"
os: ubuntu-18.04
- toolset: gcc-10
cxxstd: "03,11,14,17,2a"
os: ubuntu-18.04
- toolset: clang
cxxstd: "03,11,14,17,2a"
os: ubuntu-18.04
- toolset: clang
cxxstd: "03,11,14,17,2a"
os: macos-10.15
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- name: Install packages
if: matrix.install
run: sudo apt install ${{matrix.install}}
- name: Setup Boost
run: |
REF=${GITHUB_BASE_REF:-$GITHUB_REF}
BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true
cd ..
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
cd boost-root
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
git submodule update --init tools/boostdep
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY
./bootstrap.sh
./b2 -d0 headers
- name: Run tests
run: |
cd ../boost-root
./b2 -j3 libs/$LIBRARY/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} variant=debug,release
+57
View File
@@ -0,0 +1,57 @@
name: Windows
on:
pull_request:
push:
branches:
- master
- develop
- feature/**
env:
LIBRARY: serialization
jobs:
CI:
strategy:
fail-fast: false
matrix:
include:
- toolset: msvc-14.1
cxxstd: "14,17,latest"
addrmd: 32,64
os: windows-2016
- toolset: msvc-14.2
cxxstd: "14,17,latest"
addrmd: 32,64
os: windows-2019
- toolset: gcc
cxxstd: "03,11,14,17,2a"
addrmd: 64
os: windows-2019
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- name: Setup Boost
shell: cmd
run: |
if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF%
set BOOST_BRANCH=develop
if "%GITHUB_BASE_REF%" == "master" set BOOST_BRANCH=master
cd ..
git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
cd boost-root
xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\
git submodule update --init tools/boostdep
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY%
cmd /c bootstrap
b2 -d0 headers
- name: Run tests
shell: cmd
run: |
cd ../boost-root
b2 -j3 libs/%LIBRARY%/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} variant=debug,release
+78 -47
View File
@@ -1,4 +1,4 @@
# Copyright 2016 Peter Dimov
# Copyright 2016, 2017 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
@@ -6,66 +6,97 @@ language: cpp
sudo: false
os:
- linux
- osx
cache:
ccache: true
branches:
only:
- master
- develop
- /feature\/.*/
env:
matrix:
- BOGUS_JOB=true
matrix:
exclude:
- env: BOGUS_JOB=true
include:
- os: linux
compiler: g++
env: TOOLSET=gcc LINK=static,shared
- os: linux
compiler: g++-5
env: TOOLSET=gcc LINK=static,shared
addons:
apt:
packages:
- g++-5
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-6
env: TOOLSET=gcc LINK=static,shared
addons:
apt:
packages:
- g++-6
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-7
env: TOOLSET=gcc LINK=static,shared
addons:
apt:
packages:
- g++-7
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: clang++
env: TOOLSET=clang LINK=static,shared
- os: linux
compiler: clang++-libc++
env: TOOLSET=clang LINK=static,shared
addons:
apt:
packages:
- libc++-dev
- os: osx
compiler: clang++
env: TOOLSET=clang LINK=static,shared
- os: osx
osx_image: xcode10
compiler: clang++
env: TOOLSET=clang LINK=static,shared
install:
- BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
- cd ..
- git clone -b $TRAVIS_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
- git clone -b $BOOST_BRANCH https://github.com/boostorg/boost.git boost-root
- cd boost-root
- git submodule init libs/align
- git submodule init libs/array
- git submodule init libs/assert
- git submodule init libs/bind
- git submodule init libs/compatibility
- git submodule init libs/concept_check
- git submodule init libs/config
- git submodule init libs/container
- git submodule init libs/core
- git submodule init libs/detail
- git submodule init libs/filesystem
- git submodule init libs/function
- git submodule init libs/functional
- git submodule init libs/integer
- git submodule init libs/intrusive
- git submodule init libs/io
- git submodule init libs/iterator
- git submodule init libs/lexical_cast
- git submodule init libs/math
- git submodule init libs/move
- git submodule init libs/mpl
- git submodule init libs/numeric/conversion
- git submodule init libs/optional
- git submodule init libs/predef
- git submodule init libs/preprocessor
- git submodule init libs/range
- git submodule init libs/smart_ptr
- git submodule init libs/spirit
- git submodule init libs/static_assert
- git submodule init libs/system
- git submodule init libs/throw_exception
- git submodule init libs/tuple
- git submodule init libs/type_index
- git submodule init libs/type_traits
- git submodule init libs/unordered
- git submodule init libs/utility
- git submodule init libs/variant
- git submodule init tools/build
- git submodule update --depth 1
- git submodule update --init tools/build
- git submodule update --init libs/config
- git submodule update --init tools/boostdep
- cp -r $TRAVIS_BUILD_DIR/* libs/serialization
- python tools/boostdep/depinst/depinst.py serialization
- ./bootstrap.sh
- ./b2 headers
script:
- TOOLSET=gcc,clang
- if [ $TRAVIS_OS_NAME == osx ]; then TOOLSET=clang; fi
- ./b2 libs/serialization/test toolset=$TOOLSET
- |-
echo "using $TOOLSET : : $TRAVIS_COMPILER ;" > ~/user-config.jam
- ./b2 -j 3 libs/serialization/test toolset=$TOOLSET link=${LINK:-shared}
notifications:
email:
+130 -142
View File
@@ -10,11 +10,7 @@ if (POLICY CMP0063)
cmake_policy (SET CMP0063 NEW)
endif (POLICY CMP0063)
if(Boost_USE_STATIC_LIBS)
project("Serialization-Static")
else()
project("Serialization-Shared")
endif()
project("serialization")
#
# Compiler settings
@@ -24,7 +20,7 @@ message(STATUS "compiler is ${CMAKE_CXX_COMPILER_ID}" )
add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
if( CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
add_definitions( -ftemplate-depth=300 )
add_definitions( -ftemplate-depth=255 )
# we use gcc to test for C++03 compatibility
add_definitions( -std=c++03 )
message(STATUS "compiler is g++ c++03")
@@ -35,29 +31,12 @@ elseif( CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" )
set(COMPILER_SUPPORTS_CXX11 TRUE)
elseif( CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth=300")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++03")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0" )
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -O3" )
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -dead_strip")
set(COMPILER_SUPPORTS_CXX11 TRUE)
endif()
#
# IDE settings
#
if( CMAKE_HOST_APPLE )
# note: it seems that bjam builds both address models in any case
# so we can defer this decision to the IDE just as we do for debug/release
# so we'll not use this now
# set(Boost_ADDRESS_MODEL 64 CACHE INTEGER "32/64 bits")
set(Boost_USE_STATIC_LIBS ON CACHE BOOL "Link to Boost static libraries")
set(Boost_USE_MULTITHREADED ON)
else()
set(Boost_ADDRESS_MODEL 64 CACHE INTEGER "32/64 bits")
set(Boost_USE_STATIC_LIBS ON CACHE BOOL "Link to Boost static libraries")
set(Boost_USE_MULTITHREADED ON)
set(COMPILER_SUPPORTS_CXX11 FALSE)
endif()
#
@@ -67,86 +46,37 @@ endif()
# Boost
# note: we're assuming that boost has been built with:
# ./b2 —-layout=versioned toolset=clang-darwin link=static,shared variant=debug,release stage
# ./b2 toolset=clang-darwin link=static,shared variant=debug,release stage
###########################
# special notes for Xcode.
# these three should result in CMake setting the variables
# Boost_SERIALIZATION_LIBRARY_DEBUG … to the correct values.
# But my current version of CMake doesn't automatically set the library names
# to point to the the libraries to be used. The variables are created
# but they are not initialized. So be prepared to set these variables by hand.
# If you want to use the static libraries - point to the boost libraries ending
# in ".a". If you want to use the shared boost libraries - point to the libraries
# ending in ".dylib".
# But wait - there's more.
# if both lib.a and lib.dylib both exist in the library directory, Xcode will
# automatically chose the *.dylib one - and there's nothing you can do to fix this.
# So my recommendation is
# a) to place the compiled libraries in two different directories
# - e.g. stage/lib-static/*.a and stage/lib-shared/*.dylib
# and set the CMake variable Boost_LIBRARY_DIR to point to one or the other
# b) create two different CMake build directories - build-static and build-shared
# and switch between projects as desired. I like to test both since
# there are things like dead code elimination and visibility which vary
# between the two environments.
#
# caveat - as I write this, I've been unable to get the tests on the shared
# library to function. Problem is that one needs to either put the shared
# libraries in a special known place or set an environmental
# variable which points to the shared library directory. I prefer the latter
# but I've been unable to figure out how to get Xcode to do on a global basis
# and it's not practical to do this for 247 test targets one at a time.
# Project settings
#
option(BUILD_SHARED_LIBS "Build Shared Libraries" true)
# c) The targets in the project will by default be built as universal 32/64 binaries
# I have yet to experiment with these yet so I just set the target to 64 bit.
find_package(Boost 1.74 REQUIRED COMPONENTS system filesystem)
# end special note for Xcode
############################
if(NOT Boost_FOUND)
message("Boost NOT Found!")
else()
message(STATUS "Boost Found!")
endif()
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(VISIBILITY_INLINES_HIDDEN YES)
set(Boost_DEBUG true)
set(Boost_DETAILED_FAILURE_MSG true)
set(Boost_FOUND true)
find_package(Boost REQUIRED COMPONENTS system filesystem)
# enable usage of CHECK_INCLUDE_FILE_CXX
include(CheckIncludeFileCXX)
message(STATUS "Boost_FOUND is ${Boost_FOUND}")
# list of archive names for which tests should be generated
set(archive_list text_archive text_warchive binary_archive xml_archive xml_warchive)
# set(archive_list xml_warchive)
if(Boost_FOUND)
message(STATUS "Boost Found!")
message(STATUS "Boost is ${BOOST_ROOT}")
message(STATUS "Boost directories found at ${Boost_INCLUDE_DIRS}")
message(STATUS "Boost libraries found at ${Boost_LIBRARY_DIRS}")
message(STATUS "Boost libraries prefix is ${Boost_LIB_PREFIX}")
message(STATUS "Boost component libraries to be linked are ${Boost_LIBRARIES}")
message(STATUS "Boost version found is ${Boost_VERSION}")
#include_directories("../include" "${Boost_INCLUDE_DIRS}")
#link_directories("${Boost_LIBRARY_DIRS}")
else()
message(STATUS "Boost NOT Found!")
endif()
if(Boost_USE_STATIC_LIBS)
message(STATUS "Use static libraries")
set(LINK_TYPE "STATIC")
else()
message(STATUS "Building shared libraries")
set(LINK_TYPE "SHARED")
add_definitions( "-DBOOST_ALL_DYN_LINK=1")
add_definitions( "-DBOOST_ALL_NO_LIB=1")
add_definitions( "-DBOOST_LIB_DIAGNOSTICS=1")
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(VISIBILITY_INLINES_HIDDEN)
endif()
# list of tests generated by each function call
set(test_list)
###########################
# library builds
add_library(serialization ${LINK_TYPE}
add_library(serialization
../src/archive_exception.cpp
../src/basic_archive.cpp
../src/basic_iarchive.cpp
@@ -161,35 +91,47 @@ add_library(serialization ${LINK_TYPE}
../src/basic_xml_archive.cpp
../src/binary_iarchive.cpp
../src/binary_oarchive.cpp
../src/extended_type_info_no_rtti.cpp
../src/extended_type_info_typeid.cpp
../src/extended_type_info.cpp
../src/polymorphic_iarchive.cpp
../src/polymorphic_oarchive.cpp
../src/singleton.cpp
../src/extended_type_info_typeid.cpp
../src/extended_type_info_no_rtti.cpp
../src/stl_port.cpp
../src/text_iarchive.cpp
../src/text_oarchive.cpp
../src/polymorphic_iarchive.cpp
../src/polymorphic_oarchive.cpp
../src/polymorphic_text_iarchive.cpp
../src/polymorphic_text_oarchive.cpp
../src/polymorphic_binary_iarchive.cpp
../src/polymorphic_binary_oarchive.cpp
../src/polymorphic_xml_iarchive.cpp
../src/polymorphic_xml_oarchive.cpp
../src/void_cast.cpp
../src/xml_archive_exception.cpp
../src/xml_grammar.cpp
../src/xml_iarchive.cpp
../src/xml_oarchive.cpp
../src/xml_grammar.cpp
../src/xml_archive_exception.cpp
../src/codecvt_null.cpp
../src/utf8_codecvt_facet.cpp
../src/basic_xml_grammar.ipp # doesn't show up in "Source Files" in Xcode"'
)
target_include_directories(serialization PUBLIC ${Boost_INCLUDE_DIR})
add_library(wserialization ${LINK_TYPE}
../src/codecvt_null.cpp
add_library(wserialization
../src/basic_text_wiprimitive.cpp
../src/basic_text_woprimitive.cpp
../src/text_wiarchive.cpp
../src/text_woarchive.cpp
../src/polymorphic_text_wiarchive.cpp
../src/polymorphic_text_woarchive.cpp
../src/xml_wiarchive.cpp
../src/xml_woarchive.cpp
../src/polymorphic_xml_wiarchive.cpp
../src/polymorphic_xml_woarchive.cpp
../src/xml_wgrammar.cpp
../src/basic_xml_grammar.ipp # doesn't show up in "Source Files" in Xcode"'
)
target_include_directories(wserialization PUBLIC ${Boost_INCLUDE_DIR})
target_link_libraries(wserialization PUBLIC serialization)
# end library build
###########################
@@ -204,61 +146,91 @@ function( serialization_test test_name)
endforeach()
message(STATUS ${test_name})
add_executable( ${test_name} ../test/${test_name}.cpp ${arglist} )
target_link_libraries(${test_name} serialization wserialization ${Boost_LIBRARIES})
target_include_directories(${test_name} PUBLIC ${Boost_INCLUDE_DIR})
target_link_libraries(${test_name} serialization wserialization Boost::filesystem)
add_test( ${test_name} ${test_name} )
endfunction(serialization_test)
function(archive_test test_name)
set(test_listx)
set(arglist)
foreach(a IN ITEMS ${ARGN} )
set(arglist ${arglist} ../test/${a}.cpp)
endforeach()
foreach(
archive-name
IN ITEMS text_archive text_warchive binary_archive xml_archive xml_warchive
IN ITEMS ${archive_list}
)
set(amended_test_name ${test_name}_${archive-name})
message(STATUS ${amended_test_name})
add_executable(${amended_test_name} ../test/${test_name}.cpp ${arglist})
set_property(
TARGET ${amended_test_name}
PROPERTY COMPILE_DEFINITIONS BOOST_ARCHIVE_TEST=${archive-name}.hpp
)
target_link_libraries(${amended_test_name} serialization wserialization ${Boost_LIBRARIES})
target_include_directories(${amended_test_name} PUBLIC ${Boost_INCLUDE_DIR})
target_link_libraries(${amended_test_name} serialization wserialization Boost::filesystem)
add_test(${amended_test_name} ${amended_test_name})
set(test_listx ${test_listx} ${amended_test_name})
endforeach()
set(test_list ${test_listx} PARENT_SCOPE)
endfunction(archive_test)
function(polymorphic_archive_test test_name)
set(test_listx)
set(arglist)
foreach(a IN ITEMS ${ARGN} )
set(arglist ${arglist} ../test/${a}.cpp)
endforeach()
foreach(
archive-name
IN ITEMS text_archive text_warchive binary_archive xml_archive xml_warchive
IN ITEMS ${archive_list}
)
set(amended_test_name ${test_name}_polymorphic_${archive-name})
message(STATUS ${amended_test_name})
set(amended_archive_name polymorphic_${archive-name})
set(amended_test_name ${test_name}_${amended_archive_name})
add_executable(${amended_test_name} ../test/${test_name}.cpp ${arglist})
set_property(
TARGET ${amended_test_name}
PROPERTY COMPILE_DEFINITIONS BOOST_ARCHIVE_TEST=polymorphic_${archive-name}.hpp
PROPERTY COMPILE_DEFINITIONS BOOST_ARCHIVE_TEST=${amended_archive_name}.hpp
)
target_link_libraries(${amended_test_name} serialization wserialization ${Boost_LIBRARIES})
message(STATUS ${amended_test_name} " " ${arglist} " " ${amended_archive_name})
target_include_directories(${amended_test_name} PUBLIC ${Boost_INCLUDE_DIR})
target_link_libraries(${amended_test_name} serialization wserialization Boost::filesystem)
add_test(${amended_test_name} ${amended_test_name})
endforeach()
set(test_listx ${test_listx} ${amended_test_name})
endforeach()
set(test_list ${test_listx} PARENT_SCOPE)
endfunction(polymorphic_archive_test)
enable_testing()
# serialization(test_dll_exported dll_polymorphic_derived2_lib)
# serialization(test_dll_simple dll_a_lib)
message(STATUS dll_a)
add_library(dll_a SHARED ../test/dll_a.cpp)
target_link_libraries(dll_a serialization)
message(STATUS dll_polymorphic_base)
add_library(dll_polymorphic_base SHARED ../test/dll_polymorphic_base.cpp)
target_link_libraries(dll_polymorphic_base serialization)
message(STATUS dll_polymorphic_derived2)
add_library(dll_polymorphic_derived2 SHARED ../test/dll_polymorphic_derived2.cpp)
target_link_libraries(dll_polymorphic_derived2 dll_polymorphic_base serialization)
# compile test_dll_plugin.cpp
# Running the following test requires that the test know the directory
# in which the dll is stored. I don't know how to extract this from bjam
# serialization(test_dll_plugin : : dll_polymorphic_derived2_lib)
if(BUILD_SHARED_LIBS)
# this test can only be made to work if we're linking with shared
# libraries. Basically the build systems like to have all shared
# or all static so if we're building with static C++ libraries
# then linking with a shared one - we need multiple C++ libraries
# and things get complex. So just run this test when we're
# building with shared libraries (dll in windows speak)
serialization_test(test_dll_simple)
target_link_libraries(test_dll_simple dll_a serialization)
endif()
serialization_test(test_private_ctor)
serialization_test(test_reset_object_address A)
serialization_test(test_void_cast)
@@ -266,15 +238,20 @@ serialization_test(test_mult_archive_types)
serialization_test(test_iterators)
serialization_test(test_iterators_base64)
serialization_test(test_inclusion)
serialization_test(test_inclusion2)
serialization_test(test_smart_cast)
serialization_test(test_codecvt_null ../src/codecvt_null)
serialization_test(test_codecvt_null)
serialization_test(test_strong_typedef)
serialization_test(test_singleton)
serialization_test(test_singleton_inherited)
serialization_test(test_singleton_plain)
archive_test(test_native_array A)
archive_test(test_boost_array A)
if(COMPILER_SUPPORTS_CXX11)
archive_test(test_array A)
endif()
archive_test(test_binary)
archive_test(test_bitset)
archive_test(test_class_info_save)
@@ -288,19 +265,32 @@ archive_test(test_derived)
archive_test(test_derived_class A)
archive_test(test_diamond)
archive_test(test_diamond_complex)
archive_test(test_exported polymorphic_base)
archive_test(test_forward_list A)
archive_test(test_forward_list_ptrs A)
CHECK_INCLUDE_FILE_CXX(forward_list FORWARD_LIST_FOUND)
if(FORWARD_LIST_FOUND)
message(STATUS "forward_list header found")
archive_test(test_forward_list A)
archive_test(test_forward_list_ptrs A)
else()
message(STATUS "forward_list header NOT found")
endif()
archive_test(test_helper_support)
archive_test(test_interrupts)
archive_test(test_list A)
archive_test(test_list_ptrs A)
archive_test(test_map A)
archive_test(test_map_boost_unordered A)
CHECK_INCLUDE_FILE_CXX(hash_map HASH_MAP_FOUND)
if(HASH_MAP_FOUND)
archive_test(test_map_hashed A)
endif()
if(COMPILER_SUPPORTS_CXX11)
archive_test(test_map_unordered A)
endif()
archive_test(test_mi)
archive_test(test_multiple_ptrs A)
archive_test(test_multiple_inheritance)
archive_test(test_no_rtti polymorphic_base polymorphic_derived1)
archive_test(test_new_operator A)
archive_test(test_non_intrusive)
archive_test(test_non_default_ctor)
@@ -316,6 +306,17 @@ archive_test(test_private_base2)
archive_test(test_queue A)
archive_test(test_recursion A)
archive_test(test_registered)
archive_test(test_set A)
archive_test(test_set_boost_unordered A)
CHECK_INCLUDE_FILE_CXX(hash_set HASH_SET_FOUND)
if(HASH_SET_FOUND)
archive_test(test_set_hashed A)
endif()
if(COMPILER_SUPPORTS_CXX11)
archive_test(test_set_unordered A)
endif()
archive_test(test_shared_ptr)
archive_test(test_shared_ptr_multi_base)
archive_test(test_shared_ptr_132)
@@ -326,8 +327,6 @@ if(SLIST_FOUND)
message(STATUS "slist header found")
archive_test(test_slist A)
archive_test(test_slist_ptr A)
else()
message(STATUS "slist header NOT found")
endif()
archive_test(test_stack A)
archive_test(test_split)
@@ -337,28 +336,17 @@ archive_test(test_unique_ptr)
archive_test(test_valarray)
archive_test(test_variant A)
archive_test(test_vector A)
archive_test(test_set A)
archive_test(test_set_boost_unordered A)
if(COMPILER_SUPPORTS_CXX11)
archive_test(test_set_unordered A)
else()
CHECK_INCLUDE_FILE_CXX(hash_set HASH_SET_FOUND)
if(HASH_SET_FOUND)
archive_test(test_set_hashed A)
endif()
endif()
if(COMPILER_SUPPORTS_CXX11)
archive_test(test_map_unordered A)
else()
CHECK_INCLUDE_FILE_CXX(hash_map HASH_MAP_FOUND)
if(HASH_MAP_FOUND)
archive_test(test_map_hashed A)
endif()
endif()
polymorphic_archive_test(test_dll_exported polymorphic_derived1)
foreach(test_name IN ITEMS ${test_list} )
target_link_libraries(${test_name} dll_polymorphic_derived2 dll_polymorphic_base serialization wserialization)
endforeach()
polymorphic_archive_test(test_no_rtti polymorphic_base polymorphic_derived1 polymorphic_derived2)
polymorphic_archive_test(test_exported polymorphic_base polymorphic_derived1 polymorphic_derived2)
polymorphic_archive_test(test_polymorphic test_polymorphic_A A)
polymorphic_archive_test(test_polymorphic2 test_polymorphic2imp)
polymorphic_archive_test(test_polymorphic_helper)
polymorphic_archive_test(test_p_helper)
# end test targets
####################
@@ -366,7 +354,7 @@ polymorphic_archive_test(test_polymorphic_helper)
####################
# add headers in IDE
# for serialisation
# for serialization
file(GLOB x
RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
+125
View File
@@ -0,0 +1,125 @@
# Copyright 2020, 2021 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
# https://www.boost.org/LICENSE_1_0.txt
cmake_minimum_required(VERSION 3.5...3.16)
project(boost_serialization VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
add_library(boost_serialization
src/archive_exception.cpp
src/basic_archive.cpp
src/basic_iarchive.cpp
src/basic_iserializer.cpp
src/basic_oarchive.cpp
src/basic_oserializer.cpp
src/basic_pointer_iserializer.cpp
src/basic_pointer_oserializer.cpp
src/basic_serializer_map.cpp
src/basic_text_iprimitive.cpp
src/basic_text_oprimitive.cpp
src/basic_xml_archive.cpp
src/binary_iarchive.cpp
src/binary_oarchive.cpp
src/codecvt_null.cpp
src/extended_type_info.cpp
src/extended_type_info_no_rtti.cpp
src/extended_type_info_typeid.cpp
src/polymorphic_binary_iarchive.cpp
src/polymorphic_binary_oarchive.cpp
src/polymorphic_iarchive.cpp
src/polymorphic_oarchive.cpp
src/polymorphic_text_iarchive.cpp
src/polymorphic_text_oarchive.cpp
src/polymorphic_xml_iarchive.cpp
src/polymorphic_xml_oarchive.cpp
src/stl_port.cpp
src/text_iarchive.cpp
src/text_oarchive.cpp
src/utf8_codecvt_facet.cpp
src/void_cast.cpp
src/xml_archive_exception.cpp
src/xml_grammar.cpp
src/xml_iarchive.cpp
src/xml_oarchive.cpp
)
add_library(boost_wserialization
src/basic_text_wiprimitive.cpp
src/basic_text_woprimitive.cpp
src/binary_wiarchive.cpp
src/binary_woarchive.cpp
src/polymorphic_text_wiarchive.cpp
src/polymorphic_text_woarchive.cpp
src/polymorphic_xml_wiarchive.cpp
src/polymorphic_xml_woarchive.cpp
src/text_wiarchive.cpp
src/text_woarchive.cpp
src/xml_wgrammar.cpp
src/xml_wiarchive.cpp
src/xml_woarchive.cpp
)
add_library(Boost::serialization ALIAS boost_serialization)
add_library(Boost::wserialization ALIAS boost_wserialization)
target_include_directories(boost_serialization PUBLIC include)
target_include_directories(boost_wserialization PUBLIC include)
target_link_libraries(boost_serialization
PUBLIC
Boost::array
Boost::assert
Boost::config
Boost::core
Boost::detail
Boost::integer
Boost::io
Boost::iterator
Boost::move
Boost::mpl
Boost::optional
Boost::predef
Boost::preprocessor
Boost::smart_ptr
Boost::spirit
Boost::static_assert
Boost::type_traits
Boost::unordered
Boost::utility
Boost::variant
PRIVATE
Boost::function
)
target_link_libraries(boost_wserialization PUBLIC boost_serialization)
target_compile_definitions(boost_serialization
PUBLIC BOOST_SERIALIZATION_NO_LIB
# Source files already define BOOST_SERIALIZATION_SOURCE
# PRIVATE BOOST_SERIALIZATION_SOURCE
)
target_compile_definitions(boost_wserialization
PUBLIC BOOST_SERIALIZATION_NO_LIB
# Source files already define BOOST_SERIALIZATION_SOURCE
# PRIVATE BOOST_SERIALIZATION_SOURCE
)
if(BUILD_SHARED_LIBS)
target_compile_definitions(boost_serialization PUBLIC BOOST_SERIALIZATION_DYN_LINK)
target_compile_definitions(boost_wserialization PUBLIC BOOST_SERIALIZATION_DYN_LINK)
else()
target_compile_definitions(boost_serialization PUBLIC BOOST_SERIALIZATION_STATIC_LINK)
target_compile_definitions(boost_wserialization PUBLIC BOOST_SERIALIZATION_STATIC_LINK)
endif()
if(BOOST_SUPERPROJECT_VERSION AND NOT CMAKE_VERSION VERSION_LESS 3.13)
boost_install(TARGETS boost_serialization boost_wserialization VERSION ${BOOST_SUPERPROJECT_VERSION} HEADER_DIRECTORY include)
endif()
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
add_subdirectory(test)
endif()
+17 -1
View File
@@ -12,6 +12,17 @@ branches:
- develop
# - master
environment:
matrix:
- BUILD_TOOLSET: gcc
BUILD_LINK: static
- BUILD_TOOLSET: gcc
BUILD_LINK: shared
- BUILD_TOOLSET: msvc-14.0
BUILD_LINK: static
- BUILD_TOOLSET: msvc-14.0
BUILD_LINK: shared
install:
- cd ..
- git clone -b %APPVEYOR_REPO_BRANCH% https://github.com/boostorg/boost.git boost-root
@@ -24,6 +35,7 @@ install:
- git submodule init libs/concept_check
- git submodule init libs/config
- git submodule init libs/container
- git submodule init libs/container_hash
- git submodule init libs/core
- git submodule init libs/detail
- git submodule init libs/filesystem
@@ -53,6 +65,10 @@ install:
- git submodule init libs/unordered
- git submodule init libs/utility
- git submodule init libs/variant
- git submodule init libs/winapi
- git submodule init tools/boost_install
- git submodule init libs/headers
- git submodule init tools/build
- git submodule update
- xcopy /s /e /q %APPVEYOR_BUILD_FOLDER% libs\serialization
@@ -64,4 +80,4 @@ build: off
test_script:
- cd libs/serialization/test
- b2 toolset=gcc link=static,shared
- b2 -j2 toolset=%BUILD_TOOLSET% link=%BUILD_LINK%
+62 -7
View File
@@ -53,6 +53,7 @@ rule include-spirit ( properties * )
}
SOURCES =
archive_exception
basic_archive
basic_iarchive
basic_iserializer
@@ -74,32 +75,84 @@ SOURCES =
stl_port
text_iarchive
text_oarchive
polymorphic_text_iarchive
polymorphic_text_oarchive
polymorphic_binary_iarchive
polymorphic_binary_oarchive
polymorphic_xml_iarchive
polymorphic_xml_oarchive
void_cast
archive_exception
xml_grammar
xml_iarchive
xml_oarchive
xml_archive_exception
codecvt_null
;
SOURCES_HAS_STD_LOCALE =
xml_oarchive
utf8_codecvt_facet
singleton
;
WSOURCES =
basic_text_wiprimitive
basic_text_woprimitive
text_wiarchive
text_woarchive
polymorphic_text_wiarchive
polymorphic_text_woarchive
xml_wgrammar
xml_wiarchive
xml_woarchive
polymorphic_xml_wiarchive
polymorphic_xml_woarchive
;
rule has-config-flag ( flag : properties * )
{
if ( "<define>$(flag)" in $(properties) || "<define>$(flag)=1" in $(properties) )
{
return 1 ;
}
else
{
return ;
}
}
rule select-define-specific-sources ( properties * )
{
local result ;
if ! [ has-config-flag BOOST_NO_STD_LOCALE : $(properties) ]
{
result += <source>$(SOURCES_HAS_STD_LOCALE).cpp ;
}
#ECHO additional sources $(result) ;
return $(result) ;
}
rule should-build-wserialization ( properties * )
{
local result ;
if [ has-config-flag BOOST_NO_STD_LOCALE : $(properties) ]
{
result += <build>no ;
}
#ECHO should build wserialization $(result) ;
return $(result) ;
}
lib boost_serialization
: $(SOURCES).cpp
:
: ## sources ##
$(SOURCES).cpp
: ## requirements ##
<conditional>@select-define-specific-sources
<toolset>msvc:<cxxflags>/Gy
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
<toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS
<toolset>clang:<cxxflags>"-fvisibility=hidden -fvisibility-inlines-hidden"
<toolset>gcc:<cxxflags>"-fvisibility=hidden -fvisibility-inlines-hidden"
<toolset>darwin:<cxxflags>"-fvisibility=hidden -fvisibility-inlines-hidden"
@@ -111,9 +164,11 @@ lib boost_serialization
lib boost_wserialization
: $(WSOURCES).cpp boost_serialization
:
:
<conditional>@should-build-wserialization
<toolset>msvc:<cxxflags>/Gy
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
<toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS
<toolset>clang:<cxxflags>"-fvisibility=hidden -fvisibility-inlines-hidden"
<toolset>gcc:<cxxflags>"-fvisibility=hidden -fvisibility-inlines-hidden"
<toolset>darwin:<cxxflags>"-fvisibility=hidden -fvisibility-inlines-hidden"
+1 -11
View File
@@ -182,11 +182,6 @@ to the archive in some special way. For example, XML archives implement special
name-value pairs by overriding this function template for name-value pairs.
This replaces the default name-value pair handling, which is just to throw away the name,
with one appropriate for XML which writes out the start of an XML tag with the correct object name.
<p>
The second argument must be part of the function signature even though it is not used.
Its purpose is to be sure that code is portable to compilers which fail to correctly
implement partial function template ordering. For more information see
<a href="implementation.html#functiontemplateordering">this</a>.
</dd>
</dl>
@@ -231,11 +226,6 @@ explicitly provided for these types. For an example see
In real practice, we probably won't be quite done.
One or more of the following issues may need to be addressed:
<ul>
<li>Many compilers fail to implement correct partial ordering of
function templates. The archives included with this library work around
this using argument overloading. This technique is described in
<a target="detail" href="implementation.html#functiontemplateordering">
another section of this manual</a>
<li>Even if we are using a conforming compiler, we might want our new archive class
to be portable to non-conforming compilers.
<li>Our archive format might require extra information inserted into it. For
@@ -267,7 +257,7 @@ EXCEPT for one special case.
To make this work, the following should be included after the archive
class definition.
<pre><code>
#define BOOST_SERIALIZATION_REGISTER_ARCHIVE(Archive)
BOOST_SERIALIZATION_REGISTER_ARCHIVE(Archive)
</code></pre>
Failure to do this will not inhibit the program from compiling, linking
and executing properly - except in one case. If an instance of a derived
+7 -3
View File
@@ -101,7 +101,10 @@ function initialize() {
<dt><img style="display:none" src="dot.gif"><a target="detail" href="tutorial.html#stl">STL Collections</a>
<dt><img style="display:none" src="dot.gif"><a target="detail" href="tutorial.html#versioning">Class Versioning</a>
<dt><img style="display:none" src="dot.gif"><a target="detail" href="tutorial.html#splitting">Splitting <code>serialize</code> into <code>save/load</code></a>
<dt><img style="display:none" src="dot.gif">
<a target="detail" href="tutorial.html#splitting">
Splitting <code>serialize</code> into <code>save/load</code>
</a>
<dt><img style="display:none" src="dot.gif"><a target="detail" href="tutorial.html#archives">Archives</a>
<dt><img style="display:none" src="dot.gif"><a target="detail" href="tutorial.html#examples">List of Examples</a>
</dl></div></dd>
@@ -133,7 +136,9 @@ function initialize() {
<dt><img style="display:none" src="dot.gif"><a target="detail" href="serialization.html#templates">Templates</a>
</dl></div></dd>
<dt><img style="display:none" src="dot.gif"><a target="detail" href="serialization.html#versioning">Versioning</a>
<dt><img style="display:none" s'c="dot.gif"><a target="detail" href="serialization.html#splitting">Splitting <code>serialize</code> into <code>save/load</code></a>
<dt><img style="display:none" src="dot.gif"><a target="detail" href="tutorial.html#splitting">
Splitting <code>serialize</code> into <code>save/load</code>
</a>
</dl></div></dd>
<dt><img style="display:none" src="plus.gif" id="pointers"><a target="detail" href="serialization.html#pointeroperators">Pointers</a>
<dd><div id="pointers_detail"><dl class="page-index">
@@ -227,7 +232,6 @@ function initialize() {
</dl></div></dd>
<dt><img style="display:none" src="plus.gif" id="implementation"><a target="detail" href="implementation.html">Implementation Notes</a>
<dd><div id="implementation_detail"><dl class="page-index">
<dt><img style="display:none" src="dot.gif"><a target="detail" href="implementation.html#functiontemplateordering">Partial Function Template Ordering</a>
<dt><img style="display:none" src="dot.gif"><a target="detail" href="implementation.html#charencoding">Character Encoding</a>
<dt><img style="display:none" src="dot.gif"><a target="detail" href="implementation.html#tempatesyntax">Template Invocation syntax</a>
<dt><img style="display:none" src="dot.gif"><a target="detail" href="implementation.html#partialtemplatespecialization">Partial Template Specialization</a>
-14
View File
@@ -112,20 +112,6 @@ constructor <code style="white-space: normal">base64_text(const char *)</code>
Iterator Adaptors include a <code style="white-space: normal">make_xxx_iterator</code> to fulfill this function.
However, I believe these are unwieldy to use compared to the above solution using
Templated constructors.
<p>
Unfortunately, some systems which fail to properly support partial function template
ordering cannot support the concept of a templated constructor as implemented above.
A special "wrapper" macro has been created to work around this problem. With this "wrapper"
the above example is modified to:
<pre><code>
std::copy(
base64_text(BOOST_MAKE_PFTO_WRAPPER(address)),
base64_text(BOOST_MAKE_PFTO_WRAPPER(address + count)),
ostream_iterator&lt;char&gt;(os)
);
</code></pre>
This macro is defined in <a target="pfto" href="../../../boost/serialization/pfto.hpp">&lt;boost/serialization/pfto.hpp&gt;</a>.
For more information about this topic, check the source.
<h4>Dereferencing</h4>
Dereferencing some iterators can cause problems. For example, a natural
-6
View File
@@ -83,12 +83,6 @@ the base classes.
<li><i></i>Reread <a target="detail" href="headers.html#archiveinternals">Archive Internals</a>.
This describes the class hierarchy so that you know what to override.
<li><i>Note the usage of PFTO.</i> Some compilers fail to provide support for
partial function template ordering. The serialization library works around this by
using <a target="detail" href="implementation.html#functiontemplateordering">
<b>P</b>artial <b>F</b>unction <b>T</b>emplate <b>O</b>rdering</a> in several places.
This is done
in several places, including the archive classes themselves.
<li><i>Base class functions will usually need to be explicitly invoked.</i>
We commonly specialize the function name <code style="white-space: normal">save_override</code>
for saving primitives. Usage of a function name in a derived class
+7 -7
View File
@@ -26,11 +26,11 @@
/////////////////////////////////////////////////////////////
// The intent of this program is to serve as a tutorial for
// users of the serialization package. An attempt has been made
// to illustrate most of the facilities of the package.
// to illustrate most of the facilities of the package.
//
// The intent is to create an example suffciently complete to
// illustrate the usage and utility of the package while
// including a minimum of other code.
// including a minimum of other code.
//
// This illustration models the bus system of a small city.
// This includes, multiple bus stops, bus routes and schedules.
@@ -57,7 +57,7 @@ class gps_position
public:
// every serializable class needs a constructor
gps_position(){};
gps_position(int _d, int _m, float _s) :
gps_position(int _d, int _m, float _s) :
degrees(_d), minutes(_m), seconds(_s)
{}
};
@@ -147,7 +147,7 @@ class bus_stop_destination : public bus_stop
ar & boost::serialization::base_object<bus_stop>(*this) & name;
}
public:
bus_stop_destination(){}
bus_stop_destination(
const gps_position & _lat, const gps_position & _long, const std::string & _name
@@ -213,7 +213,7 @@ std::ostream & operator<<(std::ostream &os, const bus_route &br)
// Illustrates serialization of STL objects(pair) in a non-intrusive way.
// See definition of operator<< <pair<F, S> >(ar, pair) and others in
// serialization.hpp
//
//
// illustrates nesting of serializable classes
//
// illustrates use of version number to automatically grandfather older
@@ -299,7 +299,7 @@ restore_schedule(bus_schedule &s, const char * filename)
}
int main(int argc, char *argv[])
{
{
// make the schedule
bus_schedule original_schedule;
@@ -351,7 +351,7 @@ int main(int argc, char *argv[])
// display the complete schedule
std::cout << "original schedule";
std::cout << original_schedule;
std::string filename(boost::archive::tmpdir());
filename += "/demofile.txt";
+3 -3
View File
@@ -1,7 +1,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// demo_auto_ptr.cpp
// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002-4 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)
@@ -14,7 +14,7 @@
#include <cstdio> // remove, std::autoptr inteface wrong in dinkumware
#include <boost/config.hpp>
#if defined(BOOST_NO_STDC_NAMESPACE)
namespace std{
namespace std{
using ::remove;
}
#endif
@@ -25,7 +25,7 @@ namespace std{
#include <boost/serialization/split_free.hpp>
namespace boost {
namespace boost {
namespace serialization {
/////////////////////////////////////////////////////////////
+10 -10
View File
@@ -9,7 +9,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// A.hpp simple class test
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -25,7 +25,7 @@
#include <boost/config.hpp>
#if defined(BOOST_NO_STDC_NAMESPACE)
namespace std{
using ::rand;
using ::rand;
using ::fabs;
using ::size_t;
}
@@ -61,7 +61,7 @@ private:
ar & BOOST_SERIALIZATION_NVP(f);
ar & BOOST_SERIALIZATION_NVP(g);
#endif
#if BOOST_WORKAROUND(__BORLANDC__, <= 0x551 )
#if BOOST_WORKAROUND(BOOST_BORLANDC, <= 0x551 )
int i;
if(BOOST_DEDUCED_TYPENAME Archive::is_saving::value){
i = l;
@@ -229,12 +229,12 @@ inline bool A::operator==(const A &rhs) const
if(o != rhs.o)
return false;
if(p != rhs.p)
return false;
return false;
if(q != rhs.q)
return false;
#ifndef BOOST_NO_CWCHAR
if(r != rhs.r)
return false;
return false;
#endif
if(c != rhs.c)
return false;
@@ -243,9 +243,9 @@ inline bool A::operator==(const A &rhs) const
if(t != rhs.t)
return false;
if(u != rhs.u)
return false;
return false;
if(v != rhs.v)
return false;
return false;
if(std::abs( boost::math::float_distance(w, rhs.w)) > 1)
return false;
if(std::abs( boost::math::float_distance(x, rhs.x)) > 1)
@@ -255,7 +255,7 @@ inline bool A::operator==(const A &rhs) const
#ifndef BOOST_NO_STD_WSTRING
if(0 != z.compare(rhs.z))
return false;
#endif
#endif
return true;
}
@@ -297,11 +297,11 @@ inline bool A::operator<(const A &rhs) const
if(t != rhs.t )
return t < rhs.t;
if(u != rhs.u )
return u < rhs.u;
return u < rhs.u;
if(v != rhs.v )
return v < rhs.v;
if(w != rhs.w )
return w < rhs.w;
return w < rhs.w;
if(x != rhs.x )
return x < rhs.x;
int i = y.compare(rhs.y);
+1 -1
View File
@@ -60,7 +60,7 @@ private:
ar & BOOST_SERIALIZATION_NVP(f);
ar & BOOST_SERIALIZATION_NVP(g);
#endif
#if BOOST_WORKAROUND(__BORLANDC__, <= 0x551 )
#if BOOST_WORKAROUND(BOOST_BORLANDC, <= 0x551 )
int i;
if(BOOST_DEDUCED_TYPENAME Archive::is_saving::value){
i = l;
+6 -6
View File
@@ -9,7 +9,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// B.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -22,7 +22,7 @@
#include <boost/config.hpp>
#if defined(BOOST_NO_STDC_NAMESPACE)
namespace std{
using ::rand;
using ::rand;
}
#endif
@@ -101,10 +101,10 @@ inline bool B::operator==(const B &rhs) const
{
return
A::operator==(rhs)
&& s == rhs.s
&& t == rhs.t
&& u == rhs.u
&& v == rhs.v
&& s == rhs.s
&& t == rhs.t
&& u == rhs.u
&& v == rhs.v
&& std::abs( boost::math::float_distance(w, rhs.w)) < 2
&& std::abs( boost::math::float_distance(x, rhs.x)) < 2
;
+5 -5
View File
@@ -1,20 +1,20 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// demo_exception.cpp
// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002-4 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)
// Example of safe exception handling for pointer de-serialization
//
// This example was prepared by Robert Ramey to demonstrate and test
//
// This example was prepared by Robert Ramey to demonstrate and test
// safe exception handling during the de-serialization of pointers in
// a non-trivial example.
//
// Hopefully, this addresses exception issues raised by
// Vahan Margaryan who spent considerable time and effort
// in the analysis and testing of issues of exception safety
// in the analysis and testing of issues of exception safety
// of the serialization library.
#include <algorithm>
@@ -26,7 +26,7 @@
#include <cstdio> // remove
#include <boost/config.hpp>
#if defined(BOOST_NO_STDC_NAMESPACE)
namespace std{
namespace std{
using ::remove;
}
#endif
+18 -18
View File
@@ -1,7 +1,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// demo_fast_binary_archive.cpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -27,19 +27,19 @@
using namespace boost::archive;
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// "Fast" output binary archive. This is a variation of the native binary
// "Fast" output binary archive. This is a variation of the native binary
class fast_binary_oarchive :
// don't derive from binary_oarchive !!!
public binary_oarchive_impl<
fast_binary_oarchive,
std::ostream::char_type,
fast_binary_oarchive,
std::ostream::char_type,
std::ostream::traits_type
>
{
typedef fast_binary_oarchive derived_t;
typedef binary_oarchive_impl<
fast_binary_oarchive,
std::ostream::char_type,
fast_binary_oarchive,
std::ostream::char_type,
std::ostream::traits_type
> base_t;
#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
@@ -48,15 +48,15 @@ public:
friend class boost::archive::detail::interface_oarchive<derived_t>;
friend class basic_binary_oarchive<derived_t>;
friend class basic_binary_oprimitive<
derived_t,
std::ostream::char_type,
derived_t,
std::ostream::char_type,
std::ostream::traits_type
>;
friend class boost::archive::save_access;
#endif
// add base class to the places considered when matching
// save function to a specific set of arguments. Note, this didn't
// work on my MSVC 7.0 system using
// work on my MSVC 7.0 system using
// binary_oarchive_impl<derived_t>::load_override;
// so we use the sure-fire method below. This failed to work as well
template<class T>
@@ -95,19 +95,19 @@ public:
BOOST_SERIALIZATION_REGISTER_ARCHIVE(fast_binary_oarchive)
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// "Fast" input binary archive. This is a variation of the native binary
// "Fast" input binary archive. This is a variation of the native binary
class fast_binary_iarchive :
// don't derive from binary_oarchive !!!
public binary_iarchive_impl<
fast_binary_iarchive,
std::istream::char_type,
fast_binary_iarchive,
std::istream::char_type,
std::istream::traits_type
>
{
typedef fast_binary_iarchive derived_t;
typedef binary_iarchive_impl<
fast_binary_iarchive,
std::istream::char_type,
fast_binary_iarchive,
std::istream::char_type,
std::istream::traits_type
> base_t;
#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
@@ -116,15 +116,15 @@ public:
friend class boost::archive::detail::interface_iarchive<derived_t>;
friend class basic_binary_iarchive<derived_t>;
friend class basic_binary_iprimitive<
derived_t,
std::ostream::char_type,
derived_t,
std::ostream::char_type,
std::ostream::traits_type
>;
friend class boost::archive::load_access;
#endif
// add base class to the places considered when matching
// save function to a specific set of arguments. Note, this didn't
// work on my MSVC 7.0 system using
// work on my MSVC 7.0 system using
// binary_oarchive_impl<derived_t>::load_override;
// so we use the sure-fire method below. This failed to work as well
template<class T>
@@ -166,7 +166,7 @@ int main( int argc, char* argv[] )
int a1[3] = {4, 5, 6};
std::stringstream ss;
{
{
fast_binary_oarchive pboa(ss);
pboa << a;
}
+2 -2
View File
@@ -51,7 +51,7 @@ class gps_position
public:
// every serializable class needs a constructor
gps_position(){};
gps_position(int _d, int _m, float _s) :
gps_position(int _d, int _m, float _s) :
degrees(_d), minutes(_m), seconds(_s)
{}
};
@@ -209,7 +209,7 @@ std::ostream & operator<<(std::ostream &os, const bus_route &br)
//
// Illustrates serialization of STL objects(pair) in a non-intrusive way.
// See definition of operator<< <pair<F, S> >(ar, pair)
//
//
// illustrates nesting of serializable classes
//
// illustrates use of version number to automatically grandfather older
+1 -1
View File
@@ -1,7 +1,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// demo_pimpl.cpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
+4 -4
View File
@@ -1,7 +1,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// demo_pimpl_A.cpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -31,15 +31,15 @@ template<class Archive>
void A::serialize(Archive & ar, const unsigned int /* file_version */){
ar & pimpl;
}
// without the explicit instantiations below, the program will
// fail to link for lack of instantiantiation of the above function
// note: the following failed to fix link errors for vc 7.0 !
template void A::serialize<boost::archive::text_iarchive>(
boost::archive::text_iarchive & ar,
boost::archive::text_iarchive & ar,
const unsigned int file_version
);
template void A::serialize<boost::archive::text_oarchive>(
boost::archive::text_oarchive & ar,
boost::archive::text_oarchive & ar,
const unsigned int file_version
);
+1 -1
View File
@@ -4,7 +4,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// demo_pimpl_A.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
+3 -3
View File
@@ -1,7 +1,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// demo_polymorphic.cpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -29,7 +29,7 @@ int main(int argc, char* argv[])
// instantiate archive which inhertis polymorphic interface
// and the normal text archive implementation
boost::archive::polymorphic_text_oarchive oa(ss);
boost::archive::polymorphic_oarchive & oa_interface = oa;
boost::archive::polymorphic_oarchive & oa_interface = oa;
// we can just just the interface for saving
oa_interface << a;
}
@@ -53,7 +53,7 @@ int main(int argc, char* argv[])
{
// see above
boost::archive::polymorphic_binary_iarchive ia(ss);
boost::archive::polymorphic_iarchive & ia_interface = ia;
boost::archive::polymorphic_iarchive & ia_interface = ia;
// use just the polymorphic interface for loading.
ia_interface >> a1;
}
+3 -3
View File
@@ -1,7 +1,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// demo_polymorphic_A.cpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -16,11 +16,11 @@
// used by this demo.
template
void A::serialize<boost::archive::polymorphic_iarchive>(
boost::archive::polymorphic_iarchive &,
boost::archive::polymorphic_iarchive &,
const unsigned int
);
template
void A::serialize<boost::archive::polymorphic_oarchive>(
boost::archive::polymorphic_oarchive &,
boost::archive::polymorphic_oarchive &,
const unsigned int
);
+2 -2
View File
@@ -4,7 +4,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// demo_polymorphic_A.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -22,7 +22,7 @@ struct A {
// class a contains a pointer to a "hidden" declaration
template<class Archive>
void serialize(
Archive & ar,
Archive & ar,
const unsigned int file_version
){
ar & data;
+5 -5
View File
@@ -43,8 +43,8 @@ public:
c == rhs.c
&& i == rhs.i
&& i2 == rhs.i2
&& ui == rhs.ui
&& l == rhs.l
&& ui == rhs.ui
&& l == rhs.l
&& ul == rhs.ul
;
}
@@ -65,7 +65,7 @@ int main( int /* argc */, char* /* argv */[] )
A a1;
std::stringstream ss;
{
{
portable_binary_oarchive pboa(ss);
pboa << a;
}
@@ -77,7 +77,7 @@ int main( int /* argc */, char* /* argv */[] )
return 1;
ss.clear();
{
{
portable_binary_oarchive pboa(ss, endian_big);
pboa << a;
}
@@ -89,7 +89,7 @@ int main( int /* argc */, char* /* argv */[] )
return 1;
ss.clear();
{
{
portable_binary_oarchive pboa(ss, endian_big);
pboa << a;
}
+1 -1
View File
@@ -18,7 +18,7 @@
#include <cstdio> // remove
#include <boost/config.hpp>
#if defined(BOOST_NO_STDC_NAMESPACE)
namespace std{
namespace std{
using ::remove;
}
#endif
+1 -1
View File
@@ -14,7 +14,7 @@
#include "simple_log_archive.hpp"
int main(int argc, char *argv[])
{
{
// make the schedule
bus_schedule schedule;
+2 -2
View File
@@ -18,7 +18,7 @@ public:
//////////////////////////////////////////////////////////
// public interface used by programs that use the
// serialization library
typedef boost::mpl::bool_<true> is_saving;
typedef boost::mpl::bool_<true> is_saving;
typedef boost::mpl::bool_<false> is_loading;
template<class T> void register_type(){}
template<class T> trivial_oarchive & operator<<(const T & t){
@@ -33,7 +33,7 @@ public:
#include "demo_gps.hpp"
int main(int argc, char *argv[])
{
{
// make the schedule
bus_schedule schedule;
+3 -3
View File
@@ -15,7 +15,7 @@
#include <cstdio> // remove
#include <boost/config.hpp>
#if defined(BOOST_NO_STDC_NAMESPACE)
namespace std{
namespace std{
using ::remove;
}
#endif
@@ -47,7 +47,7 @@ restore_schedule(bus_schedule &s, const char * filename)
}
int main(int argc, char *argv[])
{
{
// make the schedule
bus_schedule original_schedule;
@@ -99,7 +99,7 @@ int main(int argc, char *argv[])
// display the complete schedule
std::cout << "original schedule";
std::cout << original_schedule;
std::string filename(boost::archive::tmpdir());
filename += "/demo.xml";
+2 -2
View File
@@ -51,7 +51,7 @@ class gps_position
public:
// every serializable class needs a constructor
gps_position(){};
gps_position(int _d, int _m, float _s) :
gps_position(int _d, int _m, float _s) :
degrees(_d), minutes(_m), seconds(_s)
{}
};
@@ -209,7 +209,7 @@ std::ostream & operator<<(std::ostream &os, const bus_route &br)
//
// Illustrates serialization of STL objects(pair) in a non-intrusive way.
// See definition of operator<< <pair<F, S> >(ar, pair)
//
//
// illustrates nesting of serializable classes
//
// illustrates use of version number to automatically grandfather older
+1 -1
View File
@@ -28,7 +28,7 @@ restore_schedule(bus_schedule &s, const char * filename)
}
int main(int argc, char *argv[])
{
{
// make a new schedule
bus_schedule new_schedule;
+2 -2
View File
@@ -24,7 +24,7 @@ void save_schedule(const bus_schedule &s, const char * filename){
}
int main(int argc, char *argv[])
{
{
// make the schedule
bus_schedule original_schedule;
@@ -76,7 +76,7 @@ int main(int argc, char *argv[])
// display the complete schedule
std::cout << "original schedule";
std::cout << original_schedule;
std::string filename(boost::archive::tmpdir());
filename += "/demo_save.xml";
+1 -1
View File
@@ -17,7 +17,7 @@ int main(int argc, char *argv[]){
}
std::filebuf fb;
fb.open(
argv[1],
argv[1],
std::ios_base::binary | std::ios_base::in | std::ios_base::out
);
if(!fb.is_open()){
+1 -1
View File
@@ -1,7 +1,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// log_archive.cpp:
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
+3 -3
View File
@@ -9,7 +9,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// log_archive.hpp
// (C) Copyright 2010 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2010 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -31,7 +31,7 @@ namespace boost {
// of text output which is useful for getting a formatted display of
// any serializable class. Intended to be useful as a debugging aid.
class log_archive :
/* protected ? */
/* protected ? */
public boost::archive::xml_oarchive_impl<log_archive>
{
typedef boost::archive::xml_oarchive_impl<log_archive> base;
@@ -72,7 +72,7 @@ class log_archive :
public:
log_archive(std::ostream & os, unsigned int flags = 0) :
boost::archive::xml_oarchive_impl<log_archive>(
os,
os,
flags | boost::archive::no_header
)
{}
@@ -1,7 +1,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// polymorphic_portable_binary_iarchive.cpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -22,8 +22,8 @@ namespace boost {
namespace archive {
template class binary_iarchive_impl<
polymorphic_portable_binary_iarchive,
std::istream::char_type,
polymorphic_portable_binary_iarchive,
std::istream::char_type,
std::istream::traits_type
>;
template class detail::archive_pointer_iserializer<
@@ -9,7 +9,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// polymorphic_portable_binary_iarchive.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -1,7 +1,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// polymorphic_portable_binary_oarchive.cpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -23,8 +23,8 @@ namespace archive {
// explicitly instantiate for this type of binary stream
template class binary_oarchive_impl<
polymorphic_portable_binary_oarchive,
std::ostream::char_type,
polymorphic_portable_binary_oarchive,
std::ostream::char_type,
std::ostream::traits_type
>;
template class detail::archive_pointer_oserializer<
@@ -9,7 +9,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// polymorphic_portable_binary_oarchive.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
+2 -2
View File
@@ -1,7 +1,7 @@
#ifndef PORTABLE_BINARY_ARCHIVE_HPP
#define PORTABLE_BINARY_ARCHIVE_HPP
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -21,7 +21,7 @@
#endif
#include <boost/archive/basic_archive.hpp>
#include <boost/detail/endian.hpp>
#include <boost/predef/other/endian.h>
enum portable_binary_archive_flags {
endian_big = 0x4000,
+9 -9
View File
@@ -1,7 +1,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// portable_binary_iarchive.cpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -11,13 +11,13 @@
#include <istream>
#include <string>
#include <boost/detail/endian.hpp>
#include <boost/predef/other/endian.h>
#include <boost/serialization/throw_exception.hpp>
#include <boost/archive/archive_exception.hpp>
#include "portable_binary_iarchive.hpp"
void
void
portable_binary_iarchive::load_impl(boost::intmax_t & l, char maxsize){
char size;
l = 0;
@@ -37,18 +37,18 @@ portable_binary_iarchive::load_impl(boost::intmax_t & l, char maxsize){
);
char * cptr = reinterpret_cast<char *>(& l);
#ifdef BOOST_BIG_ENDIAN
#if BOOST_ENDIAN_BIG_BYTE
cptr += (sizeof(boost::intmax_t) - size);
#endif
this->primitive_base_t::load_binary(cptr, size);
#ifdef BOOST_BIG_ENDIAN
#if BOOST_ENDIAN_BIG_BYTE
if(m_flags & endian_little)
#else
if(m_flags & endian_big)
#endif
reverse_bytes(size, cptr);
if(negative)
l = -l;
}
@@ -70,7 +70,7 @@ portable_binary_iarchive::load_override(
t.t[cn.size()] = '\0';
}
void
void
portable_binary_iarchive::init(unsigned int flags){
if(0 == (flags & boost::archive::no_header)){
// read signature in an archive version independent manner
@@ -94,7 +94,7 @@ portable_binary_iarchive::init(unsigned int flags){
boost::archive::archive_exception::unsupported_version
)
);
#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205))
this->set_library_version(input_library_version);
//#else
@@ -123,7 +123,7 @@ namespace detail {
template class basic_binary_iprimitive<
portable_binary_iarchive,
std::istream::char_type,
std::istream::char_type,
std::istream::traits_type
> ;
+11 -11
View File
@@ -14,7 +14,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// portable_binary_iarchive.hpp
// (C) Copyright 2002-7 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002-7 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)
@@ -34,7 +34,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// exception to be thrown if integer read from archive doesn't fit
// variable being loaded
class portable_binary_iarchive_exception :
class portable_binary_iarchive_exception :
public boost::archive::archive_exception
{
public:
@@ -62,13 +62,13 @@ public:
};
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// "Portable" input binary archive. It addresses integer size and endienness so
// "Portable" input binary archive. It addresses integer size and endienness so
// that binary archives can be passed across systems. Note:floating point types
// not addressed here
class portable_binary_iarchive :
public boost::archive::basic_binary_iprimitive<
portable_binary_iarchive,
std::istream::char_type,
std::istream::char_type,
std::istream::traits_type
>,
public boost::archive::detail::common_iarchive<
@@ -77,7 +77,7 @@ class portable_binary_iarchive :
{
typedef boost::archive::basic_binary_iprimitive<
portable_binary_iarchive,
std::istream::char_type,
std::istream::char_type,
std::istream::traits_type
> primitive_base_t;
typedef boost::archive::detail::common_iarchive<
@@ -148,21 +148,21 @@ protected:
void load(unsigned char & t){
this->primitive_base_t::load(t);
}
typedef boost::archive::detail::common_iarchive<portable_binary_iarchive>
typedef boost::archive::detail::common_iarchive<portable_binary_iarchive>
detail_common_iarchive;
template<class T>
void load_override(T & t){
this->detail_common_iarchive::load_override(t);
}
void load_override(boost::archive::class_name_type & t);
// binary files don't include the optional information
// binary files don't include the optional information
void load_override(boost::archive::class_id_optional_type &){}
void init(unsigned int flags);
public:
portable_binary_iarchive(std::istream & is, unsigned flags = 0) :
primitive_base_t(
* is.rdbuf(),
* is.rdbuf(),
0 != (flags & boost::archive::no_codecvt)
),
archive_base_t(flags),
@@ -173,13 +173,13 @@ public:
portable_binary_iarchive(
std::basic_streambuf<
std::istream::char_type,
std::istream::char_type,
std::istream::traits_type
> & bsb,
> & bsb,
unsigned int flags
) :
primitive_base_t(
bsb,
bsb,
0 != (flags & boost::archive::no_codecvt)
),
archive_base_t(flags),
+6 -6
View File
@@ -1,7 +1,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// portable_binary_oarchive.cpp
// (C) Copyright 2002-7 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002-7 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)
@@ -9,10 +9,10 @@
// See http://www.boost.org for updates, documentation, and revision history.
#include <ostream>
#include <boost/detail/endian.hpp>
#include <boost/predef/other/endian.h>
#include "portable_binary_oarchive.hpp"
void
void
portable_binary_oarchive::save_impl(
const boost::intmax_t l,
const char maxsize
@@ -45,7 +45,7 @@ portable_binary_oarchive::save_impl(
else
ll = l;
char * cptr = reinterpret_cast<char *>(& ll);
#ifdef BOOST_BIG_ENDIAN
#if BOOST_ENDIAN_BIG_BYTE
cptr += (sizeof(boost::intmax_t) - size);
if(m_flags & endian_little)
reverse_bytes(size, cptr);
@@ -56,7 +56,7 @@ portable_binary_oarchive::save_impl(
this->primitive_base_t::save_binary(cptr, size);
}
void
void
portable_binary_oarchive::init(unsigned int flags) {
if(m_flags == (endian_big | endian_little)){
boost::serialization::throw_exception(
@@ -90,7 +90,7 @@ namespace detail {
template class basic_binary_oprimitive<
portable_binary_oarchive,
std::ostream::char_type,
std::ostream::char_type,
std::ostream::traits_type
> ;
+11 -11
View File
@@ -14,7 +14,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// portable_binary_oarchive.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -33,12 +33,12 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// exception to be thrown if integer read from archive doesn't fit
// variable being loaded
class portable_binary_oarchive_exception :
class portable_binary_oarchive_exception :
public boost::archive::archive_exception
{
public:
typedef enum {
invalid_flags
invalid_flags
} exception_code;
portable_binary_oarchive_exception(exception_code c = invalid_flags )
{}
@@ -56,14 +56,14 @@ public:
};
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// "Portable" output binary archive. This is a variation of the native binary
// "Portable" output binary archive. This is a variation of the native binary
// archive. it addresses integer size and endienness so that binary archives can
// be passed across systems. Note:floating point types not addressed here
class portable_binary_oarchive :
public boost::archive::basic_binary_oprimitive<
portable_binary_oarchive,
std::ostream::char_type,
std::ostream::char_type,
std::ostream::traits_type
>,
public boost::archive::detail::common_oarchive<
@@ -72,7 +72,7 @@ class portable_binary_oarchive :
{
typedef boost::archive::basic_binary_oprimitive<
portable_binary_oarchive,
std::ostream::char_type,
std::ostream::char_type,
std::ostream::traits_type
> primitive_base_t;
typedef boost::archive::detail::common_oarchive<
@@ -128,7 +128,7 @@ protected:
// default processing - kick back to base class. Note the
// extra stuff to get it passed borland compilers
typedef boost::archive::detail::common_oarchive<portable_binary_oarchive>
typedef boost::archive::detail::common_oarchive<portable_binary_oarchive>
detail_common_oarchive;
template<class T>
void save_override(T & t){
@@ -139,7 +139,7 @@ protected:
const std::string s(t);
* this << s;
}
// binary files don't include the optional information
// binary files don't include the optional information
void save_override(
const boost::archive::class_id_optional_type & /* t */
){}
@@ -159,13 +159,13 @@ public:
portable_binary_oarchive(
std::basic_streambuf<
std::ostream::char_type,
std::ostream::char_type,
std::ostream::traits_type
> & bsb,
> & bsb,
unsigned int flags
) :
primitive_base_t(
bsb,
bsb,
0 != (flags & boost::archive::no_codecvt)
),
archive_base_t(flags),
+10 -10
View File
@@ -9,7 +9,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// simple_log_archive.hpp
// (C) Copyright 2010 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2010 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -21,8 +21,8 @@
#include <boost/config.hpp>
#if defined(BOOST_NO_STDC_NAMESPACE)
namespace std{
using ::size_t;
namespace std{
using ::size_t;
} // namespace std
#endif
@@ -65,15 +65,15 @@ class simple_log_archive {
// make sure call is routed through the highest interface that might
// be specialized by the user.
boost::serialization::serialize_adl(
ar,
const_cast<T &>(t),
ar,
const_cast<T &>(t),
::boost::serialization::version< T >::value
);
}
};
template<class T>
void save(const T &t){
typedef
typedef
BOOST_DEDUCED_TYPENAME boost::mpl::eval_if<boost::is_enum< T >,
boost::mpl::identity<save_enum_type<simple_log_archive> >,
//else
@@ -88,7 +88,7 @@ class simple_log_archive {
boost::mpl::identity<save_only<simple_log_archive> >
> >::type typex;
typex::invoke(*this, t);
}
}
#ifndef BOOST_NO_STD_WSTRING
void save(const std::wstring &ws){
m_os << "wide string types not suported in log archive";
@@ -110,12 +110,12 @@ public:
return 0;
}
void
void
save_binary(const void *address, std::size_t count){
m_os << "save_binary not implemented";
}
// the << operators
// the << operators
template<class T>
simple_log_archive & operator<<(T const & t){
m_os << ' ';
@@ -151,7 +151,7 @@ public:
return * this;
}
// the & operator
// the & operator
template<class T>
simple_log_archive & operator&(const T & t){
return * this << t;
+16 -16
View File
@@ -9,7 +9,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// archive/archive_exception.hpp:
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -20,16 +20,16 @@
#include <boost/assert.hpp>
#include <string>
#include <boost/config.hpp>
#include <boost/config.hpp>
#include <boost/archive/detail/decl.hpp>
// note: the only reason this is in here is that windows header
// includes #define exception_code _exception_code (arrrgghhhh!).
// the most expedient way to address this is be sure that this
// header is always included whenever this header file is included.
#if defined(BOOST_WINDOWS)
#include <excpt.h>
#endif
#if defined(BOOST_WINDOWS)
#include <excpt.h>
#endif
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
@@ -39,7 +39,7 @@ namespace archive {
//////////////////////////////////////////////////////////////////////
// exceptions thrown by archives
//
class BOOST_SYMBOL_VISIBLE archive_exception :
class BOOST_SYMBOL_VISIBLE archive_exception :
public virtual std::exception
{
private:
@@ -52,7 +52,7 @@ protected:
public:
typedef enum {
no_exception, // initialized without code
other_exception, // any excepton not listed below
other_exception, // any exception not listed below
unregistered_class, // attempt to serialize a pointer of
// an unregistered class
invalid_signature, // first line of archive does not contain
@@ -61,9 +61,9 @@ public:
// subsequent to this one
pointer_conflict, // an attempt has been made to directly
// serialize an object which has
// already been serialized through a pointer.
// Were this permitted, the archive load would result
// in the creation of an extra copy of the obect.
// already been serialized through a pointer.
// Were this permitted, the archive load would result
// in the creation of an extra copy of the object.
incompatible_native_format, // attempt to read native binary format
// on incompatible platform
array_size_too_short,// array being loaded doesn't fit in array allocated
@@ -71,9 +71,9 @@ public:
invalid_class_name, // class name greater than the maximum permitted.
// most likely a corrupted archive or an attempt
// to insert virus via buffer overrun method.
unregistered_cast, // base - derived relationship not registered with
unregistered_cast, // base - derived relationship not registered with
// void_cast_register
unsupported_class_version, // type saved with a version # greater than the
unsupported_class_version, // type saved with a version # greater than the
// one used by the program. This indicates that the program
// needs to be rebuilt.
multiple_code_instantiation, // code for implementing serialization for some
@@ -83,13 +83,13 @@ public:
exception_code code;
BOOST_ARCHIVE_DECL archive_exception(
exception_code c,
exception_code c,
const char * e1 = NULL,
const char * e2 = NULL
) BOOST_NOEXCEPT;
BOOST_ARCHIVE_DECL archive_exception(archive_exception const &) BOOST_NOEXCEPT ;
virtual BOOST_ARCHIVE_DECL ~archive_exception() BOOST_NOEXCEPT_OR_NOTHROW ;
virtual BOOST_ARCHIVE_DECL const char * what() const BOOST_NOEXCEPT_OR_NOTHROW ;
BOOST_ARCHIVE_DECL archive_exception(archive_exception const &) BOOST_NOEXCEPT;
BOOST_ARCHIVE_DECL ~archive_exception() BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE;
BOOST_ARCHIVE_DECL const char * what() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE;
};
}// namespace archive
+44 -74
View File
@@ -9,7 +9,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_archive.hpp:
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -18,9 +18,9 @@
#include <cstring> // count
#include <boost/assert.hpp>
#include <boost/config.hpp>
#include <boost/cstdint.hpp> // size_t
#include <boost/noncopyable.hpp>
#include <boost/integer_traits.hpp>
#include <boost/noncopyable.hpp>
#include <boost/serialization/library_version_type.hpp>
#include <boost/archive/detail/auto_link_archive.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
@@ -33,76 +33,43 @@ namespace archive {
#pragma warning( disable : 4244 4267 )
#endif
/* NOTE : Warning : Warning : Warning : Warning : Warning
* Don't ever changes this. If you do, they previously created
* binary archives won't be readable !!!
*/
class library_version_type {
private:
typedef uint_least16_t base_type;
base_type t;
public:
library_version_type(): t(0) {};
explicit library_version_type(const unsigned int & t_) : t(t_){
BOOST_ASSERT(t_ <= boost::integer_traits<base_type>::const_max);
}
library_version_type(const library_version_type & t_) :
t(t_.t)
{}
library_version_type & operator=(const library_version_type & rhs){
t = rhs.t;
return *this;
}
// used for text output
operator base_type () const {
return t;
}
// used for text input
operator base_type & (){
return t;
}
bool operator==(const library_version_type & rhs) const {
return t == rhs.t;
}
bool operator<(const library_version_type & rhs) const {
return t < rhs.t;
}
};
BOOST_ARCHIVE_DECL library_version_type
BOOST_ARCHIVE_DECL boost::serialization::library_version_type
BOOST_ARCHIVE_VERSION();
// create alias in boost::archive for older user code.
typedef boost::serialization::library_version_type library_version_type;
class version_type {
private:
typedef uint_least32_t base_type;
base_type t;
public:
// should be private - but MPI fails if it's not!!!
version_type(): t(0) {};
version_type(): t(0) {}
explicit version_type(const unsigned int & t_) : t(t_){
BOOST_ASSERT(t_ <= boost::integer_traits<base_type>::const_max);
}
version_type(const version_type & t_) :
version_type(const version_type & t_) :
t(t_.t)
{}
version_type & operator=(const version_type & rhs){
t = rhs.t;
t = rhs.t;
return *this;
}
// used for text output
operator base_type () const {
return t;
}
}
// used for text intput
operator base_type & (){
return t;
}
}
bool operator==(const version_type & rhs) const {
return t == rhs.t;
}
}
bool operator<(const version_type & rhs) const {
return t < rhs.t;
}
}
};
class class_id_type {
@@ -111,70 +78,73 @@ private:
base_type t;
public:
// should be private - but then can't use BOOST_STRONG_TYPE below
class_id_type() : t(0) {};
class_id_type() : t(0) {}
explicit class_id_type(const int t_) : t(t_){
BOOST_ASSERT(t_ <= boost::integer_traits<base_type>::const_max);
}
explicit class_id_type(const std::size_t t_) : t(t_){
// BOOST_ASSERT(t_ <= boost::integer_traits<base_type>::const_max);
}
class_id_type(const class_id_type & t_) :
class_id_type(const class_id_type & t_) :
t(t_.t)
{}
class_id_type & operator=(const class_id_type & rhs){
t = rhs.t;
t = rhs.t;
return *this;
}
// used for text output
operator base_type () const {
return t;
}
}
// used for text input
operator base_type &() {
return t;
}
}
bool operator==(const class_id_type & rhs) const {
return t == rhs.t;
}
}
bool operator<(const class_id_type & rhs) const {
return t < rhs.t;
}
}
};
#define NULL_POINTER_TAG boost::archive::class_id_type(-1)
#define BOOST_SERIALIZATION_NULL_POINTER_TAG boost::archive::class_id_type(-1)
class object_id_type {
private:
typedef uint_least32_t base_type;
base_type t;
public:
object_id_type(): t(0) {};
object_id_type(): t(0) {}
// note: presumes that size_t >= unsigned int.
explicit object_id_type(const std::size_t & t_) : t(t_){
// use explicit cast to silence useless warning
explicit object_id_type(const std::size_t & t_) : t(static_cast<base_type>(t_)){
// make quadruple sure that we haven't lost any real integer
// precision
BOOST_ASSERT(t_ <= boost::integer_traits<base_type>::const_max);
}
object_id_type(const object_id_type & t_) :
object_id_type(const object_id_type & t_) :
t(t_.t)
{}
object_id_type & operator=(const object_id_type & rhs){
t = rhs.t;
t = rhs.t;
return *this;
}
// used for text output
operator base_type () const {
return t;
}
}
// used for text input
operator base_type & () {
return t;
}
}
bool operator==(const object_id_type & rhs) const {
return t == rhs.t;
}
}
bool operator<(const object_id_type & rhs) const {
return t < rhs.t;
}
}
};
#if defined(_MSC_VER)
@@ -185,16 +155,16 @@ struct tracking_type {
bool t;
explicit tracking_type(const bool t_ = false)
: t(t_)
{};
{}
tracking_type(const tracking_type & t_)
: t(t_.t)
{}
operator bool () const {
return t;
};
}
operator bool & () {
return t;
};
}
tracking_type & operator=(const bool t_){
t = t_;
return *this;
@@ -211,8 +181,8 @@ struct tracking_type {
}
};
struct class_name_type :
private boost::noncopyable
struct class_name_type :
private boost::noncopyable
{
char *t;
operator const char * & () const {
@@ -224,9 +194,9 @@ struct class_name_type :
std::size_t size() const {
return std::strlen(t);
}
explicit class_name_type(const char *key_)
explicit class_name_type(const char *key_)
: t(const_cast<char *>(key_)){}
explicit class_name_type(char *key_)
explicit class_name_type(char *key_)
: t(key_){}
class_name_type & operator=(const class_name_type & rhs){
t = rhs.t;
@@ -246,7 +216,7 @@ BOOST_ARCHIVE_DECL const char *
BOOST_ARCHIVE_SIGNATURE();
/* NOTE : Warning : Warning : Warning : Warning : Warning
* If any of these are changed to different sized types,
* If any of these are changed to different sized types,
* binary_iarchive won't be able to read older archives
* unless you rev the library version and include conditional
* code based on the library version. There is nothing
@@ -276,7 +246,7 @@ BOOST_ARCHIVE_STRONG_TYPEDEF(object_id_type, object_reference_type)
// set implementation level to primitive for all types
// used internally by the serialization library
BOOST_CLASS_IMPLEMENTATION(boost::archive::library_version_type, primitive_type)
BOOST_CLASS_IMPLEMENTATION(boost::serialization::library_version_type, primitive_type)
BOOST_CLASS_IMPLEMENTATION(boost::archive::version_type, primitive_type)
BOOST_CLASS_IMPLEMENTATION(boost::archive::class_id_type, primitive_type)
BOOST_CLASS_IMPLEMENTATION(boost::archive::class_id_reference_type, primitive_type)
@@ -288,10 +258,10 @@ BOOST_CLASS_IMPLEMENTATION(boost::archive::tracking_type, primitive_type)
#include <boost/serialization/is_bitwise_serializable.hpp>
// set types used internally by the serialization library
// set types used internally by the serialization library
// to be bitwise serializable
BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::library_version_type)
BOOST_IS_BITWISE_SERIALIZABLE(boost::serialization::library_version_type)
BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::version_type)
BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::class_id_type)
BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::class_id_reference_type)
+41 -28
View File
@@ -16,7 +16,7 @@
// IN GENERAL, ARCHIVES CREATED WITH THIS CLASS WILL NOT BE READABLE
// ON PLATFORM APART FROM THE ONE THEY ARE CREATED ON
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -30,6 +30,7 @@
#include <boost/archive/detail/common_iarchive.hpp>
#include <boost/serialization/collection_size_type.hpp>
#include <boost/serialization/string.hpp>
#include <boost/serialization/library_version_type.hpp>
#include <boost/serialization/item_version_type.hpp>
#include <boost/integer_traits.hpp>
@@ -40,7 +41,7 @@
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
namespace boost {
namespace boost {
namespace archive {
namespace detail {
@@ -50,7 +51,7 @@ namespace detail {
/////////////////////////////////////////////////////////////////////////
// class basic_binary_iarchive - read serialized objects from a input binary stream
template<class Archive>
class BOOST_SYMBOL_VISIBLE basic_binary_iarchive :
class BOOST_SYMBOL_VISIBLE basic_binary_iarchive :
public detail::common_iarchive<Archive>
{
#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
@@ -66,7 +67,7 @@ protected:
#endif
#endif
// intermediate level to support override of operators
// fot templates in the absence of partial function
// fot templates in the absence of partial function
// template ordering. If we get here pass to base class
// note extra nonsense to sneak it pass the borland compiers
typedef detail::common_iarchive<Archive> detail_common_iarchive;
@@ -84,12 +85,12 @@ protected:
BOOST_STATIC_ASSERT(sizeof(object_id_type) == sizeof(uint_least32_t));
BOOST_STATIC_ASSERT(sizeof(object_reference_type) == sizeof(uint_least32_t));
// binary files don't include the optional information
// binary files don't include the optional information
void load_override(class_id_optional_type & /* t */){}
void load_override(tracking_type & t, int /*version*/){
library_version_type lvt = this->get_library_version();
if(boost::archive::library_version_type(6) < lvt){
boost::serialization::library_version_type lv = this->get_library_version();
if(boost::serialization::library_version_type(6) < lv){
int_least8_t x=0;
* this->This() >> x;
t = boost::archive::tracking_type(x);
@@ -101,18 +102,30 @@ protected:
}
}
void load_override(class_id_type & t){
library_version_type lvt = this->get_library_version();
if(boost::archive::library_version_type(7) < lvt){
boost::serialization::library_version_type lv = this->get_library_version();
/*
* library versions:
* boost 1.39 -> 5
* boost 1.43 -> 7
* boost 1.47 -> 9
*
*
* 1) in boost 1.43 and inferior, class_id_type is always a 16bit value, with no check on the library version
* --> this means all archives with version v <= 7 are written with a 16bit class_id_type
* 2) in boost 1.44 this load_override has disappeared (and thus boost 1.44 is not backward compatible at all !!)
* 3) recent boosts reintroduced load_override with a test on the version :
* - v > 7 : this->detail_common_iarchive::load_override(t, version)
* - v > 6 : 16bit
* - other : 32bit
* --> which is obviously incorrect, see point 1
*
* the fix here decodes class_id_type on 16bit for all v <= 7, which seems to be the correct behaviour ...
*/
if(boost::serialization::library_version_type (7) < lv){
this->detail_common_iarchive::load_override(t);
}
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;
int_least16_t x=0;
* this->This() >> x;
t = boost::archive::class_id_type(x);
}
@@ -122,24 +135,24 @@ protected:
}
void load_override(version_type & t){
library_version_type lvt = this->get_library_version();
if(boost::archive::library_version_type(7) < lvt){
boost::serialization::library_version_type lv = this->get_library_version();
if(boost::serialization::library_version_type(7) < lv){
this->detail_common_iarchive::load_override(t);
}
else
if(boost::archive::library_version_type(6) < lvt){
if(boost::serialization::library_version_type(6) < lv){
uint_least8_t x=0;
* this->This() >> x;
t = boost::archive::version_type(x);
}
else
if(boost::archive::library_version_type(5) < lvt){
if(boost::serialization::library_version_type(5) < lv){
uint_least16_t x=0;
* this->This() >> x;
t = boost::archive::version_type(x);
}
else
if(boost::archive::library_version_type(2) < lvt){
if(boost::serialization::library_version_type(2) < lv){
// upto 255 versions
unsigned char x=0;
* this->This() >> x;
@@ -153,13 +166,13 @@ protected:
}
void load_override(boost::serialization::item_version_type & t){
library_version_type lvt = this->get_library_version();
// if(boost::archive::library_version_type(7) < lvt){
if(boost::archive::library_version_type(6) < lvt){
boost::serialization::library_version_type lv = this->get_library_version();
// if(boost::serialization::library_version_type(7) < lvt){
if(boost::serialization::library_version_type(6) < lv){
this->detail_common_iarchive::load_override(t);
}
else
if(boost::archive::library_version_type(6) < lvt){
if(boost::serialization::library_version_type(6) < lv){
uint_least16_t x=0;
* this->This() >> x;
t = boost::serialization::item_version_type(x);
@@ -172,21 +185,21 @@ protected:
}
void load_override(serialization::collection_size_type & t){
if(boost::archive::library_version_type(5) < this->get_library_version()){
if(boost::serialization::library_version_type(5) < this->get_library_version()){
this->detail_common_iarchive::load_override(t);
}
else{
unsigned int x=0;
* this->This() >> x;
t = serialization::collection_size_type(x);
}
}
}
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
load_override(class_name_type & t);
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
init();
basic_binary_iarchive(unsigned int flags) :
detail::common_iarchive<Archive>(flags)
{}
@@ -20,7 +20,7 @@
// IN GENERAL, ARCHIVES CREATED WITH THIS CLASS WILL NOT BE READABLE
// ON PLATFORM APART FROM THE ONE THEY ARE CREATED ON
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -37,8 +37,8 @@
#include <boost/config.hpp>
#if defined(BOOST_NO_STDC_NAMESPACE)
namespace std{
using ::memcpy;
namespace std{
using ::memcpy;
using ::size_t;
} // namespace std
#endif
@@ -48,7 +48,6 @@ namespace std{
#include <boost/integer.hpp>
#include <boost/integer_traits.hpp>
//#include <boost/mpl/placeholders.hpp>
#include <boost/serialization/is_bitwise_serializable.hpp>
#include <boost/serialization/array_wrapper.hpp>
@@ -58,7 +57,7 @@ namespace std{
#include <boost/archive/detail/auto_link_archive.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
namespace boost {
namespace boost {
namespace archive {
/////////////////////////////////////////////////////////////////////////////
@@ -98,8 +97,8 @@ public:
/////////////////////////////////////////////////////////
// fundamental types that need special treatment
// trap usage of invalid uninitialized boolean
// trap usage of invalid uninitialized boolean
void load(bool & t){
load_binary(& t, sizeof(t));
int i = t;
@@ -119,29 +118,29 @@ public:
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
init();
BOOST_ARCHIVE_OR_WARCHIVE_DECL
BOOST_ARCHIVE_OR_WARCHIVE_DECL
basic_binary_iprimitive(
std::basic_streambuf<Elem, Tr> & sb,
std::basic_streambuf<Elem, Tr> & sb,
bool no_codecvt
);
BOOST_ARCHIVE_OR_WARCHIVE_DECL
BOOST_ARCHIVE_OR_WARCHIVE_DECL
~basic_binary_iprimitive();
public:
// we provide an optimized load for all fundamental types
// typedef serialization::is_bitwise_serializable<mpl::_1>
// typedef serialization::is_bitwise_serializable<mpl::_1>
// use_array_optimization;
struct use_array_optimization {
template <class T>
#if defined(BOOST_NO_DEPENDENT_NESTED_DERIVATIONS)
struct apply {
typedef typename boost::serialization::is_bitwise_serializable< T >::type type;
struct use_array_optimization {
template <class T>
#if defined(BOOST_NO_DEPENDENT_NESTED_DERIVATIONS)
struct apply {
typedef typename boost::serialization::is_bitwise_serializable< T >::type type;
};
#else
struct apply : public boost::serialization::is_bitwise_serializable< T > {};
struct apply : public boost::serialization::is_bitwise_serializable< T > {};
#endif
};
// the optimized load_array dispatches to load_binary
// the optimized load_array dispatches to load_binary
template <class ValueType>
void load_array(serialization::array_wrapper<ValueType>& a, unsigned int)
{
@@ -155,17 +154,17 @@ public:
template<class Archive, class Elem, class Tr>
inline void
basic_binary_iprimitive<Archive, Elem, Tr>::load_binary(
void *address,
void *address,
std::size_t count
){
// note: an optimizer should eliminate the following for char files
BOOST_ASSERT(
static_cast<std::streamsize>(count / sizeof(Elem))
static_cast<std::streamsize>(count / sizeof(Elem))
<= boost::integer_traits<std::streamsize>::const_max
);
std::streamsize s = static_cast<std::streamsize>(count / sizeof(Elem));
std::streamsize scount = m_sb.sgetn(
static_cast<Elem *>(address),
static_cast<Elem *>(address),
s
);
if(scount != s)
+11 -11
View File
@@ -9,7 +9,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_binary_oarchive.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -58,7 +58,7 @@ namespace detail {
// does have the virtue of buiding the smalles archive in the minimum amount
// of time. So under some circumstances it may be he right choice.
template<class Archive>
class BOOST_SYMBOL_VISIBLE basic_binary_oarchive :
class BOOST_SYMBOL_VISIBLE basic_binary_oarchive :
public detail::common_oarchive<Archive>
{
#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
@@ -90,18 +90,18 @@ protected:
BOOST_STATIC_ASSERT(sizeof(object_id_type) == sizeof(uint_least32_t));
BOOST_STATIC_ASSERT(sizeof(object_reference_type) == sizeof(uint_least32_t));
// binary files don't include the optional information
// binary files don't include the optional information
void save_override(const class_id_optional_type & /* t */){}
// enable this if we decide to support generation of previous versions
#if 0
void save_override(const boost::archive::version_type & t){
library_version_type lvt = this->get_library_version();
if(boost::archive::library_version_type(7) < lvt){
if(boost::serialization::library_version_type(7) < lvt){
this->detail_common_oarchive::save_override(t);
}
else
if(boost::archive::library_version_type(6) < lvt){
if(boost::serialization::library_version_type(6) < lvt){
const boost::uint_least16_t x = t;
* this->This() << x;
}
@@ -112,11 +112,11 @@ protected:
}
void save_override(const boost::serialization::item_version_type & t){
library_version_type lvt = this->get_library_version();
if(boost::archive::library_version_type(7) < lvt){
if(boost::serialization::library_version_type(7) < lvt){
this->detail_common_oarchive::save_override(t);
}
else
if(boost::archive::library_version_type(6) < lvt){
if(boost::serialization::library_version_type(6) < lvt){
const boost::uint_least16_t x = t;
* this->This() << x;
}
@@ -128,11 +128,11 @@ protected:
void save_override(class_id_type & t){
library_version_type lvt = this->get_library_version();
if(boost::archive::library_version_type(7) < lvt){
if(boost::serialization::library_version_type(7) < lvt){
this->detail_common_oarchive::save_override(t);
}
else
if(boost::archive::library_version_type(6) < lvt){
if(boost::serialization::library_version_type(6) < lvt){
const boost::int_least16_t x = t;
* this->This() << x;
}
@@ -155,11 +155,11 @@ protected:
#if 0
void save_override(const serialization::collection_size_type & t){
if (get_library_version() < boost::archive::library_version_type(6)){
if (get_library_version() < boost::serialization::library_version_type(6)){
unsigned int x=0;
* this->This() >> x;
t = serialization::collection_size_type(x);
}
}
else{
* this->This() >> t;
}
@@ -9,7 +9,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_binary_oprimitive.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -32,8 +32,8 @@
#include <boost/config.hpp>
#if defined(BOOST_NO_STDC_NAMESPACE)
namespace std{
using ::size_t;
namespace std{
using ::size_t;
} // namespace std
#endif
@@ -43,7 +43,6 @@ namespace std{
#include <boost/scoped_ptr.hpp>
#include <boost/serialization/throw_exception.hpp>
//#include <boost/mpl/placeholders.hpp>
#include <boost/serialization/is_bitwise_serializable.hpp>
#include <boost/serialization/array_wrapper.hpp>
@@ -93,7 +92,7 @@ public:
/////////////////////////////////////////////////////////
// fundamental types that need special treatment
// trap usage of invalid uninitialized boolean which would
// otherwise crash on load.
void save(const bool t){
@@ -113,32 +112,32 @@ public:
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
init();
BOOST_ARCHIVE_OR_WARCHIVE_DECL
BOOST_ARCHIVE_OR_WARCHIVE_DECL
basic_binary_oprimitive(
std::basic_streambuf<Elem, Tr> & sb,
std::basic_streambuf<Elem, Tr> & sb,
bool no_codecvt
);
BOOST_ARCHIVE_OR_WARCHIVE_DECL
BOOST_ARCHIVE_OR_WARCHIVE_DECL
~basic_binary_oprimitive();
public:
// we provide an optimized save for all fundamental types
// typedef serialization::is_bitwise_serializable<mpl::_1>
// typedef serialization::is_bitwise_serializable<mpl::_1>
// use_array_optimization;
// workaround without using mpl lambdas
struct use_array_optimization {
template <class T>
#if defined(BOOST_NO_DEPENDENT_NESTED_DERIVATIONS)
struct apply {
typedef typename boost::serialization::is_bitwise_serializable< T >::type type;
template <class T>
#if defined(BOOST_NO_DEPENDENT_NESTED_DERIVATIONS)
struct apply {
typedef typename boost::serialization::is_bitwise_serializable< T >::type type;
};
#else
struct apply : public boost::serialization::is_bitwise_serializable< T > {};
struct apply : public boost::serialization::is_bitwise_serializable< T > {};
#endif
};
// the optimized save_array dispatches to save_binary
// the optimized save_array dispatches to save_binary
template <class ValueType>
void save_array(boost::serialization::array_wrapper<ValueType> const& a, unsigned int)
{
@@ -149,9 +148,9 @@ public:
};
template<class Archive, class Elem, class Tr>
inline void
inline void
basic_binary_oprimitive<Archive, Elem, Tr>::save_binary(
const void *address,
const void *address,
std::size_t count
){
// BOOST_ASSERT(count <= std::size_t(boost::integer_traits<std::streamsize>::const_max));
@@ -166,7 +165,7 @@ basic_binary_oprimitive<Archive, Elem, Tr>::save_binary(
// figure number of elements to output - round up
count = ( count + sizeof(Elem) - 1) / sizeof(Elem);
std::streamsize scount = m_sb.sputn(
static_cast<const Elem *>(address),
static_cast<const Elem *>(address),
static_cast<std::streamsize>(count)
);
if(count != static_cast<std::size_t>(scount))
@@ -174,14 +173,14 @@ basic_binary_oprimitive<Archive, Elem, Tr>::save_binary(
archive_exception(archive_exception::output_stream_error)
);
//os.write(
// static_cast<const typename OStream::char_type *>(address),
// static_cast<const typename OStream::char_type *>(address),
// count
//);
//BOOST_ASSERT(os.good());
}
} //namespace boost
} //namespace archive
} //namespace boost
} //namespace archive
#include <boost/archive/detail/abi_suffix.hpp> // pop pragmas
@@ -9,7 +9,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_text_iarchive.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -46,7 +46,7 @@ namespace detail {
/////////////////////////////////////////////////////////////////////////
// class basic_text_iarchive - read serialized objects from a input text stream
template<class Archive>
class BOOST_SYMBOL_VISIBLE basic_text_iarchive :
class BOOST_SYMBOL_VISIBLE basic_text_iarchive :
public detail::common_iarchive<Archive>
{
#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
@@ -54,7 +54,7 @@ public:
#else
protected:
#if BOOST_WORKAROUND(BOOST_MSVC, < 1500)
// for some inexplicable reason insertion of "class" generates compile erro
// for some inexplicable reason insertion of "class" generates compile error
// on msvc 7.1
friend detail::interface_iarchive<Archive>;
#else
@@ -62,26 +62,26 @@ protected:
#endif
#endif
// intermediate level to support override of operators
// fot templates in the absence of partial function
// fot templates in the absence of partial function
// template ordering
typedef detail::common_iarchive<Archive> detail_common_iarchive;
template<class T>
void load_override(T & t){
this->detail_common_iarchive::load_override(t);
}
// text file don't include the optional information
// text file don't include the optional information
void load_override(class_id_optional_type & /*t*/){}
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
load_override(class_name_type & t);
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
init(void);
init();
basic_text_iarchive(unsigned int flags) :
basic_text_iarchive(unsigned int flags) :
detail::common_iarchive<Archive>(flags)
{}
~basic_text_iarchive(){}
~basic_text_iarchive() BOOST_OVERRIDE {}
};
} // namespace archive
@@ -9,7 +9,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_text_iprimitive.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -29,8 +29,8 @@
#include <boost/config.hpp>
#if defined(BOOST_NO_STDC_NAMESPACE)
namespace std{
using ::size_t;
namespace std{
using ::size_t;
#if ! defined(BOOST_DINKUMWARE_STDLIB) && ! defined(__SGI_STL_PORT)
using ::locale;
#endif
@@ -121,9 +121,9 @@ protected:
t = i;
}
#endif
BOOST_ARCHIVE_OR_WARCHIVE_DECL
BOOST_ARCHIVE_OR_WARCHIVE_DECL
basic_text_iprimitive(IStream &is, bool no_codecvt);
BOOST_ARCHIVE_OR_WARCHIVE_DECL
BOOST_ARCHIVE_OR_WARCHIVE_DECL
~basic_text_iprimitive();
public:
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
@@ -9,7 +9,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_text_oarchive.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -44,9 +44,9 @@ namespace detail {
} // namespace detail
/////////////////////////////////////////////////////////////////////////
// class basic_text_oarchive
// class basic_text_oarchive
template<class Archive>
class BOOST_SYMBOL_VISIBLE basic_text_oarchive :
class BOOST_SYMBOL_VISIBLE basic_text_oarchive :
public detail::common_oarchive<Archive>
{
#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
@@ -89,7 +89,7 @@ protected:
this->detail_common_oarchive::save_override(t);
}
// text file don't include the optional information
// text file don't include the optional information
void save_override(const class_id_optional_type & /* t */){}
void save_override(const class_name_type & t){
@@ -104,7 +104,7 @@ protected:
detail::common_oarchive<Archive>(flags),
delimiter(none)
{}
~basic_text_oarchive(){}
~basic_text_oarchive() BOOST_OVERRIDE {}
};
} // namespace archive
+11 -10
View File
@@ -9,7 +9,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_text_oprimitive.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -38,7 +38,7 @@
#endif
#if defined(BOOST_NO_STDC_NAMESPACE)
namespace std{
namespace std{
using ::size_t;
#if ! defined(BOOST_DINKUMWARE_STDLIB) && ! defined(__SGI_STL_PORT)
using ::locale;
@@ -142,22 +142,23 @@ protected:
template<class T>
struct is_float {
typedef typename mpl::bool_<
boost::is_floating_point<T>::value
typedef typename mpl::bool_<
boost::is_floating_point<T>::value
|| (std::numeric_limits<T>::is_specialized
&& !std::numeric_limits<T>::is_integer
&& !std::numeric_limits<T>::is_exact
&& std::numeric_limits<T>::max_exponent)
&& std::numeric_limits<T>::max_exponent)
>::type type;
};
template<class T>
void save_impl(const T &t, boost::mpl::bool_<true> &){
// must be a user mistake - can't serialize un-initialized data
if(os.fail())
if(os.fail()){
boost::serialization::throw_exception(
archive_exception(archive_exception::output_stream_error)
);
}
// The formulae for the number of decimla digits required is given in
// http://www2.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1822.pdf
// which is derived from Kahan's paper:
@@ -181,7 +182,7 @@ protected:
BOOST_ARCHIVE_OR_WARCHIVE_DECL
basic_text_oprimitive(OStream & os, bool no_codecvt);
BOOST_ARCHIVE_OR_WARCHIVE_DECL
BOOST_ARCHIVE_OR_WARCHIVE_DECL
~basic_text_oprimitive();
public:
// unformatted append of one character
@@ -197,12 +198,12 @@ public:
while('\0' != *s)
os.put(*s++);
}
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
save_binary(const void *address, std::size_t count);
};
} //namespace boost
} //namespace archive
} //namespace boost
} //namespace archive
#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
+10 -10
View File
@@ -9,7 +9,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_xml_archive.hpp:
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -21,40 +21,40 @@
#include <boost/archive/detail/auto_link_archive.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
namespace boost {
namespace boost {
namespace archive {
// constant strings used in xml i/o
extern
extern
BOOST_ARCHIVE_DECL const char *
BOOST_ARCHIVE_XML_OBJECT_ID();
extern
extern
BOOST_ARCHIVE_DECL const char *
BOOST_ARCHIVE_XML_OBJECT_REFERENCE();
extern
extern
BOOST_ARCHIVE_DECL const char *
BOOST_ARCHIVE_XML_CLASS_ID();
extern
extern
BOOST_ARCHIVE_DECL const char *
BOOST_ARCHIVE_XML_CLASS_ID_REFERENCE();
extern
extern
BOOST_ARCHIVE_DECL const char *
BOOST_ARCHIVE_XML_CLASS_NAME();
extern
extern
BOOST_ARCHIVE_DECL const char *
BOOST_ARCHIVE_XML_TRACKING();
extern
extern
BOOST_ARCHIVE_DECL const char *
BOOST_ARCHIVE_XML_VERSION();
extern
extern
BOOST_ARCHIVE_DECL const char *
BOOST_ARCHIVE_XML_SIGNATURE();
+1 -1
View File
@@ -104,7 +104,7 @@ protected:
BOOST_ARCHIVE_OR_WARCHIVE_DECL
basic_xml_iarchive(unsigned int flags);
BOOST_ARCHIVE_OR_WARCHIVE_DECL
~basic_xml_iarchive();
~basic_xml_iarchive() BOOST_OVERRIDE;
};
} // namespace archive
+1 -1
View File
@@ -123,7 +123,7 @@ protected:
BOOST_ARCHIVE_OR_WARCHIVE_DECL
basic_xml_oarchive(unsigned int flags);
BOOST_ARCHIVE_OR_WARCHIVE_DECL
~basic_xml_oarchive();
~basic_xml_oarchive() BOOST_OVERRIDE;
};
} // namespace archive
+9 -5
View File
@@ -9,7 +9,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// binary_iarchive.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -33,8 +33,8 @@ namespace archive {
// preserve correct static polymorphism.
class BOOST_SYMBOL_VISIBLE binary_iarchive :
public binary_iarchive_impl<
boost::archive::binary_iarchive,
std::istream::char_type,
boost::archive::binary_iarchive,
std::istream::char_type,
std::istream::traits_type
>{
public:
@@ -42,12 +42,16 @@ public:
binary_iarchive_impl<
binary_iarchive, std::istream::char_type, std::istream::traits_type
>(is, flags)
{}
{
init(flags);
}
binary_iarchive(std::streambuf & bsb, unsigned int flags = 0) :
binary_iarchive_impl<
binary_iarchive, std::istream::char_type, std::istream::traits_type
>(bsb, flags)
{}
{
init(flags);
}
};
} // namespace archive
+9 -13
View File
@@ -9,7 +9,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// binary_iarchive_impl.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -25,7 +25,7 @@
# pragma warning(disable : 4511 4512)
#endif
namespace boost {
namespace boost {
namespace archive {
namespace detail {
@@ -33,7 +33,7 @@ namespace detail {
} // namespace detail
template<class Archive, class Elem, class Tr>
class BOOST_SYMBOL_VISIBLE binary_iarchive_impl :
class BOOST_SYMBOL_VISIBLE binary_iarchive_impl :
public basic_binary_iprimitive<Archive, Elem, Tr>,
public basic_binary_iarchive<Archive>
{
@@ -70,29 +70,25 @@ protected:
#endif
}
binary_iarchive_impl(
std::basic_streambuf<Elem, Tr> & bsb,
std::basic_streambuf<Elem, Tr> & bsb,
unsigned int flags
) :
basic_binary_iprimitive<Archive, Elem, Tr>(
bsb,
bsb,
0 != (flags & no_codecvt)
),
basic_binary_iarchive<Archive>(flags)
{
init(flags);
}
{}
binary_iarchive_impl(
std::basic_istream<Elem, Tr> & is,
std::basic_istream<Elem, Tr> & is,
unsigned int flags
) :
basic_binary_iprimitive<Archive, Elem, Tr>(
* is.rdbuf(),
* is.rdbuf(),
0 != (flags & no_codecvt)
),
basic_binary_iarchive<Archive>(flags)
{
init(flags);
}
{}
};
} // namespace archive
+9 -5
View File
@@ -9,7 +9,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// binary_oarchive.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -26,13 +26,13 @@
# pragma warning(disable : 4511 4512)
#endif
namespace boost {
namespace boost {
namespace archive {
// do not derive from this class. If you want to extend this functionality
// via inhertance, derived from binary_oarchive_impl instead. This will
// preserve correct static polymorphism.
class BOOST_SYMBOL_VISIBLE binary_oarchive :
class BOOST_SYMBOL_VISIBLE binary_oarchive :
public binary_oarchive_impl<
binary_oarchive, std::ostream::char_type, std::ostream::traits_type
>
@@ -42,12 +42,16 @@ public:
binary_oarchive_impl<
binary_oarchive, std::ostream::char_type, std::ostream::traits_type
>(os, flags)
{}
{
init(flags);
}
binary_oarchive(std::streambuf & bsb, unsigned int flags = 0) :
binary_oarchive_impl<
binary_oarchive, std::ostream::char_type, std::ostream::traits_type
>(bsb, flags)
{}
{
init(flags);
}
};
} // namespace archive
+9 -13
View File
@@ -9,7 +9,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// binary_oarchive_impl.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -26,7 +26,7 @@
# pragma warning(disable : 4511 4512)
#endif
namespace boost {
namespace boost {
namespace archive {
namespace detail {
@@ -34,7 +34,7 @@ namespace detail {
} // namespace detail
template<class Archive, class Elem, class Tr>
class BOOST_SYMBOL_VISIBLE binary_oarchive_impl :
class BOOST_SYMBOL_VISIBLE binary_oarchive_impl :
public basic_binary_oprimitive<Archive, Elem, Tr>,
public basic_binary_oarchive<Archive>
{
@@ -71,29 +71,25 @@ protected:
#endif
}
binary_oarchive_impl(
std::basic_streambuf<Elem, Tr> & bsb,
std::basic_streambuf<Elem, Tr> & bsb,
unsigned int flags
) :
basic_binary_oprimitive<Archive, Elem, Tr>(
bsb,
bsb,
0 != (flags & no_codecvt)
),
basic_binary_oarchive<Archive>(flags)
{
init(flags);
}
{}
binary_oarchive_impl(
std::basic_ostream<Elem, Tr> & os,
std::basic_ostream<Elem, Tr> & os,
unsigned int flags
) :
basic_binary_oprimitive<Archive, Elem, Tr>(
* os.rdbuf(),
* os.rdbuf(),
0 != (flags & no_codecvt)
),
basic_binary_oarchive<Archive>(flags)
{
init(flags);
}
{}
};
} // namespace archive
+3 -3
View File
@@ -9,7 +9,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// binary_wiarchive.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -25,10 +25,10 @@
#include <boost/archive/binary_iarchive_impl.hpp>
#include <boost/archive/detail/register_archive.hpp>
namespace boost {
namespace boost {
namespace archive {
class binary_wiarchive :
class binary_wiarchive :
public binary_iarchive_impl<
binary_wiarchive, std::wistream::char_type, std::wistream::traits_type
>
+3 -3
View File
@@ -9,7 +9,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// binary_woarchive.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -25,13 +25,13 @@
#include <boost/archive/binary_oarchive_impl.hpp>
#include <boost/archive/detail/register_archive.hpp>
namespace boost {
namespace boost {
namespace archive {
// do not derive from this class. If you want to extend this functionality
// via inhertance, derived from binary_oarchive_impl instead. This will
// preserve correct static polymorphism.
class binary_woarchive :
class binary_woarchive :
public binary_oarchive_impl<
binary_woarchive, std::wostream::char_type, std::wostream::traits_type
>
+20 -14
View File
@@ -24,7 +24,7 @@
#include <boost/config.hpp>
#include <boost/serialization/force_include.hpp>
#include <boost/archive/detail/auto_link_archive.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
//#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
#if defined(BOOST_NO_STDC_NAMESPACE)
namespace std {
@@ -52,21 +52,21 @@ class codecvt_null;
template<>
class codecvt_null<char> : public std::codecvt<char, char, std::mbstate_t>
{
virtual bool do_always_noconv() const throw() {
bool do_always_noconv() const throw() BOOST_OVERRIDE {
return true;
}
public:
explicit codecvt_null(std::size_t no_locale_manage = 0) :
std::codecvt<char, char, std::mbstate_t>(no_locale_manage)
{}
virtual ~codecvt_null(){};
~codecvt_null() BOOST_OVERRIDE {}
};
template<>
class BOOST_SYMBOL_VISIBLE codecvt_null<wchar_t> :
public std::codecvt<wchar_t, char, std::mbstate_t>
{
virtual BOOST_WARCHIVE_DECL std::codecvt_base::result
BOOST_SYMBOL_EXPORT std::codecvt_base::result
do_out(
std::mbstate_t & state,
const wchar_t * first1,
@@ -75,8 +75,9 @@ class BOOST_SYMBOL_VISIBLE codecvt_null<wchar_t> :
char * first2,
char * last2,
char * & next2
) const;
virtual BOOST_WARCHIVE_DECL std::codecvt_base::result
) const BOOST_OVERRIDE;
BOOST_SYMBOL_EXPORT std::codecvt_base::result
do_in(
std::mbstate_t & state,
const char * first1,
@@ -85,18 +86,23 @@ class BOOST_SYMBOL_VISIBLE codecvt_null<wchar_t> :
wchar_t * first2,
wchar_t * last2,
wchar_t * & next2
) const;
virtual int do_encoding( ) const throw( ){
) const BOOST_OVERRIDE;
BOOST_SYMBOL_EXPORT int do_encoding( ) const throw( ) BOOST_OVERRIDE {
return sizeof(wchar_t) / sizeof(char);
}
virtual int do_max_length( ) const throw( ){
BOOST_SYMBOL_EXPORT bool do_always_noconv() const throw() BOOST_OVERRIDE {
return false;
}
BOOST_SYMBOL_EXPORT int do_max_length( ) const throw( ) BOOST_OVERRIDE {
return do_encoding();
}
public:
explicit codecvt_null(std::size_t no_locale_manage = 0) :
std::codecvt<wchar_t, char, std::mbstate_t>(no_locale_manage)
{}
virtual ~codecvt_null(){};
BOOST_SYMBOL_EXPORT explicit codecvt_null(std::size_t no_locale_manage = 0);
BOOST_SYMBOL_EXPORT ~codecvt_null() BOOST_OVERRIDE ;
};
} // namespace archive
@@ -105,6 +111,6 @@ public:
#ifdef BOOST_MSVC
# pragma warning(pop)
#endif
#include <boost/archive/detail/abi_suffix.hpp> // pop pragmas
//#include <boost/archive/detail/abi_suffix.hpp> // pop pragmas
#endif //BOOST_ARCHIVE_CODECVT_NULL_HPP
+1 -1
View File
@@ -1,7 +1,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// abi_prefix.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
+1 -1
View File
@@ -1,7 +1,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// abi_suffix.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -7,10 +7,10 @@
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// archive_serializer_map.hpp: extenstion of type_info required for
// archive_serializer_map.hpp: extenstion of type_info required for
// serialization.
// (C) Copyright 2009 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2009 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -18,7 +18,7 @@
// See http://www.boost.org for updates, documentation, and revision history.
// note: this is nothing more than the thinest of wrappers around
// basic_serializer_map so we can have a one map / archive type.
// basic_serializer_map so we can have a one map / archive type.
#include <boost/config.hpp>
#include <boost/archive/detail/auto_link_archive.hpp>
@@ -16,12 +16,12 @@
// See library home page at http://www.boost.org/libs/serialization
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
// This header implements separate compilation features as described in
// http://www.boost.org/more/separate_compilation.html
// enable automatic library variant selection ------------------------------//
// enable automatic library variant selection ------------------------------//
#include <boost/archive/detail/decl.hpp>
@@ -16,12 +16,12 @@
// See library home page at http://www.boost.org/libs/serialization
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
// This header implements separate compilation features as described in
// http://www.boost.org/more/separate_compilation.html
// enable automatic library variant selection ------------------------------//
// enable automatic library variant selection ------------------------------//
#include <boost/archive/detail/decl.hpp>
@@ -9,7 +9,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_iarchive.hpp:
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -72,27 +72,27 @@ public:
const basic_iserializer & bis
);
BOOST_ARCHIVE_DECL void load_object(
void *t,
void *t,
const basic_iserializer & bis
);
BOOST_ARCHIVE_DECL const basic_pointer_iserializer *
BOOST_ARCHIVE_DECL const basic_pointer_iserializer *
load_pointer(
void * & t,
void * & t,
const basic_pointer_iserializer * bpis_ptr,
const basic_pointer_iserializer * (*finder)(
const boost::serialization::extended_type_info & eti
)
);
// real public API starts here
BOOST_ARCHIVE_DECL void
set_library_version(library_version_type archive_library_version);
BOOST_ARCHIVE_DECL library_version_type
BOOST_ARCHIVE_DECL void
set_library_version(boost::serialization::library_version_type archive_library_version);
BOOST_ARCHIVE_DECL boost::serialization::library_version_type
get_library_version() const;
BOOST_ARCHIVE_DECL unsigned int
get_flags() const;
BOOST_ARCHIVE_DECL void
BOOST_ARCHIVE_DECL void
reset_object_address(const void * new_address, const void * old_address);
BOOST_ARCHIVE_DECL void
BOOST_ARCHIVE_DECL void
delete_created_pointers();
};
@@ -9,7 +9,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_iserializer.hpp: extenstion of type_info required for serialization.
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -42,7 +42,7 @@ namespace detail {
class basic_iarchive;
class basic_pointer_iserializer;
class BOOST_SYMBOL_VISIBLE basic_iserializer :
class BOOST_SYMBOL_VISIBLE basic_iserializer :
public basic_serializer
{
private:
@@ -63,7 +63,7 @@ public:
return m_bpis;
}
virtual void load_object_data(
basic_iarchive & ar,
basic_iarchive & ar,
void *x,
const unsigned int file_version
) const = 0;
@@ -9,7 +9,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_oarchive.hpp:
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -69,19 +69,19 @@ public:
const basic_oserializer & bos
);
BOOST_ARCHIVE_DECL void save_object(
const void *x,
const void *x,
const basic_oserializer & bos
);
BOOST_ARCHIVE_DECL void save_pointer(
const void * t,
const void * t,
const basic_pointer_oserializer * bpos_ptr
);
void save_null_pointer(){
vsave(NULL_POINTER_TAG);
vsave(BOOST_SERIALIZATION_NULL_POINTER_TAG);
}
// real public interface starts here
BOOST_ARCHIVE_DECL void end_preamble(); // default implementation does nothing
BOOST_ARCHIVE_DECL library_version_type get_library_version() const;
BOOST_ARCHIVE_DECL boost::serialization::library_version_type get_library_version() const;
BOOST_ARCHIVE_DECL unsigned int get_flags() const;
};
@@ -9,7 +9,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_oserializer.hpp: extenstion of type_info required for serialization.
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -7,10 +7,10 @@
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_pointer_oserializer.hpp: extenstion of type_info required for
// basic_pointer_oserializer.hpp: extenstion of type_info required for
// serialization.
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -51,7 +51,7 @@ public:
virtual void * heap_allocation() const = 0;
virtual const basic_iserializer & get_basic_serializer() const = 0;
virtual void load_object_ptr(
basic_iarchive & ar,
basic_iarchive & ar,
void * x,
const unsigned int file_version
) const = 0;
@@ -7,10 +7,10 @@
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_pointer_oserializer.hpp: extenstion of type_info required for
// basic_pointer_oserializer.hpp: extenstion of type_info required for
// serialization.
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -39,7 +39,7 @@ namespace detail {
class basic_oarchive;
class basic_oserializer;
class BOOST_SYMBOL_VISIBLE basic_pointer_oserializer :
class BOOST_SYMBOL_VISIBLE basic_pointer_oserializer :
public basic_serializer
{
protected:
@@ -9,7 +9,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_serializer.hpp: extenstion of type_info required for serialization.
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -32,18 +32,18 @@ namespace boost {
namespace archive {
namespace detail {
class basic_serializer :
class basic_serializer :
private boost::noncopyable
{
const boost::serialization::extended_type_info * m_eti;
protected:
explicit basic_serializer(
const boost::serialization::extended_type_info & eti
) :
) :
m_eti(& eti)
{}
public:
inline bool
inline bool
operator<(const basic_serializer & rhs) const {
// can't compare address since there can be multiple eti records
// for the same type in different execution modules (that is, DLLS)
@@ -9,7 +9,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_serializer_map.hpp: extenstion of type_info required for serialization.
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -24,7 +24,7 @@
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
namespace boost {
namespace boost {
namespace serialization {
class extended_type_info;
}
@@ -45,7 +45,7 @@ basic_serializer_map : public
) const ;
};
typedef std::set<
const basic_serializer *,
const basic_serializer *,
type_info_pointer_compare
> map_type;
map_type m_map;
+12 -10
View File
@@ -4,18 +4,20 @@
// MS compatible compilers support #pragma once
#if defined(_MSC_VER)
# pragma once
#pragma inline_depth(511)
#if !defined(__clang__)
#pragma inline_depth(255)
#pragma inline_recursion(on)
#endif
#endif
#if defined(__MWERKS__)
#pragma inline_depth(511)
#pragma inline_depth(255)
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// check.hpp: interface for serialization system.
// (C) Copyright 2009 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2009 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -49,7 +51,7 @@ namespace detail {
template<class T>
inline void check_object_level(){
typedef
typedef
typename mpl::greater_equal<
serialization::implementation_level< T >,
mpl::int_<serialization::primitive_type>
@@ -62,7 +64,7 @@ inline void check_object_level(){
template<class T>
inline void check_object_versioning(){
typedef
typedef
typename mpl::or_<
typename mpl::greater<
serialization::implementation_level< T >,
@@ -90,8 +92,8 @@ inline void check_object_tracking(){
// saving an non-const object of a type not marked "track_never)
// may be an indicator of an error usage of the
// serialization library and should be double checked.
// See documentation on object tracking. Also, see the
// serialization library and should be double checked.
// See documentation on object tracking. Also, see the
// "rationale" section of the documenation
// for motivation for this checking.
@@ -104,7 +106,7 @@ template<class T>
inline void check_pointer_level(){
// we should only invoke this once we KNOW that T
// has been used as a pointer!!
typedef
typedef
typename mpl::or_<
typename mpl::greater<
serialization::implementation_level< T >,
@@ -126,12 +128,12 @@ inline void check_pointer_level(){
// in this case, indication that an object is tracked is
// not stored in the archive itself - see level == object_serializable
// but rather the existence of the operation ar >> T * is used to
// but rather the existence of the operation ar >> T * is used to
// infer that an object of this type should be tracked. So, if
// you save via a pointer but don't load via a pointer the operation
// will fail on load without given any valid reason for the failure.
// So if your program traps here, consider changing the
// So if your program traps here, consider changing the
// tracking or implementation level traits - or not
// serializing via a pointer.
BOOST_STATIC_WARNING(typex::value);
@@ -9,7 +9,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// common_iarchive.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -35,28 +35,29 @@ class extended_type_info;
// note: referred to as Curiously Recurring Template Patter (CRTP)
template<class Archive>
class BOOST_SYMBOL_VISIBLE common_iarchive :
class BOOST_SYMBOL_VISIBLE common_iarchive :
public basic_iarchive,
public interface_iarchive<Archive>
{
friend class interface_iarchive<Archive>;
friend class basic_iarchive;
private:
virtual void vload(version_type & t){
* this->This() >> t;
}
virtual void vload(object_id_type & t){
void vload(version_type & t) BOOST_OVERRIDE {
* this->This() >> t;
}
virtual void vload(class_id_type & t){
void vload(object_id_type & t) BOOST_OVERRIDE {
* this->This() >> t;
}
virtual void vload(class_id_optional_type & t){
void vload(class_id_type & t) BOOST_OVERRIDE {
* this->This() >> t;
}
virtual void vload(tracking_type & t){
void vload(class_id_optional_type & t) BOOST_OVERRIDE {
* this->This() >> t;
}
virtual void vload(class_name_type &s){
void vload(tracking_type & t) BOOST_OVERRIDE {
* this->This() >> t;
}
void vload(class_name_type &s) BOOST_OVERRIDE {
* this->This() >> s;
}
protected:
@@ -70,7 +71,7 @@ protected:
void load_start(const char * /*name*/){}
void load_end(const char * /*name*/){}
// default archive initialization
common_iarchive(unsigned int flags = 0) :
common_iarchive(unsigned int flags = 0) :
basic_iarchive(flags),
interface_iarchive<Archive>()
{}
@@ -85,4 +86,3 @@ protected:
#endif
#endif // BOOST_ARCHIVE_DETAIL_COMMON_IARCHIVE_HPP
@@ -9,7 +9,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// common_oarchive.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -38,29 +38,30 @@ class BOOST_SYMBOL_VISIBLE common_oarchive :
public interface_oarchive<Archive>
{
friend class interface_oarchive<Archive>;
friend class basic_oarchive;
private:
virtual void vsave(const version_type t){
void vsave(const version_type t) BOOST_OVERRIDE {
* this->This() << t;
}
virtual void vsave(const object_id_type t){
void vsave(const object_id_type t) BOOST_OVERRIDE {
* this->This() << t;
}
virtual void vsave(const object_reference_type t){
void vsave(const object_reference_type t) BOOST_OVERRIDE {
* this->This() << t;
}
virtual void vsave(const class_id_type t){
void vsave(const class_id_type t) BOOST_OVERRIDE {
* this->This() << t;
}
virtual void vsave(const class_id_reference_type t){
void vsave(const class_id_reference_type t) BOOST_OVERRIDE {
* this->This() << t;
}
virtual void vsave(const class_id_optional_type t){
void vsave(const class_id_optional_type t) BOOST_OVERRIDE {
* this->This() << t;
}
virtual void vsave(const class_name_type & t){
void vsave(const class_name_type & t) BOOST_OVERRIDE {
* this->This() << t;
}
virtual void vsave(const tracking_type t){
void vsave(const tracking_type t) BOOST_OVERRIDE {
* this->This() << t;
}
protected:
@@ -71,7 +72,7 @@ protected:
}
void save_start(const char * /*name*/){}
void save_end(const char * /*name*/){}
common_oarchive(unsigned int flags = 0) :
common_oarchive(unsigned int flags = 0) :
basic_oarchive(flags),
interface_oarchive<Archive>()
{}
+3 -3
View File
@@ -1,10 +1,10 @@
#ifndef BOOST_ARCHIVE_DETAIL_DECL_HPP
#define BOOST_ARCHIVE_DETAIL_DECL_HPP
#define BOOST_ARCHIVE_DETAIL_DECL_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER)
# pragma once
#endif
#endif
/////////1/////////2///////// 3/////////4/////////5/////////6/////////7/////////8
// decl.hpp
@@ -16,7 +16,7 @@
// See library home page at http://www.boost.org/libs/serialization
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
// This header implements separate compilation features as described in
// http://www.boost.org/more/separate_compilation.html
@@ -9,7 +9,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// interface_iarchive.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -31,10 +31,10 @@ namespace detail {
class basic_pointer_iserializer;
template<class Archive>
class interface_iarchive
class interface_iarchive
{
protected:
interface_iarchive(){};
interface_iarchive() {}
public:
/////////////////////////////////////////////////////////
// archive public interface
@@ -47,11 +47,11 @@ public:
}
template<class T>
const basic_pointer_iserializer *
const basic_pointer_iserializer *
register_type(T * = NULL){
const basic_pointer_iserializer & bpis =
boost::serialization::singleton<
pointer_iserializer<Archive, T>
pointer_iserializer<Archive, T>
>::get_const_instance();
this->This()->register_basic_serializer(bpis.get_basic_serializer());
return & bpis;
@@ -62,14 +62,14 @@ public:
helper_collection & hc = this->This()->get_helper_collection();
return hc.template find_helper<Helper>(id);
}
template<class T>
Archive & operator>>(T & t){
this->This()->load_override(t);
return * this->This();
}
// the & operator
// the & operator
template<class T>
Archive & operator&(T & t){
return *(this->This()) >> t;
@@ -9,7 +9,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// interface_oarchive.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -32,10 +32,10 @@ namespace detail {
class basic_pointer_oserializer;
template<class Archive>
class interface_oarchive
class interface_oarchive
{
protected:
interface_oarchive(){};
interface_oarchive() {}
public:
/////////////////////////////////////////////////////////
// archive public interface
@@ -48,7 +48,7 @@ public:
}
template<class T>
const basic_pointer_oserializer *
const basic_pointer_oserializer *
register_type(const T * = NULL){
const basic_pointer_oserializer & bpos =
boost::serialization::singleton<
@@ -57,7 +57,7 @@ public:
this->This()->register_basic_serializer(bpos.get_basic_serializer());
return & bpos;
}
template<class Helper>
Helper &
get_helper(void * const id = 0){
@@ -70,8 +70,8 @@ public:
this->This()->save_override(t);
return * this->This();
}
// the & operator
// the & operator
template<class T>
Archive & operator&(const T & t){
return * this ->This() << t;
+66 -65
View File
@@ -2,20 +2,22 @@
#define BOOST_ARCHIVE_DETAIL_ISERIALIZER_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER)
#if defined(BOOST_MSVC)
# pragma once
#pragma inline_depth(511)
#if !defined(__clang__)
#pragma inline_depth(255)
#pragma inline_recursion(on)
#endif
#endif
#if defined(__MWERKS__)
#pragma inline_depth(511)
#pragma inline_depth(255)
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// iserializer.hpp: interface for serialization system.
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -28,8 +30,8 @@
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
#if defined(BOOST_NO_STDC_NAMESPACE)
namespace std{
using ::size_t;
namespace std{
using ::size_t;
} // namespace std
#endif
@@ -41,8 +43,8 @@ namespace std{
#include <boost/mpl/equal_to.hpp>
#include <boost/core/no_exceptions_support.hpp>
#ifndef BOOST_SERIALIZATION_DEFAULT_TYPE_INFO
#include <boost/serialization/extended_type_info_typeid.hpp>
#ifndef BOOST_SERIALIZATION_DEFAULT_TYPE_INFO
#include <boost/serialization/extended_type_info_typeid.hpp>
#endif
#include <boost/serialization/throw_exception.hpp>
#include <boost/serialization/smart_cast.hpp>
@@ -57,16 +59,15 @@ namespace std{
#include <boost/serialization/assume_abstract.hpp>
#if BOOST_WORKAROUND(__IBMCPP__, < 1210) \
|| ( \
defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x590) \
)
#define DONT_USE_HAS_NEW_OPERATOR 1
#if !defined(BOOST_MSVC) && \
(BOOST_WORKAROUND(__IBMCPP__, < 1210) || \
defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x590))
#define BOOST_SERIALIZATION_DONT_USE_HAS_NEW_OPERATOR 1
#else
#define DONT_USE_HAS_NEW_OPERATOR 0
#define BOOST_SERIALIZATION_DONT_USE_HAS_NEW_OPERATOR 0
#endif
#if ! DONT_USE_HAS_NEW_OPERATOR
#if ! BOOST_SERIALIZATION_DONT_USE_HAS_NEW_OPERATOR
#include <boost/type_traits/has_new_operator.hpp>
#endif
@@ -90,6 +91,8 @@ namespace std{
#include <boost/archive/detail/archive_serializer_map.hpp>
#include <boost/archive/detail/check.hpp>
#include <boost/core/addressof.hpp>
namespace boost {
namespace serialization {
@@ -119,43 +122,41 @@ template<class Archive, class T>
class iserializer : public basic_iserializer
{
private:
virtual void destroy(/*const*/ void *address) const {
void destroy(/*const*/ void *address) const BOOST_OVERRIDE {
boost::serialization::access::destroy(static_cast<T *>(address));
}
protected:
// protected constructor since it's always created by singleton
public:
explicit iserializer() :
basic_iserializer(
boost::serialization::singleton<
typename
typename
boost::serialization::type_info_implementation< T >::type
>::get_const_instance()
)
{}
public:
virtual BOOST_DLLEXPORT void load_object_data(
BOOST_DLLEXPORT void load_object_data(
basic_iarchive & ar,
void *x,
void *x,
const unsigned int file_version
) const BOOST_USED;
virtual bool class_info() const {
return boost::serialization::implementation_level< T >::value
) const BOOST_OVERRIDE BOOST_USED;
bool class_info() const BOOST_OVERRIDE {
return boost::serialization::implementation_level< T >::value
>= boost::serialization::object_class_info;
}
virtual bool tracking(const unsigned int /* flags */) const {
return boost::serialization::tracking_level< T >::value
bool tracking(const unsigned int /* flags */) const BOOST_OVERRIDE {
return boost::serialization::tracking_level< T >::value
== boost::serialization::track_always
|| ( boost::serialization::tracking_level< T >::value
|| ( boost::serialization::tracking_level< T >::value
== boost::serialization::track_selectively
&& serialized_as_pointer());
}
virtual version_type version() const {
version_type version() const BOOST_OVERRIDE {
return version_type(::boost::serialization::version< T >::value);
}
virtual bool is_polymorphic() const {
bool is_polymorphic() const BOOST_OVERRIDE {
return boost::is_polymorphic< T >::value;
}
virtual ~iserializer(){};
~iserializer() BOOST_OVERRIDE {}
};
#ifdef BOOST_MSVC
@@ -165,12 +166,12 @@ public:
template<class Archive, class T>
BOOST_DLLEXPORT void iserializer<Archive, T>::load_object_data(
basic_iarchive & ar,
void *x,
void *x,
const unsigned int file_version
) const {
// note: we now comment this out. Before we permited archive
// version # to be very large. Now we don't. To permit
// readers of these old archives, we have to suppress this
// readers of these old archives, we have to suppress this
// code. Perhaps in the future we might re-enable it but
// permit its suppression with a runtime switch.
#if 0
@@ -187,7 +188,7 @@ BOOST_DLLEXPORT void iserializer<Archive, T>::load_object_data(
// be specialized by the user.
boost::serialization::serialize_adl(
boost::serialization::smart_cast_reference<Archive &>(ar),
* static_cast<T *>(x),
* static_cast<T *>(x),
file_version
);
}
@@ -200,7 +201,7 @@ BOOST_DLLEXPORT void iserializer<Archive, T>::load_object_data(
// the purpose of this code is to allocate memory for an object
// without requiring the constructor to be called. Presumably
// the allocated object will be subsequently initialized with
// "placement new".
// "placement new".
// note: we have the boost type trait has_new_operator but we
// have no corresponding has_delete_operator. So we presume
// that the former being true would imply that the a delete
@@ -209,7 +210,7 @@ BOOST_DLLEXPORT void iserializer<Archive, T>::load_object_data(
template<class T>
struct heap_allocation {
// boost::has_new_operator< T > doesn't work on these compilers
#if DONT_USE_HAS_NEW_OPERATOR
#if BOOST_SERIALIZATION_DONT_USE_HAS_NEW_OPERATOR
// This doesn't handle operator new overload for class T
static T * invoke_new(){
return static_cast<T *>(operator new(sizeof(T)));
@@ -234,7 +235,7 @@ struct heap_allocation {
// that the class might have class specific new with NO
// class specific delete at all. Patches (compatible with
// C++03) welcome!
delete t;
(operator delete)(t);
}
};
struct doesnt_have_new_operator {
@@ -243,7 +244,7 @@ struct heap_allocation {
}
static void invoke_delete(T * t) {
// Note: I'm reliance upon automatic conversion from T * to void * here
delete t;
(operator delete)(t);
}
};
static T * invoke_new() {
@@ -251,7 +252,7 @@ struct heap_allocation {
mpl::eval_if<
boost::has_new_operator< T >,
mpl::identity<has_new_operator >,
mpl::identity<doesnt_have_new_operator >
mpl::identity<doesnt_have_new_operator >
>::type typex;
return typex::invoke_new();
}
@@ -260,7 +261,7 @@ struct heap_allocation {
mpl::eval_if<
boost::has_new_operator< T >,
mpl::identity<has_new_operator >,
mpl::identity<doesnt_have_new_operator >
mpl::identity<doesnt_have_new_operator >
>::type typex;
typex::invoke_delete(t);
}
@@ -290,26 +291,26 @@ class pointer_iserializer :
public basic_pointer_iserializer
{
private:
virtual void * heap_allocation() const {
void * heap_allocation() const BOOST_OVERRIDE {
detail::heap_allocation<T> h;
T * t = h.get();
h.release();
return t;
}
virtual const basic_iserializer & get_basic_serializer() const {
const basic_iserializer & get_basic_serializer() const BOOST_OVERRIDE {
return boost::serialization::singleton<
iserializer<Archive, T>
>::get_const_instance();
}
BOOST_DLLEXPORT virtual void load_object_ptr(
basic_iarchive & ar,
BOOST_DLLEXPORT void load_object_ptr(
basic_iarchive & ar,
void * x,
const unsigned int file_version
) const BOOST_USED;
protected:
) const BOOST_OVERRIDE BOOST_USED;
public:
// this should alway be a singleton so make the constructor protected
pointer_iserializer();
~pointer_iserializer();
~pointer_iserializer() BOOST_OVERRIDE;
};
#ifdef BOOST_MSVC
@@ -320,12 +321,12 @@ protected:
// serialized only through base class won't get optimized out
template<class Archive, class T>
BOOST_DLLEXPORT void pointer_iserializer<Archive, T>::load_object_ptr(
basic_iarchive & ar,
basic_iarchive & ar,
void * t,
const unsigned int file_version
) const
{
Archive & ar_impl =
Archive & ar_impl =
boost::serialization::smart_cast_reference<Archive &>(ar);
// note that the above will throw std::bad_alloc if the allocation
@@ -335,7 +336,7 @@ BOOST_DLLEXPORT void pointer_iserializer<Archive, T>::load_object_ptr(
// automatically delete the t which is most likely not fully
// constructed
BOOST_TRY {
// this addresses an obscure situation that occurs when
// this addresses an obscure situation that occurs when
// load_constructor de-serializes something through a pointer.
ar.next_object_pointer(t);
boost::serialization::load_construct_data_adl<Archive, T>(
@@ -359,7 +360,7 @@ template<class Archive, class T>
pointer_iserializer<Archive, T>::pointer_iserializer() :
basic_pointer_iserializer(
boost::serialization::singleton<
typename
typename
boost::serialization::type_info_implementation< T >::type
>::get_const_instance()
)
@@ -394,8 +395,8 @@ struct load_non_pointer_type {
// make sure call is routed through the higest interface that might
// be specialized by the user.
boost::serialization::serialize_adl(
ar,
const_cast<T &>(t),
ar,
const_cast<T &>(t),
boost::serialization::version< T >::value
);
}
@@ -406,9 +407,9 @@ struct load_non_pointer_type {
struct load_standard {
template<class T>
static void invoke(Archive &ar, const T & t){
void * x = & const_cast<T &>(t);
void * x = boost::addressof(const_cast<T &>(t));
ar.load_object(
x,
x,
boost::serialization::singleton<
iserializer<Archive, T>
>::get_const_instance()
@@ -484,8 +485,8 @@ struct load_pointer_type {
};
template<class T>
static const basic_pointer_iserializer * register_type(Archive &ar, const T & /*t*/){
// there should never be any need to load an abstract polymorphic
static const basic_pointer_iserializer * register_type(Archive &ar, const T* const /*t*/){
// there should never be any need to load an abstract polymorphic
// class pointer. Inhibiting code generation for this
// permits abstract base classes to be used - note: exception
// virtual serialize functions used for plug-ins
@@ -493,7 +494,7 @@ struct load_pointer_type {
mpl::eval_if<
boost::serialization::is_abstract<const T>,
boost::mpl::identity<abstract>,
boost::mpl::identity<non_abstract>
boost::mpl::identity<non_abstract>
>::type typex;
return typex::template register_type< T >(ar);
}
@@ -509,7 +510,7 @@ struct load_pointer_type {
boost::serialization::void_upcast(
eti,
boost::serialization::singleton<
typename
typename
boost::serialization::type_info_implementation< T >::type
>::get_const_instance(),
t
@@ -523,7 +524,7 @@ struct load_pointer_type {
}
template<class T>
static void check_load(T & /* t */){
static void check_load(T * const /* t */){
check_pointer_level< T >();
check_pointer_tracking< T >();
}
@@ -537,8 +538,8 @@ struct load_pointer_type {
template<class Tptr>
static void invoke(Archive & ar, Tptr & t){
check_load(*t);
const basic_pointer_iserializer * bpis_ptr = register_type(ar, *t);
check_load(t);
const basic_pointer_iserializer * bpis_ptr = register_type(ar, t);
const basic_pointer_iserializer * newbpis_ptr = ar.load_pointer(
// note major hack here !!!
// I tried every way to convert Tptr &t (where Tptr might
@@ -571,13 +572,13 @@ struct load_array_type {
template<class T>
static void invoke(Archive &ar, T &t){
typedef typename remove_extent< T >::type value_type;
// convert integers to correct enum to load
// determine number of elements in the array. Consider the
// fact that some machines will align elements on boundries
// fact that some machines will align elements on boundaries
// other than characters.
std::size_t current_count = sizeof(t) / (
static_cast<char *>(static_cast<void *>(&t[1]))
static_cast<char *>(static_cast<void *>(&t[1]))
- static_cast<char *>(static_cast<void *>(&t[0]))
);
boost::serialization::collection_size_type count;
+55 -48
View File
@@ -4,18 +4,20 @@
// MS compatible compilers support #pragma once
#if defined(_MSC_VER)
# pragma once
#pragma inline_depth(511)
#if !defined(__clang__)
#pragma inline_depth(255)
#pragma inline_recursion(on)
#endif
#endif
#if defined(__MWERKS__)
#pragma inline_depth(511)
#pragma inline_depth(255)
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// oserializer.hpp: interface for serialization system.
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -26,6 +28,7 @@
#include <cstddef> // NULL
#include <boost/config.hpp>
#include <boost/static_assert.hpp>
#include <boost/detail/workaround.hpp>
@@ -35,8 +38,8 @@
#include <boost/mpl/identity.hpp>
#include <boost/mpl/bool_fwd.hpp>
#ifndef BOOST_SERIALIZATION_DEFAULT_TYPE_INFO
#include <boost/serialization/extended_type_info_typeid.hpp>
#ifndef BOOST_SERIALIZATION_DEFAULT_TYPE_INFO
#include <boost/serialization/extended_type_info_typeid.hpp>
#endif
#include <boost/serialization/throw_exception.hpp>
#include <boost/serialization/smart_cast.hpp>
@@ -68,6 +71,8 @@
#include <boost/archive/detail/archive_serializer_map.hpp>
#include <boost/archive/detail/check.hpp>
#include <boost/core/addressof.hpp>
namespace boost {
namespace serialization {
@@ -102,37 +107,37 @@ template<class Archive, class T>
class oserializer : public basic_oserializer
{
private:
// private constructor to inhibit any existence other than the
// private constructor to inhibit any existence other than the
// static one
public:
explicit BOOST_DLLEXPORT oserializer() :
basic_oserializer(
boost::serialization::singleton<
typename
typename
boost::serialization::type_info_implementation< T >::type
>::get_const_instance()
)
{}
virtual BOOST_DLLEXPORT void save_object_data(
basic_oarchive & ar,
BOOST_DLLEXPORT void save_object_data(
basic_oarchive & ar,
const void *x
) const BOOST_USED;
virtual bool class_info() const {
return boost::serialization::implementation_level< T >::value
) const BOOST_OVERRIDE BOOST_USED;
bool class_info() const BOOST_OVERRIDE {
return boost::serialization::implementation_level< T >::value
>= boost::serialization::object_class_info;
}
virtual bool tracking(const unsigned int /* flags */) const {
bool tracking(const unsigned int /* flags */) const BOOST_OVERRIDE {
return boost::serialization::tracking_level< T >::value == boost::serialization::track_always
|| (boost::serialization::tracking_level< T >::value == boost::serialization::track_selectively
&& serialized_as_pointer());
}
virtual version_type version() const {
version_type version() const BOOST_OVERRIDE {
return version_type(::boost::serialization::version< T >::value);
}
virtual bool is_polymorphic() const {
bool is_polymorphic() const BOOST_OVERRIDE {
return boost::is_polymorphic< T >::value;
}
virtual ~oserializer(){}
~oserializer() BOOST_OVERRIDE {}
};
#ifdef BOOST_MSVC
@@ -141,7 +146,7 @@ public:
template<class Archive, class T>
BOOST_DLLEXPORT void oserializer<Archive, T>::save_object_data(
basic_oarchive & ar,
basic_oarchive & ar,
const void *x
) const {
// make sure call is routed through the highest interface that might
@@ -164,19 +169,19 @@ class pointer_oserializer :
public basic_pointer_oserializer
{
private:
const basic_oserializer &
get_basic_serializer() const {
const basic_oserializer &
get_basic_serializer() const BOOST_OVERRIDE {
return boost::serialization::singleton<
oserializer<Archive, T>
>::get_const_instance();
}
virtual BOOST_DLLEXPORT void save_object_ptr(
BOOST_DLLEXPORT void save_object_ptr(
basic_oarchive & ar,
const void * x
) const BOOST_USED;
) const BOOST_OVERRIDE BOOST_USED;
public:
pointer_oserializer();
~pointer_oserializer();
~pointer_oserializer() BOOST_OVERRIDE;
};
#ifdef BOOST_MSVC
@@ -193,11 +198,11 @@ BOOST_DLLEXPORT void pointer_oserializer<Archive, T>::save_object_ptr(
// be specialized by the user.
T * t = static_cast<T *>(const_cast<void *>(x));
const unsigned int file_version = boost::serialization::version< T >::value;
Archive & ar_impl
Archive & ar_impl
= boost::serialization::smart_cast_reference<Archive &>(ar);
boost::serialization::save_construct_data_adl<Archive, T>(
ar_impl,
t,
ar_impl,
t,
file_version
);
ar_impl << boost::serialization::make_nvp(NULL, * t);
@@ -207,14 +212,14 @@ template<class Archive, class T>
pointer_oserializer<Archive, T>::pointer_oserializer() :
basic_pointer_oserializer(
boost::serialization::singleton<
typename
typename
boost::serialization::type_info_implementation< T >::type
>::get_const_instance()
)
{
// make sure appropriate member function is instantiated
boost::serialization::singleton<
oserializer<Archive, T>
oserializer<Archive, T>
>::get_mutable_instance().set_bpos(this);
archive_serializer_map<Archive>::insert(this);
}
@@ -241,8 +246,8 @@ struct save_non_pointer_type {
// make sure call is routed through the highest interface that might
// be specialized by the user.
boost::serialization::serialize_adl(
ar,
const_cast<T &>(t),
ar,
const_cast<T &>(t),
::boost::serialization::version< T >::value
);
}
@@ -253,7 +258,7 @@ struct save_non_pointer_type {
template<class T>
static void invoke(Archive &ar, const T & t){
ar.save_object(
& t,
boost::addressof(t),
boost::serialization::singleton<
oserializer<Archive, T>
>::get_const_instance()
@@ -261,6 +266,8 @@ struct save_non_pointer_type {
}
};
// adds class information to the archive. This includes
// serialization level and class version
struct save_conditional {
@@ -276,7 +283,7 @@ struct save_non_pointer_type {
template<class T>
static void invoke(Archive & ar, const T & t){
typedef
typedef
typename mpl::eval_if<
// if its primitive
mpl::equal_to<
@@ -305,7 +312,7 @@ struct save_non_pointer_type {
// else
// do a fast save only tracking is turned off
mpl::identity<save_conditional>
> > >::type typex;
> > >::type typex;
check_object_versioning< T >();
typex::invoke(ar, t);
}
@@ -339,15 +346,15 @@ struct save_pointer_type {
template<class T>
static const basic_pointer_oserializer * register_type(Archive &ar, T* const /*t*/){
// there should never be any need to save an abstract polymorphic
// there should never be any need to save an abstract polymorphic
// class pointer. Inhibiting code generation for this
// permits abstract base classes to be used - note: exception
// virtual serialize functions used for plug-ins
typedef
typedef
typename mpl::eval_if<
boost::serialization::is_abstract< T >,
mpl::identity<abstract>,
mpl::identity<non_abstract>
mpl::identity<non_abstract>
>::type typex;
return typex::template register_type< T >(ar);
}
@@ -356,10 +363,10 @@ struct save_pointer_type {
{
template<class T>
static void save(
Archive &ar,
Archive &ar,
T & t
){
const basic_pointer_oserializer & bpos =
const basic_pointer_oserializer & bpos =
boost::serialization::singleton<
pointer_oserializer<Archive, T>
>::get_const_instance();
@@ -372,13 +379,13 @@ struct save_pointer_type {
{
template<class T>
static void save(
Archive &ar,
Archive &ar,
T & t
){
typename
typename
boost::serialization::type_info_implementation< T >::type const
& i = boost::serialization::singleton<
typename
typename
boost::serialization::type_info_implementation< T >::type
>::get_const_instance();
@@ -412,8 +419,8 @@ struct save_pointer_type {
// convert pointer to more derived type. if this is thrown
// it means that the base/derived relationship hasn't be registered
vp = serialization::void_downcast(
*true_type,
*this_type,
*true_type,
*this_type,
static_cast<const void *>(&t)
);
if(NULL == vp){
@@ -426,7 +433,7 @@ struct save_pointer_type {
);
}
// since true_type is valid, and this only gets made if the
// since true_type is valid, and this only gets made if the
// pointer oserializer object has been created, this should never
// fail
const basic_pointer_oserializer * bpos
@@ -449,7 +456,7 @@ struct save_pointer_type {
template<class T>
static void save(
Archive & ar,
Archive & ar,
const T & t
){
check_pointer_level< T >();
@@ -466,7 +473,7 @@ struct save_pointer_type {
static void invoke(Archive &ar, const TPtr t){
register_type(ar, t);
if(NULL == t){
basic_oarchive & boa
basic_oarchive & boa
= boost::serialization::smart_cast_reference<basic_oarchive &>(ar);
boa.save_null_pointer();
save_access::end_preamble(ar);
@@ -493,11 +500,11 @@ struct save_array_type
template<class T>
static void invoke(Archive &ar, const T &t){
typedef typename boost::remove_extent< T >::type value_type;
save_access::end_preamble(ar);
// consider alignment
std::size_t c = sizeof(t) / (
static_cast<const char *>(static_cast<const void *>(&t[1]))
static_cast<const char *>(static_cast<const void *>(&t[1]))
- static_cast<const char *>(static_cast<const void *>(&t[0]))
);
boost::serialization::collection_size_type count(c);
@@ -517,7 +524,7 @@ struct save_array_type
template<class Archive, class T>
inline void save(Archive & ar, /*const*/ T &t){
typedef
typedef
typename mpl::eval_if<is_pointer< T >,
mpl::identity<detail::save_pointer_type<Archive> >,
//else
@@ -56,125 +56,125 @@ class polymorphic_iarchive_route :
{
private:
// these are used by the serialization library.
virtual void load_object(
void load_object(
void *t,
const basic_iserializer & bis
){
) BOOST_OVERRIDE {
ArchiveImplementation::load_object(t, bis);
}
virtual const basic_pointer_iserializer * load_pointer(
const basic_pointer_iserializer * load_pointer(
void * & t,
const basic_pointer_iserializer * bpis_ptr,
const basic_pointer_iserializer * (*finder)(
const boost::serialization::extended_type_info & type
)
){
) BOOST_OVERRIDE {
return ArchiveImplementation::load_pointer(t, bpis_ptr, finder);
}
virtual void set_library_version(library_version_type archive_library_version){
void set_library_version(boost::serialization::library_version_type archive_library_version) BOOST_OVERRIDE {
ArchiveImplementation::set_library_version(archive_library_version);
}
virtual library_version_type get_library_version() const{
boost::serialization::library_version_type get_library_version() const BOOST_OVERRIDE {
return ArchiveImplementation::get_library_version();
}
virtual unsigned int get_flags() const {
unsigned int get_flags() const BOOST_OVERRIDE {
return ArchiveImplementation::get_flags();
}
virtual void delete_created_pointers(){
void delete_created_pointers() BOOST_OVERRIDE {
ArchiveImplementation::delete_created_pointers();
}
virtual void reset_object_address(
void reset_object_address(
const void * new_address,
const void * old_address
){
) BOOST_OVERRIDE {
ArchiveImplementation::reset_object_address(new_address, old_address);
}
virtual void load_binary(void * t, std::size_t size){
void load_binary(void * t, std::size_t size) BOOST_OVERRIDE {
ArchiveImplementation::load_binary(t, size);
}
// primitive types the only ones permitted by polymorphic archives
virtual void load(bool & t){
void load(bool & t) BOOST_OVERRIDE {
ArchiveImplementation::load(t);
}
virtual void load(char & t){
void load(char & t) BOOST_OVERRIDE {
ArchiveImplementation::load(t);
}
virtual void load(signed char & t){
void load(signed char & t) BOOST_OVERRIDE {
ArchiveImplementation::load(t);
}
virtual void load(unsigned char & t){
void load(unsigned char & t) BOOST_OVERRIDE {
ArchiveImplementation::load(t);
}
#ifndef BOOST_NO_CWCHAR
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
virtual void load(wchar_t & t){
void load(wchar_t & t) BOOST_OVERRIDE {
ArchiveImplementation::load(t);
}
#endif
#endif
virtual void load(short & t){
void load(short & t) BOOST_OVERRIDE {
ArchiveImplementation::load(t);
}
virtual void load(unsigned short & t){
void load(unsigned short & t) BOOST_OVERRIDE {
ArchiveImplementation::load(t);
}
virtual void load(int & t){
void load(int & t) BOOST_OVERRIDE {
ArchiveImplementation::load(t);
}
virtual void load(unsigned int & t){
void load(unsigned int & t) BOOST_OVERRIDE {
ArchiveImplementation::load(t);
}
virtual void load(long & t){
void load(long & t) BOOST_OVERRIDE {
ArchiveImplementation::load(t);
}
virtual void load(unsigned long & t){
void load(unsigned long & t) BOOST_OVERRIDE {
ArchiveImplementation::load(t);
}
#if defined(BOOST_HAS_LONG_LONG)
virtual void load(boost::long_long_type & t){
void load(boost::long_long_type & t) BOOST_OVERRIDE {
ArchiveImplementation::load(t);
}
virtual void load(boost::ulong_long_type & t){
void load(boost::ulong_long_type & t) BOOST_OVERRIDE {
ArchiveImplementation::load(t);
}
#elif defined(BOOST_HAS_MS_INT64)
virtual void load(__int64 & t){
void load(__int64 & t) BOOST_OVERRIDE {
ArchiveImplementation::load(t);
}
virtual void load(unsigned __int64 & t){
void load(unsigned __int64 & t) BOOST_OVERRIDE {
ArchiveImplementation::load(t);
}
#endif
virtual void load(float & t){
void load(float & t) BOOST_OVERRIDE {
ArchiveImplementation::load(t);
}
virtual void load(double & t){
void load(double & t) BOOST_OVERRIDE {
ArchiveImplementation::load(t);
}
virtual void load(std::string & t){
void load(std::string & t) BOOST_OVERRIDE {
ArchiveImplementation::load(t);
}
#ifndef BOOST_NO_STD_WSTRING
virtual void load(std::wstring & t){
void load(std::wstring & t) BOOST_OVERRIDE {
ArchiveImplementation::load(t);
}
#endif
// used for xml and other tagged formats default does nothing
virtual void load_start(const char * name){
void load_start(const char * name) BOOST_OVERRIDE {
ArchiveImplementation::load_start(name);
}
virtual void load_end(const char * name){
void load_end(const char * name) BOOST_OVERRIDE {
ArchiveImplementation::load_end(name);
}
virtual void register_basic_serializer(const basic_iserializer & bis){
void register_basic_serializer(const basic_iserializer & bis) BOOST_OVERRIDE {
ArchiveImplementation::register_basic_serializer(bis);
}
virtual helper_collection &
get_helper_collection(){
helper_collection &
get_helper_collection() BOOST_OVERRIDE {
return ArchiveImplementation::get_helper_collection();
}
public:
// this can't be inheriteded because they appear in mulitple
// this can't be inherited because they appear in multiple
// parents
typedef mpl::bool_<true> is_loading;
typedef mpl::bool_<false> is_saving;
@@ -190,7 +190,7 @@ public:
}
// register type function
template<class T>
const basic_pointer_iserializer *
const basic_pointer_iserializer *
register_type(T * t = NULL){
return ArchiveImplementation::register_type(t);
}
@@ -202,7 +202,7 @@ public:
) :
ArchiveImplementation(is, flags)
{}
virtual ~polymorphic_iarchive_route(){};
~polymorphic_iarchive_route() BOOST_OVERRIDE {}
};
} // namespace detail
@@ -56,116 +56,116 @@ class polymorphic_oarchive_route :
{
private:
// these are used by the serialization library.
virtual void save_object(
void save_object(
const void *x,
const detail::basic_oserializer & bos
){
) BOOST_OVERRIDE {
ArchiveImplementation::save_object(x, bos);
}
virtual void save_pointer(
void save_pointer(
const void * t,
const detail::basic_pointer_oserializer * bpos_ptr
){
) BOOST_OVERRIDE {
ArchiveImplementation::save_pointer(t, bpos_ptr);
}
virtual void save_null_pointer(){
void save_null_pointer() BOOST_OVERRIDE {
ArchiveImplementation::save_null_pointer();
}
// primitive types the only ones permitted by polymorphic archives
virtual void save(const bool t){
void save(const bool t) BOOST_OVERRIDE {
ArchiveImplementation::save(t);
}
virtual void save(const char t){
void save(const char t) BOOST_OVERRIDE {
ArchiveImplementation::save(t);
}
virtual void save(const signed char t){
void save(const signed char t) BOOST_OVERRIDE {
ArchiveImplementation::save(t);
}
virtual void save(const unsigned char t){
void save(const unsigned char t) BOOST_OVERRIDE {
ArchiveImplementation::save(t);
}
#ifndef BOOST_NO_CWCHAR
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
virtual void save(const wchar_t t){
void save(const wchar_t t) BOOST_OVERRIDE {
ArchiveImplementation::save(t);
}
#endif
#endif
virtual void save(const short t){
void save(const short t) BOOST_OVERRIDE {
ArchiveImplementation::save(t);
}
virtual void save(const unsigned short t){
void save(const unsigned short t) BOOST_OVERRIDE {
ArchiveImplementation::save(t);
}
virtual void save(const int t){
void save(const int t) BOOST_OVERRIDE {
ArchiveImplementation::save(t);
}
virtual void save(const unsigned int t){
void save(const unsigned int t) BOOST_OVERRIDE {
ArchiveImplementation::save(t);
}
virtual void save(const long t){
void save(const long t) BOOST_OVERRIDE {
ArchiveImplementation::save(t);
}
virtual void save(const unsigned long t){
void save(const unsigned long t) BOOST_OVERRIDE {
ArchiveImplementation::save(t);
}
#if defined(BOOST_HAS_LONG_LONG)
virtual void save(const boost::long_long_type t){
void save(const boost::long_long_type t) BOOST_OVERRIDE {
ArchiveImplementation::save(t);
}
virtual void save(const boost::ulong_long_type t){
void save(const boost::ulong_long_type t) BOOST_OVERRIDE {
ArchiveImplementation::save(t);
}
#elif defined(BOOST_HAS_MS_INT64)
virtual void save(const boost::int64_t t){
void save(const boost::int64_t t) BOOST_OVERRIDE {
ArchiveImplementation::save(t);
}
virtual void save(const boost::uint64_t t){
void save(const boost::uint64_t t) BOOST_OVERRIDE {
ArchiveImplementation::save(t);
}
#endif
virtual void save(const float t){
void save(const float t) BOOST_OVERRIDE {
ArchiveImplementation::save(t);
}
virtual void save(const double t){
void save(const double t) BOOST_OVERRIDE {
ArchiveImplementation::save(t);
}
virtual void save(const std::string & t){
void save(const std::string & t) BOOST_OVERRIDE {
ArchiveImplementation::save(t);
}
#ifndef BOOST_NO_STD_WSTRING
virtual void save(const std::wstring & t){
void save(const std::wstring & t) BOOST_OVERRIDE {
ArchiveImplementation::save(t);
}
#endif
virtual library_version_type get_library_version() const{
boost::serialization::library_version_type get_library_version() const BOOST_OVERRIDE {
return ArchiveImplementation::get_library_version();
}
virtual unsigned int get_flags() const {
unsigned int get_flags() const BOOST_OVERRIDE {
return ArchiveImplementation::get_flags();
}
virtual void save_binary(const void * t, std::size_t size){
void save_binary(const void * t, std::size_t size) BOOST_OVERRIDE {
ArchiveImplementation::save_binary(t, size);
}
// used for xml and other tagged formats default does nothing
virtual void save_start(const char * name){
void save_start(const char * name) BOOST_OVERRIDE {
ArchiveImplementation::save_start(name);
}
virtual void save_end(const char * name){
void save_end(const char * name) BOOST_OVERRIDE {
ArchiveImplementation::save_end(name);
}
virtual void end_preamble(){
void end_preamble() BOOST_OVERRIDE {
ArchiveImplementation::end_preamble();
}
virtual void register_basic_serializer(const detail::basic_oserializer & bos){
void register_basic_serializer(const detail::basic_oserializer & bos) BOOST_OVERRIDE {
ArchiveImplementation::register_basic_serializer(bos);
}
virtual helper_collection &
get_helper_collection(){
helper_collection &
get_helper_collection() BOOST_OVERRIDE {
return ArchiveImplementation::get_helper_collection();
}
public:
// this can't be inheriteded because they appear in mulitple
// this can't be inherited because they appear in multiple
// parents
typedef mpl::bool_<false> is_loading;
typedef mpl::bool_<true> is_saving;
@@ -181,7 +181,7 @@ public:
}
// register type function
template<class T>
const basic_pointer_oserializer *
const basic_pointer_oserializer *
register_type(T * t = NULL){
return ArchiveImplementation::register_type(t);
}
@@ -193,7 +193,7 @@ public:
) :
ArchiveImplementation(os, flags)
{}
virtual ~polymorphic_oarchive_route(){};
~polymorphic_oarchive_route() BOOST_OVERRIDE {}
};
} // namespace detail
@@ -4,7 +4,7 @@
#ifndef BOOST_ARCHIVE_DETAIL_REGISTER_ARCHIVE_DWA2006521_HPP
# define BOOST_ARCHIVE_DETAIL_REGISTER_ARCHIVE_DWA2006521_HPP
namespace boost { namespace archive { namespace detail {
namespace boost { namespace archive { namespace detail {
// No instantiate_ptr_serialization overloads generated by
// BOOST_SERIALIZATION_REGISTER_ARCHIVE that lexically follow the call
@@ -13,27 +13,16 @@
#error "wide char i/o not supported on this platform"
#endif
// std::codecvt_utf8 doesn't seem to work for any versions of msvc
// use boost's utf8 codecvt facet
#include <boost/archive/detail/decl.hpp>
#define BOOST_UTF8_BEGIN_NAMESPACE \
namespace boost { namespace archive { namespace detail {
#define BOOST_UTF8_END_NAMESPACE }}}
#if defined(_MSC_VER) || defined(BOOST_NO_CXX11_HDR_CODECVT)
// use boost's utf8 codecvt facet
#include <boost/archive/detail/decl.hpp>
#define BOOST_UTF8_BEGIN_NAMESPACE \
namespace boost { namespace archive { namespace detail {
#define BOOST_UTF8_DECL BOOST_ARCHIVE_DECL
#define BOOST_UTF8_END_NAMESPACE }}}
#include <boost/detail/utf8_codecvt_facet.hpp>
#include <boost/detail/utf8_codecvt_facet.hpp>
#undef BOOST_UTF8_END_NAMESPACE
#undef BOOST_UTF8_DECL
#undef BOOST_UTF8_BEGIN_NAMESPACE
#else
// use the standard vendor supplied facet
#include <codecvt>
namespace boost { namespace archive { namespace detail {
typedef std::codecvt_utf8<wchar_t> utf8_codecvt_facet;
} } }
#endif
#undef BOOST_UTF8_END_NAMESPACE
#undef BOOST_UTF8_DECL
#undef BOOST_UTF8_BEGIN_NAMESPACE
#endif // BOOST_ARCHIVE_DETAIL_UTF8_CODECVT_FACET_HPP
+11 -13
View File
@@ -9,7 +9,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// dinkumware.hpp:
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -29,7 +29,7 @@ namespace std {
// define i/o operators for 64 bit integers
template<class CharType>
basic_ostream<CharType> &
basic_ostream<CharType> &
operator<<(basic_ostream<CharType> & os, boost::uint64_t t){
// octal rendering of 64 bit number would be 22 octets + eos
CharType d[23];
@@ -66,7 +66,7 @@ operator<<(basic_ostream<CharType> & os, boost::uint64_t t){
}
template<class CharType>
basic_ostream<CharType> &
basic_ostream<CharType> &
operator<<(basic_ostream<CharType> &os, boost::int64_t t){
if(0 <= t){
os << static_cast<boost::uint64_t>(t);
@@ -79,7 +79,7 @@ operator<<(basic_ostream<CharType> &os, boost::int64_t t){
}
template<class CharType>
basic_istream<CharType> &
basic_istream<CharType> &
operator>>(basic_istream<CharType> &is, boost::int64_t & t){
CharType d;
do{
@@ -119,7 +119,7 @@ operator>>(basic_istream<CharType> &is, boost::int64_t & t){
}
template<class CharType>
basic_istream<CharType> &
basic_istream<CharType> &
operator>>(basic_istream<CharType> &is, boost::uint64_t & t){
boost::int64_t it;
is >> it;
@@ -127,10 +127,8 @@ operator>>(basic_istream<CharType> &is, boost::uint64_t & t){
return is;
}
//#endif
template<>
class back_insert_iterator<basic_string<char> > : public
class back_insert_iterator<basic_string<char> > : public
iterator<output_iterator_tag, char>
{
public:
@@ -140,7 +138,7 @@ public:
explicit back_insert_iterator(container_type & s)
: container(& s)
{} // construct with container
back_insert_iterator<container_type> & operator=(
container_type::const_reference Val_
){ // push value into container
@@ -167,7 +165,7 @@ protected:
container_type *container; // pointer to container
};
template<char>
template<char>
inline back_insert_iterator<basic_string<char> > back_inserter(
basic_string<char> & s
){
@@ -175,7 +173,7 @@ inline back_insert_iterator<basic_string<char> > back_inserter(
}
template<>
class back_insert_iterator<basic_string<wchar_t> > : public
class back_insert_iterator<basic_string<wchar_t> > : public
iterator<output_iterator_tag, wchar_t>
{
public:
@@ -185,7 +183,7 @@ public:
explicit back_insert_iterator(container_type & s)
: container(& s)
{} // construct with container
back_insert_iterator<container_type> & operator=(
container_type::const_reference Val_
){ // push value into container
@@ -212,7 +210,7 @@ protected:
container_type *container; // pointer to container
};
template<wchar_t>
template<wchar_t>
inline back_insert_iterator<basic_string<wchar_t> > back_inserter(
basic_string<wchar_t> & s
){
@@ -47,10 +47,10 @@ archive_serializer_map<Archive>::insert(const basic_serializer * bs){
template<class Archive>
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
archive_serializer_map<Archive>::erase(const basic_serializer * bs){
BOOST_ASSERT(! boost::serialization::singleton<
extra_detail::map<Archive>
>::is_destroyed()
);
// note: previously this conditional was a runtime assertion with
// BOOST_ASSERT. We've changed it because we've discovered that at
// least one platform is not guaranteed to destroy singletons in
// reverse order of distruction.
if(boost::serialization::singleton<
extra_detail::map<Archive>
>::is_destroyed())
@@ -22,7 +22,7 @@ namespace std{
#endif
#include <boost/detail/workaround.hpp>
#include <boost/detail/endian.hpp>
#include <boost/predef/other/endian.h>
#include <boost/archive/basic_binary_iarchive.hpp>
@@ -48,7 +48,7 @@ basic_binary_iarchive<Archive>::load_override(class_name_type & t){
template<class Archive>
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
basic_binary_iarchive<Archive>::init(void){
basic_binary_iarchive<Archive>::init() {
// read signature in an archive version independent manner
std::string file_signature;
@@ -84,12 +84,12 @@ basic_binary_iarchive<Archive>::init(void){
// make sure the version of the reading archive library can
// support the format of the archive being read
library_version_type input_library_version;
boost::serialization::library_version_type input_library_version;
//* this->This() >> input_library_version;
{
int v = 0;
v = this->This()->m_sb.sbumpc();
#if defined(BOOST_LITTLE_ENDIAN)
#if BOOST_ENDIAN_LITTLE_BYTE
if(v < 6){
;
}
@@ -111,11 +111,11 @@ basic_binary_iarchive<Archive>::init(void){
// version 8+ followed by a zero
this->This()->m_sb.sbumpc();
}
#elif defined(BOOST_BIG_ENDIAN)
#elif BOOST_ENDIAN_BIG_BYTE
if(v == 0)
v = this->This()->m_sb.sbumpc();
#endif
input_library_version = static_cast<library_version_type>(v);
input_library_version = static_cast<boost::serialization::library_version_type>(v);
}
#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205))
@@ -34,7 +34,7 @@ basic_binary_oarchive<Archive>::init(){
const std::string file_signature(BOOST_ARCHIVE_SIGNATURE());
* this->This() << file_signature;
// write library version
const library_version_type v(BOOST_ARCHIVE_VERSION());
const boost::serialization::library_version_type v(BOOST_ARCHIVE_VERSION());
* this->This() << v;
}
@@ -45,7 +45,7 @@ basic_text_iarchive<Archive>::load_override(class_name_type & t){
template<class Archive>
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
basic_text_iarchive<Archive>::init(void){
basic_text_iarchive<Archive>::init() {
// read signature in an archive version independent manner
std::string file_signature;
* this->This() >> file_signature;
@@ -56,7 +56,7 @@ basic_text_iarchive<Archive>::init(void){
// make sure the version of the reading archive library can
// support the format of the archive being read
library_version_type input_library_version;
boost::serialization::library_version_type input_library_version;
* this->This() >> input_library_version;
#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205))
@@ -112,8 +112,8 @@ basic_text_iprimitive<IStream>::basic_text_iprimitive(
) :
is(is_),
flags_saver(is_),
precision_saver(is_),
#ifndef BOOST_NO_STD_LOCALE
precision_saver(is_),
codecvt_null_facet(1),
archive_locale(is.getloc(), & codecvt_null_facet),
locale_saver(is)
@@ -125,6 +125,7 @@ basic_text_iprimitive<IStream>::basic_text_iprimitive(
is_ >> std::noboolalpha;
}
#else
precision_saver(is_)
{}
#endif
@@ -54,7 +54,7 @@ basic_text_oarchive<Archive>::init(){
const std::string file_signature(BOOST_ARCHIVE_SIGNATURE());
* this->This() << file_signature;
// write library version
const library_version_type v(BOOST_ARCHIVE_VERSION());
const boost::serialization::library_version_type v(BOOST_ARCHIVE_VERSION());
* this->This() << v;
}

Some files were not shown because too many files have changed in this diff Show More