int const SIZE=10;
struct DotVertex {
int Attribute[SIZE];
};
struct DotEdge {
std::string label;
};
typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS,
DotVertex, DotEdge> graph_t;
int main() {
graph_t graphviz;
boost::dynamic_properties dp(boost::ignore_other_properties);
dp.property("node_id", boost::get(&DotVertex::name, graph_t));
dp.property("Attribute0", boost::get(&DotVertex::Attribute[0], graph_t));
std::ifstream dot("graphnametest2.dot");
boost::read_graphviz(dot, graph_t, dp);
Graphviz DOTファイルから配列属性[SIZE]によって不明なプロパティを読み取る方法、またはそのサイズがわからなくても読み取る方法は? たとえば、次のコードは常に間違っています: dp.property("Attribute0", boost::get(&DotVertex::Attribute[0], graph_t))