Loading [MathJax]/extensions/tex2jax.js

Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
TsplibXmlParser.h
Go to the documentation of this file.
1
32#pragma once
33
36
38
39#include <sstream>
40#include <unordered_map>
41
42namespace ogdf {
43
55private:
56 pugi::xml_document m_xml; // hold as a class member, so it gets desctructed at the same time as the parser.
58
60
61 // Called on constructing, to initially load the file.
62 // Basic errors are catched, like missing essential tags.
63 // Parsing is done on read, which might also raise errors.
64 bool load(std::istream& in, std::string& error);
65
66 // Unified read with all the logic.
68
69public:
70 explicit TsplibXmlParser(std::istream& in);
71 ~TsplibXmlParser() = default;
72
73 bool read(Graph& G);
75};
76
77}
Declares class GraphIO which provides access to all graph read and write functionality.
Declaration and implementation of HashArray class.
Stores additional attributes of a graph (like layout information).
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:521
Parses tsplib files in xml format.
bool read(Graph &G, GraphAttributes &GA)
bool read(Graph &G)
bool read(Graph &G, GraphAttributes *GA)
pugi::xml_document m_xml
bool load(std::istream &in, std::string &error)
TsplibXmlParser(std::istream &in)
~TsplibXmlParser()=default
pugi::xml_node m_graphTag
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.