1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/stdcpp/tsrc/Boost_test/graph/src/dfs_cc.cpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,63 @@
1.4 +//=======================================================================
1.5 +// Copyright 2002 Indiana University.
1.6 +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
1.7 +//
1.8 +// Distributed under the Boost Software License, Version 1.0. (See
1.9 +// accompanying file LICENSE_1_0.txt or copy at
1.10 +// http://www.boost.org/LICENSE_1_0.txt)
1.11 +//=======================================================================
1.12 +/*
1.13 + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved.
1.14 +*/
1.15 +
1.16 +#include <boost/concept_archetype.hpp>
1.17 +#include <boost/graph/depth_first_search.hpp>
1.18 +#include <boost/graph/graph_archetypes.hpp>
1.19 +#ifdef __SYMBIAN32__
1.20 +#include "std_log_result.h"
1.21 +#define LOG_FILENAME_LINE __FILE__, __LINE__
1.22 +#endif
1.23 +int main()
1.24 +{
1.25 + using namespace boost;
1.26 + typedef default_constructible_archetype<
1.27 + sgi_assignable_archetype<
1.28 + equality_comparable_archetype<> > > vertex_t;
1.29 + {
1.30 + typedef incidence_graph_archetype<vertex_t, directed_tag,
1.31 + allow_parallel_edge_tag> IncidenceGraph;
1.32 + typedef vertex_list_graph_archetype<vertex_t, directed_tag,
1.33 + allow_parallel_edge_tag, IncidenceGraph> graph_t;
1.34 + graph_t& g = static_object<graph_t>::get();
1.35 + read_write_property_map_archetype<vertex_t, color_value_archetype> color;
1.36 + depth_first_search(g, color_map(color));
1.37 + }
1.38 + {
1.39 + typedef incidence_graph_archetype<vertex_t, directed_tag,
1.40 + allow_parallel_edge_tag> IncidenceGraph;
1.41 + typedef vertex_list_graph_archetype<vertex_t, directed_tag,
1.42 + allow_parallel_edge_tag, IncidenceGraph> graph_t;
1.43 + graph_t& g = static_object<graph_t>::get();
1.44 + readable_property_map_archetype<vertex_t, std::size_t> v_index;
1.45 + depth_first_search(g, vertex_index_map(v_index));
1.46 + }
1.47 + {
1.48 + typedef incidence_graph_archetype<vertex_t, undirected_tag,
1.49 + allow_parallel_edge_tag> IncidenceGraph;
1.50 + typedef vertex_list_graph_archetype<vertex_t, undirected_tag,
1.51 + allow_parallel_edge_tag, IncidenceGraph> Graph;
1.52 + typedef property_graph_archetype<Graph, vertex_index_t, std::size_t>
1.53 + graph_t;
1.54 + graph_t& g = static_object<graph_t>::get();
1.55 + dfs_visitor<> v;
1.56 + depth_first_search(g, visitor(v));
1.57 + }
1.58 +
1.59 + #ifdef __SYMBIAN32__
1.60 + std_log(LOG_FILENAME_LINE,"[End Test Case ]");
1.61 +
1.62 + testResultXml("dfs_cc");
1.63 + close_log_file();
1.64 +#endif
1.65 + return 0;
1.66 +}