Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58180 - trunk/boost/graph
From: jewillco_at_[hidden]
Date: 2009-12-05 22:53:15


Author: jewillco
Date: 2009-12-05 22:53:14 EST (Sat, 05 Dec 2009)
New Revision: 58180
URL: http://svn.boost.org/trac/boost/changeset/58180

Log:
Changed to property_tree copy of encode_char_entities
Text files modified:
   trunk/boost/graph/graphml.hpp | 54 ---------------------------------------
   1 files changed, 1 insertions(+), 53 deletions(-)

Modified: trunk/boost/graph/graphml.hpp
==============================================================================
--- trunk/boost/graph/graphml.hpp (original)
+++ trunk/boost/graph/graphml.hpp 2009-12-05 22:53:14 EST (Sat, 05 Dec 2009)
@@ -23,64 +23,13 @@
 #include <boost/mpl/vector.hpp>
 #include <boost/mpl/find.hpp>
 #include <boost/mpl/for_each.hpp>
-#if 0 // Change this back later
 #include <boost/property_tree/detail/xml_parser_utils.hpp>
-#endif
 #include <exception>
 #include <sstream>
 
 namespace boost
 {
 
- // FIXME: Remove this once property_tree is stable
- namespace graph_detail_from_property_tree {
-
-// ----------------------------------------------------------------------------
-// Copyright (C) 2002-2006 Marcin Kalicinski
-//
-// 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)
-//
-// For more information, see www.boost.org
-// ----------------------------------------------------------------------------
-
- // Naively convert narrow string to another character type
- template<class Ch>
- std::basic_string<Ch> widen(const char *text)
- {
- std::basic_string<Ch> result;
- while (*text)
- {
- result += Ch(*text);
- ++text;
- }
- return result;
- }
-
- template<class Ch>
- std::basic_string<Ch> encode_char_entities(const std::basic_string<Ch> &s)
- {
- typedef typename std::basic_string<Ch> Str;
- Str r;
- typename Str::const_iterator end = s.end();
- for (typename Str::const_iterator it = s.begin(); it != end; ++it)
- {
- switch (*it)
- {
- case Ch('<'): r += boost::graph_detail_from_property_tree::widen<Ch>("&lt;"); break;
- case Ch('>'): r += boost::graph_detail_from_property_tree::widen<Ch>("&gt;"); break;
- case Ch('&'): r += boost::graph_detail_from_property_tree::widen<Ch>("&amp;"); break;
- case Ch('"'): r += boost::graph_detail_from_property_tree::widen<Ch>("&quot;"); break;
- case Ch('\''): r += boost::graph_detail_from_property_tree::widen<Ch>("&apos;"); break;
- default: r += *it; break;
- }
- }
- return r;
- }
-
- }
-
 /////////////////////////////////////////////////////////////////////////////
 // Graph reader exceptions
 /////////////////////////////////////////////////////////////////////////////
@@ -280,8 +229,7 @@
     typedef typename graph_traits<Graph>::edge_descriptor edge_descriptor;
     typedef typename graph_traits<Graph>::vertex_descriptor vertex_descriptor;
 
- // using boost::property_tree::xml_parser::encode_char_entities;
- using boost::graph_detail_from_property_tree::encode_char_entities;
+ using boost::property_tree::xml_parser::encode_char_entities;
 
     BOOST_STATIC_CONSTANT(bool,
                           graph_is_directed =


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