Boost logo

Boost-Commit :

From: ramey_at_[hidden]
Date: 2007-12-22 21:03:52


Author: ramey
Date: 2007-12-22 21:03:52 EST (Sat, 22 Dec 2007)
New Revision: 42255
URL: http://svn.boost.org/trac/boost/changeset/42255

Log:
Corrections to address TRAK tickets
Added:
   branches/serialization_next_release/boost/libs/serialization/src/extended_type_info_no_rtti.cpp (contents, props changed)
Text files modified:
   branches/serialization_next_release/boost/libs/serialization/src/xml_grammar.cpp | 2 +-
   branches/serialization_next_release/boost/libs/serialization/src/xml_woarchive.cpp | 2 ++
   2 files changed, 3 insertions(+), 1 deletions(-)

Added: branches/serialization_next_release/boost/libs/serialization/src/extended_type_info_no_rtti.cpp
==============================================================================
--- (empty file)
+++ branches/serialization_next_release/boost/libs/serialization/src/extended_type_info_no_rtti.cpp 2007-12-22 21:03:52 EST (Sat, 22 Dec 2007)
@@ -0,0 +1,64 @@
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// extended_type_info_no_rtti.cpp: specific implementation of type info
+// that is NOT based on typeid
+
+// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#include <boost/config.hpp>
+#include <cstring>
+#if defined(BOOST_NO_STDC_NAMESPACE)
+namespace std{ using ::strcmp; }
+#endif
+
+#define BOOST_SERIALIZATION_SOURCE
+#include <boost/serialization/extended_type_info_no_rtti.hpp>
+
+#define EXTENDED_TYPE_INFO_NO_RTTI_KEY 2
+
+namespace boost {
+namespace serialization {
+namespace detail {
+
+BOOST_SERIALIZATION_DECL(BOOST_PP_EMPTY())
+extended_type_info_no_rtti_0::extended_type_info_no_rtti_0() :
+ extended_type_info(EXTENDED_TYPE_INFO_NO_RTTI_KEY)
+{}
+
+BOOST_SERIALIZATION_DECL(bool)
+extended_type_info_no_rtti_0::is_less_than(
+ const boost::serialization::extended_type_info &rhs) const
+{
+ const char * l = m_key;
+ const char * r = rhs.get_key();
+ assert(NULL != l);
+ assert(NULL != r);
+ return std::strcmp(l, r) < 0;
+}
+
+BOOST_SERIALIZATION_DECL(bool)
+extended_type_info_no_rtti_0::is_equal(
+ const boost::serialization::extended_type_info &rhs) const
+{
+ const char * l = m_key;
+ const char * r = rhs.get_key();
+ if(l == r)
+ return true;
+ if(NULL == l)
+ return false;
+ if(NULL == r)
+ return false;
+ return 0 == std::strcmp(l, r);
+}
+
+BOOST_SERIALIZATION_DECL(BOOST_PP_EMPTY())
+extended_type_info_no_rtti_0::~extended_type_info_no_rtti_0()
+{}
+
+} // namespece detail
+} // namespace serialization
+} // namespace boost

Modified: branches/serialization_next_release/boost/libs/serialization/src/xml_grammar.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/src/xml_grammar.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/src/xml_grammar.cpp 2007-12-22 21:03:52 EST (Sat, 22 Dec 2007)
@@ -49,7 +49,7 @@
 
 template<>
 void xml_grammar::init_chset(){
- Char = chset_t("\x9\xA\xD\x20-\xFF");
+ Char = chset_t("\x9\xA\xD\x20-\x7f\x80\x81-\xFF");
     Letter = chset_t("\x41-\x5A\x61-\x7A\xC0-\xD6\xD8-\xF6\xF8-\xFF");
     Digit = chset_t("0-9");
     Extender = chset_t('\xB7');

Modified: branches/serialization_next_release/boost/libs/serialization/src/xml_woarchive.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/src/xml_woarchive.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/src/xml_woarchive.cpp 2007-12-22 21:03:52 EST (Sat, 22 Dec 2007)
@@ -26,6 +26,7 @@
 namespace boost {
 namespace archive {
 
+#if 0
 BOOST_WARCHIVE_DECL(std::wostream &)
 operator<<(std::wostream &os, const char *t){
     for(;;){
@@ -53,6 +54,7 @@
     os.put(wc);
     return os;
 }
+#endif
 
 template class basic_xml_oarchive<xml_woarchive> ;
 template class xml_woarchive_impl<xml_woarchive> ;


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