|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r69404 - trunk/boost/graph
From: jewillco_at_[hidden]
Date: 2011-02-28 17:41:41
Author: jewillco
Date: 2011-02-28 17:41:34 EST (Mon, 28 Feb 2011)
New Revision: 69404
URL: http://svn.boost.org/trac/boost/changeset/69404
Log:
Made filtered_graph work with bundled graph properties by fixing bundle_type template; probably fixed other adapters as well
Text files modified:
trunk/boost/graph/graph_traits.hpp | 13 +++++++++++++
trunk/boost/graph/properties.hpp | 3 ++-
2 files changed, 15 insertions(+), 1 deletions(-)
Modified: trunk/boost/graph/graph_traits.hpp
==============================================================================
--- trunk/boost/graph/graph_traits.hpp (original)
+++ trunk/boost/graph/graph_traits.hpp 2011-02-28 17:41:34 EST (Mon, 28 Feb 2011)
@@ -217,6 +217,11 @@
//?? not the right place ?? Lee
typedef boost::forward_traversal_tag multi_pass_input_iterator_tag;
+ // Forward declare graph_bundle_t property name (from
+ // boost/graph/properties.hpp, which includes this file) for
+ // bundled_result.
+ enum graph_bundle_t {graph_bundle};
+
template <typename G>
struct graph_property_type {
typedef typename G::graph_property_type type;
@@ -261,6 +266,14 @@
typedef typename bundler::type type;
};
+ template<typename Graph>
+ class bundled_result<Graph, graph_bundle_t> {
+ typedef typename graph_traits<Graph>::vertex_descriptor Vertex;
+ typedef graph_bundle_type<Graph> bundler;
+ public:
+ typedef typename bundler::type type;
+ };
+
} } // namespace graph::detail
namespace graph_detail {
Modified: trunk/boost/graph/properties.hpp
==============================================================================
--- trunk/boost/graph/properties.hpp (original)
+++ trunk/boost/graph/properties.hpp 2011-02-28 17:41:34 EST (Mon, 28 Feb 2011)
@@ -126,7 +126,8 @@
BOOST_DEF_PROPERTY(graph, visitor);
// These tags are used for property bundles
- BOOST_DEF_PROPERTY(graph, bundle);
+ // BOOST_DEF_PROPERTY(graph, bundle); -- needed in graph_traits.hpp, so enum is defined there
+ BOOST_INSTALL_PROPERTY(graph, bundle);
BOOST_DEF_PROPERTY(vertex, bundle);
BOOST_DEF_PROPERTY(edge, bundle);
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