I am stuck with the BGL trying to read nodes default attributes. I managed to read nodes, edges and even graph attributes. But not the default attributes (color, fontname, shape) as in the graph below:
digraph G {
node [color = black, fontname = courier, shape = plaintext];
0[id=0, label=start];
1[id=1, label="0x00007ff7ca001358"];
2[id=2, label="0x00007ff7ca001969"];
0->1;
1->2;
}
Here is my code, to start with:
class Node {
public:
std::string label, id;
};
class Branch {
public:
bool path;
};
typedef boost::adjacency_list<boost::listS, boost::vecS, boost::directedS,Node,Branch> DAG;
std::istream & operator>>(std::istream & i, DAG & g)
{
boost::dynamic_properties dp;
dp.property("id",get(&Node::id,g));
dp.property("label",get(&Node::label,g));
dp.property("path", get(&Branch::path, g));
/* ??? dp.property("color", get(&????, g)); <= what to put here ? ref_property_map ? */
read_graphviz(i,g,dp,"index");
return i;
}