1 // (C) Copyright Jeremy Siek 2004
2 // Distributed under the Boost Software License, Version 1.0. (See
3 // accompanying file LICENSE_1_0.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
5
6 #include <string>
7 #include <iostream>
8 #include <boost/cstdlib.hpp>
9 #include <boost/graph/adjacency_list.hpp>
10 #include <boost/graph/subgraph.hpp>
11
main()12 int main()
13 {
14 using namespace boost;
15 using std::string;
16
17 typedef adjacency_list< vecS, vecS, directedS, no_property,
18 property< edge_index_t, int >, property< graph_name_t, string > >
19 graph_t;
20
21 graph_t g;
22 get_property(g, graph_name) = "graph";
23
24 std::cout << "name: " << get_property(g, graph_name) << std::endl;
25
26 typedef subgraph< graph_t > subgraph_t;
27
28 subgraph_t sg;
29 get_property(sg, graph_name) = "subgraph";
30
31 std::cout << "name: " << get_property(sg, graph_name) << std::endl;
32
33 return exit_success;
34 }
35