1#ifndef UTOPIA_DATAIO_GRAPH_LOAD_HH
2#define UTOPIA_DATAIO_GRAPH_LOAD_HH
6#include <boost/graph/graphml.hpp>
7#include <boost/graph/graphviz.hpp>
8#include <boost/property_map/dynamic_property_map.hpp>
38template <
typename Graph>
40 boost::dynamic_properties
pmaps)
51 throw std::invalid_argument(
52 "Failed opening file for loading graph! Make sure there "
61 }
else if (
format ==
"graphml") {
65 throw std::invalid_argument(
66 "The given file format is not supported. The file format needs "
67 "to be one of 'graphviz' / 'gv' / 'dot' or 'graphml' "
68 "and needs to be specified in the config's format node, e.g. "
69 "load_from_file: { format: graphml }.");
YAML::Node Config
Type of a variadic dictionary-like data structure used throughout Utopia.
Definition types.hh:71
Container select_entities(const Manager &mngr, const DataIO::Config &sel_cfg)
Select entities according to parameters specified in a configuration.
Definition select.hh:213
std::string get_abs_filepath(const Config &cfg)
Extracts an absolute file path from a configuration.
Definition filesystem.hh:73
Graph load_graph(const Config &cfg, boost::dynamic_properties pmaps)
Load a graph.
Definition graph_load.hh:39