Опуская очевидный ввод-вывод файла, пока что у меня есть:
Код: Выделить всё
struct NodeProperties {
std::string d{};
std::string e{};
std::string f{};
};
struct EdgeProperties {};
struct GraphProperties {
std::string a{};
std::string b{};
std::string c{};
};
usingDiGraph = boost::adjacency_list;
DiGraph myTree;
std::map attribute_name2name;
//attribute_name2name.insert( make_pair(std::string("a"), std::string("a") ) ); // doesnt help
boost::associative_property_map graphname_map( attribute_name2name );
boost::dynamic_properties treeProperties;
treeProperties.property( "a", graphname_map );
try {
read_graphml(graphmlFile, tree, treeProperties);
}
catch ( std::exception &ex ) {
std::cerr
Подробнее здесь: [url]https://stackoverflow.com/questions/79071738/problem-with-basic-boostgrapread-graphml-use-case[/url]