|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r63181 - in trunk/libs/serialization: doc example test vc7ide
From: ramey_at_[hidden]
Date: 2010-06-21 02:24:45
Author: ramey
Date: 2010-06-21 02:24:42 EDT (Mon, 21 Jun 2010)
New Revision: 63181
URL: http://svn.boost.org/trac/boost/changeset/63181
Log:
Corrections to demos
Added:
trunk/libs/serialization/vc7ide/test_diamond_complex.vcproj (contents, props changed)
Text files modified:
trunk/libs/serialization/doc/faq.html | 20 +++++++++-----------
trunk/libs/serialization/example/demo_shared_ptr.cpp | 2 +-
trunk/libs/serialization/example/demo_trivial_archive.cpp | 2 +-
trunk/libs/serialization/example/log_archive.hpp | 2 +-
trunk/libs/serialization/example/portable_binary_iarchive.cpp | 2 +-
trunk/libs/serialization/example/portable_binary_iarchive.hpp | 22 +++++++++++++++++++++-
trunk/libs/serialization/example/simple_log_archive.hpp | 9 +++++----
trunk/libs/serialization/test/test_dll_plugin.cpp | 3 ++-
trunk/libs/serialization/vc7ide/test_array.vcproj | 2 +-
trunk/libs/serialization/vc7ide/test_class_info_load.vcproj | 2 +-
trunk/libs/serialization/vc7ide/test_class_info_save.vcproj | 2 +-
trunk/libs/serialization/vc7ide/test_polymorphic.vcproj | 2 +-
trunk/libs/serialization/vc7ide/test_simple_class.vcproj | 2 +-
trunk/libs/serialization/vc7ide/test_vector.vcproj | 4 ++--
14 files changed, 48 insertions(+), 28 deletions(-)
Modified: trunk/libs/serialization/doc/faq.html
==============================================================================
--- trunk/libs/serialization/doc/faq.html (original)
+++ trunk/libs/serialization/doc/faq.html 2010-06-21 02:24:42 EDT (Mon, 21 Jun 2010)
@@ -38,16 +38,14 @@
is to create a "TRAK" item
which includes the text you want to add to this list.
- <ul>
- <li><h4>
- <a name="differences_1_37"></a>Differences from Boost 1.37</h2>
- </h4></li>
- </ul>
- <hr>
- <p>
- <i>© Copyright Robert Ramey 2002-2009. Distributed
- under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt
- or copy at http://www.boost.org/LICENSE_1_0.txt) </i>
- </p>
+<ul>
+<li><h4>
+</h4></li>
+</ul>
+<hr>
+<p>
+<i>© Copyright Robert Ramey 2002-2009. Distributed
+under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt
+or copy at http://www.boost.org/LICENSE_1_0.txt) </i></p>
</body>
</html>
Modified: trunk/libs/serialization/example/demo_shared_ptr.cpp
==============================================================================
--- trunk/libs/serialization/example/demo_shared_ptr.cpp (original)
+++ trunk/libs/serialization/example/demo_shared_ptr.cpp 2010-06-21 02:24:42 EDT (Mon, 21 Jun 2010)
@@ -82,7 +82,7 @@
std::cout << "unique element count = " << A::count << std::endl;
}
-int main(int /* argc */, char /* *argv[] */)
+int main(int /* argc */, char * /*argv*/[])
{
std::string filename(boost::archive::tmpdir());
filename += "/testfile";
Modified: trunk/libs/serialization/example/demo_trivial_archive.cpp
==============================================================================
--- trunk/libs/serialization/example/demo_trivial_archive.cpp (original)
+++ trunk/libs/serialization/example/demo_trivial_archive.cpp 2010-06-21 02:24:42 EDT (Mon, 21 Jun 2010)
@@ -20,7 +20,7 @@
// serialization library
typedef boost::mpl::bool_<true> is_saving;
typedef boost::mpl::bool_<false> is_loading;
- template<class T> register_type(){}
+ template<class T> void register_type(){}
template<class T> trivial_oarchive & operator<<(const T & t){
return *this;
}
Modified: trunk/libs/serialization/example/log_archive.hpp
==============================================================================
--- trunk/libs/serialization/example/log_archive.hpp (original)
+++ trunk/libs/serialization/example/log_archive.hpp 2010-06-21 02:24:42 EDT (Mon, 21 Jun 2010)
@@ -30,7 +30,7 @@
// give serialization implementation access to this clas
friend class boost::archive::detail::interface_oarchive<log_archive>;
friend class boost::archive::basic_xml_oarchive<log_archive>;
- friend boost::archive::save_access;
+ friend class boost::archive::save_access;
/////////////////////////////////////////////////////////////////////
// Override functions defined in basic_xml_oarchive
Modified: trunk/libs/serialization/example/portable_binary_iarchive.cpp
==============================================================================
--- trunk/libs/serialization/example/portable_binary_iarchive.cpp (original)
+++ trunk/libs/serialization/example/portable_binary_iarchive.cpp 2010-06-21 02:24:42 EDT (Mon, 21 Jun 2010)
@@ -88,7 +88,7 @@
* this >> input_library_version;
// extra little .t is to get around borland quirk
- if(boost::archive::BOOST_ARCHIVE_VERSION() < input_library_version.t)
+ if(boost::archive::BOOST_ARCHIVE_VERSION() < input_library_version)
boost::serialization::throw_exception(
boost::archive::archive_exception(
boost::archive::archive_exception::unsupported_version
Modified: trunk/libs/serialization/example/portable_binary_iarchive.hpp
==============================================================================
--- trunk/libs/serialization/example/portable_binary_iarchive.hpp (original)
+++ trunk/libs/serialization/example/portable_binary_iarchive.hpp 2010-06-21 02:24:42 EDT (Mon, 21 Jun 2010)
@@ -23,6 +23,7 @@
#include <istream>
#include <boost/serialization/string.hpp>
+#include <boost/serialization/item_version_type.hpp>
#include <boost/archive/archive_exception.hpp>
#include <boost/archive/basic_binary_iprimitive.hpp>
#include <boost/archive/detail/common_iarchive.hpp>
@@ -104,7 +105,26 @@
boost::intmax_t l;
load_impl(l, sizeof(T));
// use cast to avoid compile time warning
- t = static_cast<T>(l);
+ //t = static_cast<T>(l);
+ t = T(l);
+ }
+ void load(boost::serialization::item_version_type & t){
+ boost::intmax_t l;
+ load_impl(l, sizeof(boost::serialization::item_version_type));
+ // use cast to avoid compile time warning
+ t = boost::serialization::item_version_type(l);
+ }
+ void load(boost::archive::version_type & t){
+ boost::intmax_t l;
+ load_impl(l, sizeof(boost::archive::version_type));
+ // use cast to avoid compile time warning
+ t = boost::archive::version_type(l);
+ }
+ void load(boost::archive::class_id_type & t){
+ boost::intmax_t l;
+ load_impl(l, sizeof(boost::archive::class_id_type));
+ // use cast to avoid compile time warning
+ t = boost::archive::class_id_type(static_cast<int>(l));
}
void load(std::string & t){
this->primitive_base_t::load(t);
Modified: trunk/libs/serialization/example/simple_log_archive.hpp
==============================================================================
--- trunk/libs/serialization/example/simple_log_archive.hpp (original)
+++ trunk/libs/serialization/example/simple_log_archive.hpp 2010-06-21 02:24:42 EDT (Mon, 21 Jun 2010)
@@ -106,7 +106,7 @@
template<class T>
void register_type(const T * = NULL){}
- library_version_type get_library_version(){
+ unsigned int get_library_version(){
return 0;
}
@@ -133,12 +133,13 @@
}
template<class T, int N>
simple_log_archive & operator<<(const T (&t)[N]){
- ar << serialization::make_array(
- static_cast<value_type const*>(&t[0]),count
+ return *this << boost::serialization::make_array(
+ static_cast<const T *>(&t[0]),
+ N
);
}
template<class T>
- simple_log_archive & operator<<(const ::boost::serialization::nvp<T> & t){
+ simple_log_archive & operator<<(const boost::serialization::nvp<T> & t){
m_os << '\n'; // start line with each named object
// indent according to object depth
for(unsigned int i = 0; i < m_depth; ++i)
Modified: trunk/libs/serialization/test/test_dll_plugin.cpp
==============================================================================
--- trunk/libs/serialization/test/test_dll_plugin.cpp (original)
+++ trunk/libs/serialization/test/test_dll_plugin.cpp 2010-06-21 02:24:42 EDT (Mon, 21 Jun 2010)
@@ -168,7 +168,8 @@
hDLL = LoadLibrary(_T("plugin_polymorphic_derived2.dll"));
BOOST_CHECK_MESSAGE(
(0 != hDLL),
- _T("Failed to find/load plugin_polymorphic_derived2"));
+ "Failed to find/load plugin_polymorphic_derived2"
+ );
if(0 == hDLL)
return EXIT_FAILURE;
Modified: trunk/libs/serialization/vc7ide/test_array.vcproj
==============================================================================
--- trunk/libs/serialization/vc7ide/test_array.vcproj (original)
+++ trunk/libs/serialization/vc7ide/test_array.vcproj 2010-06-21 02:24:42 EDT (Mon, 21 Jun 2010)
@@ -1762,7 +1762,7 @@
Optimization="0"
ImproveFloatingPointConsistency="TRUE"
AdditionalIncludeDirectories=""$(ProjectDir)..\..\..""
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_LIB_DIAGNOSTIC=1;BOOST_ALL_DYN_LINK=1;BOOST_ARCHIVE_TEST=binary_archive.hpp"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_LIB_DIAGNOSTIC=1;BOOST_ALL_DYN_LINK=1;BOOST_ARCHIVE_TEST=text_warchive.hpp"
BasicRuntimeChecks="0"
SmallerTypeCheck="FALSE"
RuntimeLibrary="3"
Modified: trunk/libs/serialization/vc7ide/test_class_info_load.vcproj
==============================================================================
--- trunk/libs/serialization/vc7ide/test_class_info_load.vcproj (original)
+++ trunk/libs/serialization/vc7ide/test_class_info_load.vcproj 2010-06-21 02:24:42 EDT (Mon, 21 Jun 2010)
@@ -79,7 +79,7 @@
Optimization="0"
ImproveFloatingPointConsistency="TRUE"
AdditionalIncludeDirectories=""$(ProjectDir)..\..\..\""
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_LIB_DIAGNOSTIC=1;BOOST_ALL_DYN_LINK=1;BOOST_ARCHIVE_TEST=xml_warchive.hpp"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_LIB_DIAGNOSTIC=1;BOOST_ALL_DYN_LINK=1;BOOST_ARCHIVE_TEST=text_warchive.hpp"
SmallerTypeCheck="TRUE"
RuntimeLibrary="3"
BufferSecurityCheck="TRUE"
Modified: trunk/libs/serialization/vc7ide/test_class_info_save.vcproj
==============================================================================
--- trunk/libs/serialization/vc7ide/test_class_info_save.vcproj (original)
+++ trunk/libs/serialization/vc7ide/test_class_info_save.vcproj 2010-06-21 02:24:42 EDT (Mon, 21 Jun 2010)
@@ -79,7 +79,7 @@
Optimization="0"
ImproveFloatingPointConsistency="TRUE"
AdditionalIncludeDirectories=""$(ProjectDir)..\..\..\""
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_LIB_DIAGNOSTIC=1;BOOST_ALL_DYN_LINK=1"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_LIB_DIAGNOSTIC=1;BOOST_ALL_DYN_LINK=1;BOOST_ARCHIVE_TEST=text_warchive.hpp"
SmallerTypeCheck="TRUE"
RuntimeLibrary="3"
BufferSecurityCheck="TRUE"
Added: trunk/libs/serialization/vc7ide/test_diamond_complex.vcproj
==============================================================================
--- (empty file)
+++ trunk/libs/serialization/vc7ide/test_diamond_complex.vcproj 2010-06-21 02:24:42 EDT (Mon, 21 Jun 2010)
@@ -0,0 +1,193 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="test_diamond_complex"
+ ProjectGUID="{A7D4CC95-F2AC-11D6-9E47-525400E2CF85}"
+ RootNamespace="test_diamond_complex"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Release runtime-dynamic|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ GlobalOptimizations="TRUE"
+ InlineFunctionExpansion="2"
+ EnableIntrinsicFunctions="TRUE"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="TRUE"
+ AdditionalIncludeDirectories=""$(ProjectDir)..\..\..\""
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;BOOST_LIB_DIAGNOSTIC=1;BOOST_ALL_DYN_LINK=1"
+ SmallerTypeCheck="FALSE"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="FALSE"
+ EnableFunctionLevelLinking="TRUE"
+ TreatWChar_tAsBuiltInType="TRUE"
+ ForceConformanceInForLoopScope="TRUE"
+ RuntimeTypeInfo="TRUE"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="TRUE"
+ LinkIncremental="2"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="$(ConfigurationName)"
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="run $(TargetName) with $(ConfigurationName)"
+ CommandLine=""$(TargetDir)/$(TargetName).exe""/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Debug runtime-dynamic|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ ImproveFloatingPointConsistency="TRUE"
+ AdditionalIncludeDirectories=""$(ProjectDir)..\..\..\""
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_LIB_DIAGNOSTIC=1;BOOST_ALL_DYN_LINK=1;BOOST_ARCHIVE_TEST=xml_warchive.hpp"
+ SmallerTypeCheck="TRUE"
+ RuntimeLibrary="3"
+ BufferSecurityCheck="TRUE"
+ EnableFunctionLevelLinking="FALSE"
+ TreatWChar_tAsBuiltInType="TRUE"
+ ForceConformanceInForLoopScope="TRUE"
+ RuntimeTypeInfo="TRUE"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="FALSE"
+ DebugInformationFormat="1"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="TRUE"
+ LinkIncremental="2"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="$(ConfigurationName)"
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="run $(TargetName) with $(ConfigurationName)"
+ CommandLine=""$(TargetDir)/$(TargetName).exe""/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Debug runtime-static|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ ImproveFloatingPointConsistency="TRUE"
+ AdditionalIncludeDirectories=""$(ProjectDir)..\..\..\""
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_LIB_DIAGNOSTIC=1"
+ SmallerTypeCheck="TRUE"
+ RuntimeLibrary="1"
+ BufferSecurityCheck="TRUE"
+ EnableFunctionLevelLinking="FALSE"
+ TreatWChar_tAsBuiltInType="TRUE"
+ ForceConformanceInForLoopScope="TRUE"
+ RuntimeTypeInfo="TRUE"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="FALSE"
+ DebugInformationFormat="1"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="TRUE"
+ AdditionalDependencies="Library"
+ LinkIncremental="2"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="$(ConfigurationName)"
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="run $(TargetName) with $(ConfigurationName)"
+ CommandLine=""$(TargetDir)/$(TargetName).exe""/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath="..\test\test_diamond_complex.cpp">
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Modified: trunk/libs/serialization/vc7ide/test_polymorphic.vcproj
==============================================================================
--- trunk/libs/serialization/vc7ide/test_polymorphic.vcproj (original)
+++ trunk/libs/serialization/vc7ide/test_polymorphic.vcproj 2010-06-21 02:24:42 EDT (Mon, 21 Jun 2010)
@@ -79,7 +79,7 @@
Optimization="0"
ImproveFloatingPointConsistency="TRUE"
AdditionalIncludeDirectories=""$(ProjectDir)..\..\..\""
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_LIB_DIAGNOSTIC=1;BOOST_ALL_DYN_LINK=1;BOOST_ARCHIVE_TEST=polymorphic_text_archive.hpp"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_LIB_DIAGNOSTIC=1;BOOST_ALL_DYN_LINK=1;BOOST_ARCHIVE_TEST=polymorphic_xml_warchive.hpp"
SmallerTypeCheck="TRUE"
RuntimeLibrary="3"
BufferSecurityCheck="TRUE"
Modified: trunk/libs/serialization/vc7ide/test_simple_class.vcproj
==============================================================================
--- trunk/libs/serialization/vc7ide/test_simple_class.vcproj (original)
+++ trunk/libs/serialization/vc7ide/test_simple_class.vcproj 2010-06-21 02:24:42 EDT (Mon, 21 Jun 2010)
@@ -79,7 +79,7 @@
Optimization="2"
ImproveFloatingPointConsistency="TRUE"
AdditionalIncludeDirectories=""$(ProjectDir)..\..\..\""
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_LIB_DIAGNOSTIC=1;BOOST_ALL_DYN_LINK=1;BOOST_ARCHIVE_TEST=binary_archive.hpp"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_LIB_DIAGNOSTIC=1;BOOST_ALL_DYN_LINK=1;BOOST_ARCHIVE_TEST=text_archive.hpp"
SmallerTypeCheck="FALSE"
RuntimeLibrary="3"
BufferSecurityCheck="TRUE"
Modified: trunk/libs/serialization/vc7ide/test_vector.vcproj
==============================================================================
--- trunk/libs/serialization/vc7ide/test_vector.vcproj (original)
+++ trunk/libs/serialization/vc7ide/test_vector.vcproj 2010-06-21 02:24:42 EDT (Mon, 21 Jun 2010)
@@ -79,7 +79,7 @@
Optimization="0"
ImproveFloatingPointConsistency="TRUE"
AdditionalIncludeDirectories=""$(ProjectDir)..\..\..\""
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_LIB_DIAGNOSTIC=1;BOOST_ALL_DYN_LINK=1"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;BOOST_LIB_DIAGNOSTIC=1;BOOST_ALL_DYN_LINK=1;BOOST_ARCHIVE_TEST=text_archive.hpp"
SmallerTypeCheck="TRUE"
RuntimeLibrary="3"
BufferSecurityCheck="TRUE"
@@ -88,7 +88,7 @@
ForceConformanceInForLoopScope="TRUE"
RuntimeTypeInfo="TRUE"
WarningLevel="4"
- Detect64BitPortabilityProblems="TRUE"
+ Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="1"
CompileAs="0"/>
<Tool
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk