os/ossrv/stdcpp/tsrc/Boost_test/graph/src/dfs_cc.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 //=======================================================================
     2 // Copyright 2002 Indiana University.
     3 // Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
     4 //
     5 // Distributed under the Boost Software License, Version 1.0. (See
     6 // accompanying file LICENSE_1_0.txt or copy at
     7 // http://www.boost.org/LICENSE_1_0.txt)
     8 //=======================================================================
     9 /*
    10  * © Portions copyright (c) 2006-2007 Nokia Corporation.  All rights reserved.
    11 */
    12 
    13 #include <boost/concept_archetype.hpp>
    14 #include <boost/graph/depth_first_search.hpp>
    15 #include <boost/graph/graph_archetypes.hpp>
    16 #ifdef __SYMBIAN32__
    17 #include "std_log_result.h"
    18 #define LOG_FILENAME_LINE __FILE__, __LINE__
    19 #endif
    20 int main()
    21 {
    22   using namespace boost;
    23   typedef default_constructible_archetype< 
    24     sgi_assignable_archetype<
    25     equality_comparable_archetype<> > > vertex_t;
    26   {
    27     typedef incidence_graph_archetype<vertex_t, directed_tag, 
    28       allow_parallel_edge_tag> IncidenceGraph;
    29     typedef vertex_list_graph_archetype<vertex_t, directed_tag, 
    30       allow_parallel_edge_tag, IncidenceGraph> graph_t;
    31     graph_t& g = static_object<graph_t>::get();
    32     read_write_property_map_archetype<vertex_t, color_value_archetype> color;
    33     depth_first_search(g, color_map(color));
    34   }
    35   {
    36     typedef incidence_graph_archetype<vertex_t, directed_tag, 
    37       allow_parallel_edge_tag> IncidenceGraph;
    38     typedef vertex_list_graph_archetype<vertex_t, directed_tag, 
    39       allow_parallel_edge_tag, IncidenceGraph> graph_t;
    40     graph_t& g = static_object<graph_t>::get();
    41     readable_property_map_archetype<vertex_t, std::size_t> v_index;
    42     depth_first_search(g, vertex_index_map(v_index));
    43   }
    44   {
    45     typedef incidence_graph_archetype<vertex_t, undirected_tag, 
    46       allow_parallel_edge_tag> IncidenceGraph;
    47     typedef vertex_list_graph_archetype<vertex_t, undirected_tag, 
    48       allow_parallel_edge_tag, IncidenceGraph> Graph;
    49     typedef property_graph_archetype<Graph, vertex_index_t, std::size_t> 
    50       graph_t;
    51     graph_t& g = static_object<graph_t>::get();
    52     dfs_visitor<> v;
    53     depth_first_search(g, visitor(v));
    54   }
    55   
    56    #ifdef __SYMBIAN32__
    57 	std_log(LOG_FILENAME_LINE,"[End Test Case ]");
    58 
    59 	testResultXml("dfs_cc");
    60 	close_log_file();
    61 #endif
    62   return 0;
    63 }