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
GdfParser.h
Go to the documentation of this file.
1
32#pragma once
33
34#include <ogdf/basic/Graph.h>
38
39#include <istream>
40#include <sstream>
41#include <string>
42#include <vector>
43
44namespace ogdf {
45
46namespace gdf {
47
48
49class Parser {
50private:
51 std::istream& m_istream;
53 std::vector<NodeAttribute> m_nodeAttrs;
54 std::vector<EdgeAttribute> m_edgeAttrs;
55
56 bool readAttributes(GraphAttributes& GA, node v, const std::vector<std::string>& values);
57 bool readAttributes(GraphAttributes& GA, edge e, const std::vector<std::string>& values);
58
59 bool readNodeDef(const std::string& str);
60 bool readEdgeDef(const std::string& str);
61
62 bool readNodeStmt(Graph& G, GraphAttributes* GA, const std::string& str, size_t line);
63 bool readEdgeStmt(Graph& G, GraphAttributes* GA, const std::string& str, size_t line);
64
66
67public:
68 explicit Parser(std::istream& is);
69
70 bool read(Graph& G) { return readGraph(G, nullptr); }
71
72 bool read(Graph& G, GraphAttributes& GA) { return readGraph(G, &GA); }
73};
74
75}
76}
Declarations for GDF file format.
Includes declaration of graph class.
Declaration of class GraphAttributes which extends a Graph by additional attributes.
Declaration and implementation of HashArray class.
Class for the representation of edges.
Definition Graph_d.h:300
Stores additional attributes of a graph (like layout information).
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:521
Indexed arrays using hashing for element access.
Definition HashArray.h:93
Class for the representation of nodes.
Definition Graph_d.h:177
bool readNodeStmt(Graph &G, GraphAttributes *GA, const std::string &str, size_t line)
HashArray< std::string, node > m_nodeId
Definition GdfParser.h:52
bool read(Graph &G, GraphAttributes &GA)
Definition GdfParser.h:72
bool readAttributes(GraphAttributes &GA, edge e, const std::vector< std::string > &values)
bool readEdgeStmt(Graph &G, GraphAttributes *GA, const std::string &str, size_t line)
std::vector< NodeAttribute > m_nodeAttrs
Definition GdfParser.h:53
Parser(std::istream &is)
bool readAttributes(GraphAttributes &GA, node v, const std::vector< std::string > &values)
bool read(Graph &G)
Definition GdfParser.h:70
std::istream & m_istream
Definition GdfParser.h:51
bool readEdgeDef(const std::string &str)
bool readGraph(Graph &G, GraphAttributes *GA)
bool readNodeDef(const std::string &str)
std::vector< EdgeAttribute > m_edgeAttrs
Definition GdfParser.h:54
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.