1 #ifndef GRAPH_ANALYSIS_IO_YAML_READER_HPP 2 #define GRAPH_ANALYSIS_IO_YAML_READER_HPP 9 #include "../GraphIO.hpp" 10 #include "../Vertex.hpp" 11 #include "../Edge.hpp" 25 typedef std::map < std::string, Vertex::Ptr > VertexMap;
33 void parseNodes(std::stringstream& nodeStream,
const BaseGraph::Ptr& graph, VertexMap& vMap)
const;
40 void parseEdges(std::stringstream& edgeStream,
const BaseGraph::Ptr& graph, VertexMap& vMap)
const;
48 std::string nextToken(
const std::string& keyword, std::stringstream& stream)
const;
50 void die(
const std::string& keyword,
const std::string& word)
const;
52 void die(
const std::string& msg)
const;
64 #endif // GRAPH_ANALYSIS_IO_YAML_READER_HPP Parses an inputfile with custom YAML/yml format to requested graph.
Definition: YamlReader.hpp:23
Interface for Reader implementation that perform custom graph deserialization.
Definition: GraphIO.hpp:56
Main namespace of the graph analysis library.
Definition: BFS.cpp:3
shared_ptr< BaseGraph > Ptr
Definition: BaseGraph.hpp:34
void read(const std::string &filename, BaseGraph::Ptr graph)
reads the graph from the given file and stores it to the provided graph argument
Definition: YamlReader.cpp:8