1 | /// "minimal" example using dynamic_properties, does nothing, but compiles
|
---|
2 |
|
---|
3 | #include <boost/shared_ptr.hpp>
|
---|
4 | #include <boost/graph/adjacency_list.hpp>
|
---|
5 | #include <boost/graph/graphviz.hpp>
|
---|
6 |
|
---|
7 | typedef boost::shared_ptr<int> my_t;
|
---|
8 |
|
---|
9 | inline std::istream& operator>> (std::istream& is, my_t&) { return is; }
|
---|
10 |
|
---|
11 | typedef boost::property< boost::graph_name_t, my_t > graph_p;
|
---|
12 | typedef boost::adjacency_list < boost::vecS, boost::vecS, boost::directedS,
|
---|
13 | boost::no_property, boost::no_property, graph_p > graph_t;
|
---|
14 |
|
---|
15 | typedef boost::ref_property_map<graph_t*, my_t> gname_p;
|
---|
16 |
|
---|
17 | int main()
|
---|
18 | {
|
---|
19 | graph_t g(0);
|
---|
20 | boost::dynamic_properties dp;
|
---|
21 | gname_p gname(boost::get_property(g, boost::graph_name));
|
---|
22 | dp.property("name", gname);
|
---|
23 | }
|
---|
24 |
|
---|
25 | // Local Variables:
|
---|
26 | // mode: C++
|
---|
27 | // End:
|
---|