From d5a7d42929c2e48e4fc2f2dd4cdd4c9b772ae835 Mon Sep 17 00:00:00 2001 From: Jeremy Siek Date: Thu, 29 Mar 2001 01:55:17 +0000 Subject: [PATCH] added traversal categories [SVN r9670] --- include/boost/graph/graph_traits.hpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/include/boost/graph/graph_traits.hpp b/include/boost/graph/graph_traits.hpp index 1461da85..f45bce99 100644 --- a/include/boost/graph/graph_traits.hpp +++ b/include/boost/graph/graph_traits.hpp @@ -44,6 +44,7 @@ namespace boost { typedef typename G::directed_category directed_category; typedef typename G::edge_parallel_category edge_parallel_category; + typedef typename G::traversal_category traversal_category; typedef typename G::vertices_size_type vertices_size_type; typedef typename G::edges_size_type edges_size_type; @@ -85,6 +86,20 @@ namespace boost { return detail::allows_parallel(Cat()); } + // traversal_category tags + struct incidence_graph_tag { }; + struct adjacency_graph_tag { }; + struct bidirectional_graph_tag : + public virtual incidence_graph_tag { }; + struct vertex_list_graph_tag : + public virtual incidence_graph_tag, + public virtual adjacency_graph_tag { }; + struct edge_list_graph_tag { }; + struct vertex_and_edge_list_graph_tag : + public virtual edge_list_graph_tag, + public virtual vertex_list_graph_tag { }; + struct adjacency_matrix_tag { }; + //?? not the right place ?? Lee struct multi_pass_input_iterator_tag : std::input_iterator_tag { }; @@ -107,4 +122,4 @@ namespace boost { } #endif -#endif /* BOOST_GRAPH_TRAITS_HPP*/ +#endif // BOOST_GRAPH_TRAITS_HPP