Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
ogdf::dot::Parser Class Reference

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, nodem_nodeId
 

Detailed Description

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.

See also
dot::Lexer
dot::Ast

Definition at line 327 of file DotParser.h.

Constructor & Destructor Documentation

◆ Parser()

ogdf::dot::Parser::Parser ( std::istream &  in)
explicit

Initializes parser class with given input (but does nothing to it).

Member Function Documentation

◆ read() [1/4]

bool ogdf::dot::Parser::read ( Graph G)

◆ read() [2/4]

bool ogdf::dot::Parser::read ( Graph G,
ClusterGraph C 
)

◆ read() [3/4]

bool ogdf::dot::Parser::read ( Graph G,
ClusterGraph C,
ClusterGraphAttributes CA 
)

◆ read() [4/4]

bool ogdf::dot::Parser::read ( Graph G,
GraphAttributes GA 
)

◆ readGraph()

bool ogdf::dot::Parser::readGraph ( Graph G,
GraphAttributes GA,
ClusterGraph C,
ClusterGraphAttributes CA 
)
private

◆ requestNode()

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).

Parameters
GGraph whom node is requested.
GAGraphAttributes for given graph, ignored if nullptr.
CClusterGraph for given graph, ignored if nullptr.
dataData about current subgraph.
idIdentifier of requested node.
Returns
Requested node.

Member Data Documentation

◆ m_in

std::istream& ogdf::dot::Parser::m_in
private

Definition at line 329 of file DotParser.h.

◆ m_nodeId

HashArray<std::string, node> ogdf::dot::Parser::m_nodeId
private

Definition at line 332 of file DotParser.h.


The documentation for this class was generated from the following file: