
27 Mar
2003
27 Mar
'03
8:58 p.m.
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).