DOT format parser class. More...
#include <ogdf/fileformats/DotParser.h>
Public Member Functions | |
| Parser (std::istream &in) | |
| Initializes parser class with given input (but does nothing to it). | |
| bool | read (Graph &G) |
| bool | read (Graph &G, ClusterGraph &C) |
| bool | read (Graph &G, ClusterGraph &C, ClusterGraphAttributes &CA) |
| bool | read (Graph &G, GraphAttributes &GA) |
| node | requestNode (Graph &G, GraphAttributes *GA, ClusterGraph *C, const SubgraphData &data, const std::string &id) |
| Perfoms a node query, returning node for given attribute. | |
Private Member Functions | |
| bool | readGraph (Graph &G, GraphAttributes *GA, ClusterGraph *C, ClusterGraphAttributes *CA) |
Private Attributes | |
| std::istream & | m_in |
| HashArray< std::string, node > | m_nodeId |
DOT format parser class.
Provides methods for reading graphs in the DOT format. This class is actually just a wrapper/composer for Ast and Lexer classes.
Definition at line 327 of file DotParser.h.
|
explicit |
Initializes parser class with given input (but does nothing to it).
| bool ogdf::dot::Parser::read | ( | Graph & | G, |
| ClusterGraph & | C | ||
| ) |
| bool ogdf::dot::Parser::read | ( | Graph & | G, |
| ClusterGraph & | C, | ||
| ClusterGraphAttributes & | CA | ||
| ) |
| bool ogdf::dot::Parser::read | ( | Graph & | G, |
| GraphAttributes & | GA | ||
| ) |
|
private |
| node ogdf::dot::Parser::requestNode | ( | Graph & | G, |
| GraphAttributes * | GA, | ||
| ClusterGraph * | C, | ||
| const SubgraphData & | data, | ||
| const std::string & | id | ||
| ) |
Perfoms a node query, returning node for given attribute.
Returns a node with given id in a graph. If node is requested for the first time then Graph::newNode is called and node is initialized with default attributes and placed in proper cluster (through data).
| G | Graph whom node is requested. |
| GA | GraphAttributes for given graph, ignored if nullptr. |
| C | ClusterGraph for given graph, ignored if nullptr. |
| data | Data about current subgraph. |
| id | Identifier of requested node. |
|
private |
Definition at line 329 of file DotParser.h.
Definition at line 332 of file DotParser.h.