|
Boost Users : |
From: Jeff Holle (jeff.holle_at_[hidden])
Date: 2003-03-27 15:58:17
I would like to write a "generic" routine that prints the named vertex
and edges properties.
I can see in this code sibit (from graphviz.cpp) that the info that I
want is present:
> vertex_label(const Vertex& u, const GraphvizDigraph& g) {
> boost::property_map<GraphvizDigraph,
> boost::vertex_attribute_t>::const_type
> va = boost::get(boost::vertex_attribute, g);
> return (*(va[u].find("label"))).second;
> }
It appears that va is a map<Vertex, map<string, "property value"> >
How would I write code that prints the names of the properites of a
given vertex? (It would involve iterating over the map whose find
method is used in the above code segment).
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net