sl@0: //=======================================================================
sl@0: // Copyright 2002 Indiana University.
sl@0: // Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
sl@0: //
sl@0: // Distributed under the Boost Software License, Version 1.0. (See
sl@0: // accompanying file LICENSE_1_0.txt or copy at
sl@0: // http://www.boost.org/LICENSE_1_0.txt)
sl@0: //=======================================================================
sl@0: 
sl@0: #include <boost/concept_archetype.hpp>
sl@0: #include <boost/graph/breadth_first_search.hpp>
sl@0: #include <boost/graph/graph_archetypes.hpp>
sl@0: 
sl@0: int main()
sl@0: {
sl@0:   using namespace boost;
sl@0:   typedef default_constructible_archetype<
sl@0:     sgi_assignable_archetype<
sl@0:     equality_comparable_archetype<> > > vertex_t;
sl@0:   {
sl@0:     typedef incidence_graph_archetype<vertex_t, directed_tag,
sl@0:       allow_parallel_edge_tag> IncidenceGraph;
sl@0:     typedef vertex_list_graph_archetype<vertex_t, directed_tag,
sl@0:       allow_parallel_edge_tag, IncidenceGraph> graph_t;
sl@0:     graph_t& g = static_object<graph_t>::get();
sl@0:     vertex_t s;
sl@0:     read_write_property_map_archetype<vertex_t, color_value_archetype> color;
sl@0:     breadth_first_search(g, s, color_map(color));
sl@0:   }
sl@0:   {
sl@0:     typedef incidence_graph_archetype<vertex_t, directed_tag,
sl@0:       allow_parallel_edge_tag> IncidenceGraph;
sl@0:     typedef vertex_list_graph_archetype<vertex_t, directed_tag,
sl@0:       allow_parallel_edge_tag, IncidenceGraph> graph_t;
sl@0:     graph_t& g = static_object<graph_t>::get();
sl@0:     vertex_t s;
sl@0:     readable_property_map_archetype<vertex_t, std::size_t> v_index;
sl@0:     breadth_first_search(g, s, vertex_index_map(v_index));
sl@0:   }
sl@0:   {
sl@0:     typedef incidence_graph_archetype<vertex_t, undirected_tag,
sl@0:       allow_parallel_edge_tag> IncidenceGraph;
sl@0:     typedef vertex_list_graph_archetype<vertex_t, undirected_tag,
sl@0:       allow_parallel_edge_tag, IncidenceGraph> Graph;
sl@0:     typedef property_graph_archetype<Graph, vertex_index_t, std::size_t>
sl@0:       graph_t;
sl@0:     graph_t& g = static_object<graph_t>::get();
sl@0:     vertex_t s;
sl@0:     bfs_visitor<> v;
sl@0:     buffer_archetype<vertex_t> b;
sl@0:     breadth_first_search(g, s, visitor(v).buffer(b));
sl@0:   }
sl@0:   return 0;
sl@0: }