|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r53136 - trunk/boost/graph
From: asutton_at_[hidden]
Date: 2009-05-20 13:07:51
Author: asutton
Date: 2009-05-20 13:07:49 EDT (Wed, 20 May 2009)
New Revision: 53136
URL: http://svn.boost.org/trac/boost/changeset/53136
Log:
Redistributing mutability traits specializations to specific files in order
to avoid unnecessary includes.
Text files modified:
trunk/boost/graph/adjacency_list.hpp | 19 +++++++++++++++++++
trunk/boost/graph/adjacency_matrix.hpp | 12 ++++++++++++
trunk/boost/graph/directed_graph.hpp | 6 ++++++
trunk/boost/graph/graph_mutability_traits.hpp | 39 ---------------------------------------
trunk/boost/graph/subgraph.hpp | 1 +
trunk/boost/graph/undirected_graph.hpp | 6 ++++++
6 files changed, 44 insertions(+), 39 deletions(-)
Modified: trunk/boost/graph/adjacency_list.hpp
==============================================================================
--- trunk/boost/graph/adjacency_list.hpp (original)
+++ trunk/boost/graph/adjacency_list.hpp 2009-05-20 13:07:49 EDT (Wed, 20 May 2009)
@@ -37,6 +37,7 @@
#endif
#include <boost/graph/graph_traits.hpp>
+#include <boost/graph/graph_mutability_traits.hpp>
#include <boost/graph/graph_selectors.hpp>
#include <boost/property_map/property_map.hpp>
#include <boost/mpl/if.hpp>
@@ -606,6 +607,24 @@
#endif
+// Mutability Traits
+#define ADJLIST_PARAMS \
+ typename OEL, typename VL, typename D, typename VP, typename EP, \
+ typename GP, typename EL
+#define ADJLIST adjacency_list<OEL,VL,D,VP,EP,GP,EL>
+template <ADJLIST_PARAMS>
+struct graph_mutability_traits<ADJLIST> {
+ typedef mutable_property_graph_tag category;
+};
+
+// Can't remove vertices from adjacency lists with VL==vecS
+template <typename OEL, typename D, typename VP, typename EP, typename GP, typename EL>
+struct graph_mutability_traits< adjacency_list<OEL,vecS,D,VP,EP,GP,EL> > {
+ typedef add_only_property_graph_tag category;
+};
+#undef ADJLIST_PARAMS
+#undef ADJLIST
+
} // namespace boost
Modified: trunk/boost/graph/adjacency_matrix.hpp
==============================================================================
--- trunk/boost/graph/adjacency_matrix.hpp (original)
+++ trunk/boost/graph/adjacency_matrix.hpp 2009-05-20 13:07:49 EDT (Wed, 20 May 2009)
@@ -18,6 +18,7 @@
#include <boost/limits.hpp>
#include <boost/iterator.hpp>
#include <boost/graph/graph_traits.hpp>
+#include <boost/graph/graph_mutability_traits.hpp>
#include <boost/graph/graph_selectors.hpp>
#include <boost/mpl/if.hpp>
#include <boost/graph/adjacency_iterator.hpp>
@@ -1279,6 +1280,17 @@
#endif
+#define ADJMAT_PARAMS \
+ typename D, typename VP, typename EP, typename GP, typename A
+#define ADJMAT adjacency_matrix<D,VP,EP,GP,A>
+template <ADJMAT_PARAMS>
+struct graph_mutability_traits<ADJMAT> {
+ typedef mutable_edge_property_graph_tag category;
+};
+#undef ADJMAT_PARAMS
+#undef ADJMAT
+
+
} // namespace boost
#endif // BOOST_ADJACENCY_MATRIX_HPP
Modified: trunk/boost/graph/directed_graph.hpp
==============================================================================
--- trunk/boost/graph/directed_graph.hpp (original)
+++ trunk/boost/graph/directed_graph.hpp 2009-05-20 13:07:49 EDT (Wed, 20 May 2009)
@@ -667,6 +667,12 @@
renumber_indices(DIRECTED_GRAPH& g)
{ g.renumber_indices(); }
+// Mutability Traits
+template <DIRECTED_GRAPH_PARAMS>
+struct graph_mutability_traits<DIRECTED_GRAPH> {
+ typedef mutable_property_graph_tag category;
+};
+
#undef DIRECTED_GRAPH_PARAMS
#undef DIRECTED_GRAPH
Modified: trunk/boost/graph/graph_mutability_traits.hpp
==============================================================================
--- trunk/boost/graph/graph_mutability_traits.hpp (original)
+++ trunk/boost/graph/graph_mutability_traits.hpp 2009-05-20 13:07:49 EDT (Wed, 20 May 2009)
@@ -196,46 +196,7 @@
/** @name Mutability Traits Specializations */
//@{
-#define ADJLIST_PARAMS \
- typename OEL, typename VL, typename D, typename VP, typename EP, \
- typename GP, typename EL
-#define ADJLIST adjacency_list<OEL,VL,D,VP,EP,GP,EL>
-template <ADJLIST_PARAMS> class adjacency_list;
-template <ADJLIST_PARAMS>
-struct graph_mutability_traits<ADJLIST> {
- typedef mutable_property_graph_tag category;
-};
-// Never remove vertices from adjacency lists with VL==vecS
-template <typename OEL, typename D, typename VP, typename EP, typename GP, typename EL>
-struct graph_mutability_traits< adjacency_list<OEL,vecS,D,VP,EP,GP,EL> > {
- typedef add_only_property_graph_tag category;
-};
-#undef ADJLIST_PARAMS
-#undef ADJLIST
-
-template <typename VP, typename EP, typename GP> class directed_graph;
-template <typename VP, typename EP, typename GP>
-struct graph_mutability_traits< directed_graph<VP, EP, GP> > {
- typedef mutable_property_graph_tag category;
-};
-
-template <typename VP, typename EP, typename GP> class undirected_graph;
-template <typename VP, typename EP, typename GP>
-struct graph_mutability_traits< undirected_graph<VP, EP, GP> > {
- typedef mutable_property_graph_tag category;
-};
-
-#define ADJMAT_PARAMS \
- typename D, typename VP, typename EP, typename GP, typename A
-#define ADJMAT adjacency_matrix<D,VP,EP,GP,A>
-template <ADJMAT_PARAMS> class adjacency_matrix;
-template <ADJMAT_PARAMS>
-struct graph_mutability_traits<ADJMAT> {
- typedef mutable_edge_property_graph_tag category;
-};
-#undef ADJMAT_PARAMS
-#undef ADJMAT
//@}
} // namespace boost
Modified: trunk/boost/graph/subgraph.hpp
==============================================================================
--- trunk/boost/graph/subgraph.hpp (original)
+++ trunk/boost/graph/subgraph.hpp 2009-05-20 13:07:49 EDT (Wed, 20 May 2009)
@@ -18,6 +18,7 @@
#include <map>
#include <cassert>
#include <boost/graph/graph_traits.hpp>
+#include <boost/graph/graph_mutability_traits.hpp>
#include <boost/graph/properties.hpp>
#include <boost/iterator/indirect_iterator.hpp>
Modified: trunk/boost/graph/undirected_graph.hpp
==============================================================================
--- trunk/boost/graph/undirected_graph.hpp (original)
+++ trunk/boost/graph/undirected_graph.hpp 2009-05-20 13:07:49 EDT (Wed, 20 May 2009)
@@ -675,6 +675,12 @@
renumber_indices(UNDIRECTED_GRAPH& g)
{ g.renumber_indices(); }
+// Mutability Traits
+template <UNDIRECTED_GRAPH_PARAMS>
+struct graph_mutability_traits<UNDIRECTED_GRAPH> {
+ typedef mutable_property_graph_tag category;
+};
+
#undef UNDIRECTED_GRAPH_PARAMS
#undef UNDIRECTED_GRAPH
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