1 | #include <boost/graph/adjacency_list.hpp>
|
---|
2 | #include <boost/property_map/property_map.hpp>
|
---|
3 | #include <boost/graph/graphml.hpp>
|
---|
4 | #include <iostream>
|
---|
5 |
|
---|
6 | using namespace std;
|
---|
7 |
|
---|
8 | typedef boost::adjacency_list<> graph_t;
|
---|
9 |
|
---|
10 | int main(int,char**)
|
---|
11 | {
|
---|
12 | string empty_string;
|
---|
13 | boost::ref_property_map<
|
---|
14 | graph_t::vertex_descriptor,
|
---|
15 | string
|
---|
16 | > pmap(empty_string);
|
---|
17 | graph_t g;
|
---|
18 |
|
---|
19 | add_vertex(g);
|
---|
20 |
|
---|
21 | boost::dynamic_properties props;
|
---|
22 | props.property("foo",pmap);
|
---|
23 |
|
---|
24 | boost::write_graphml(cout,g,props);
|
---|
25 | }
|
---|