Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

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

Reads GML file and constructs GML parse tree. More...

#include <ogdf/fileformats/GmlParser.h>

Public Member Functions

 Parser (std::istream &is, bool doCheck=false)
 
 ~Parser ()
 Destruction: destroys object tree.
 
bool error () const
 
bool read (Graph &G)
 
bool read (Graph &G, GraphAttributes &GA)
 
bool readCluster (Graph &G, ClusterGraph &CG, ClusterGraphAttributes *ACG=nullptr)
 

Protected Member Functions

bool recursiveClusterRead (Object *clusterObject, ClusterGraph &CG, cluster c, ClusterGraphAttributes *ACG=nullptr)
 Reads cluster subtree information recursively.
 

Private Member Functions

void createObjectTree (std::istream &is, bool doCheck)
 
void destroyObjectList (Object *object)
 
bool getLine ()
 
ObjectType getNextSymbol ()
 
ObjectgetNodeIdRange (int &minId, int &maxId)
 
ObjectparseList (ObjectType closingKey)
 
void readLineAttribute (Object *object, DPolyline &dpl)
 
void setError (const string &errorString, Logger::Level level=Logger::Level::Default)
 

Private Attributes

char m_cStore
 
bool m_doCheck
 
double m_doubleSymbol
 
bool m_error
 
Objectm_graphObject
 
int m_intSymbol
 
std::istream * m_is
 
Key m_keySymbol
 
charm_lineBuffer
 
string m_longString
 
Array< nodem_mapToNode
 
Objectm_objectTree
 
charm_pCurrent
 
charm_pStore
 
charm_rLineBuffer
 
const charm_stringSymbol
 

Detailed Description

Reads GML file and constructs GML parse tree.

Definition at line 79 of file GmlParser.h.

Constructor & Destructor Documentation

◆ Parser()

ogdf::gml::Parser::Parser ( std::istream &  is,
bool  doCheck = false 
)
explicit

◆ ~Parser()

ogdf::gml::Parser::~Parser ( )

Destruction: destroys object tree.

Member Function Documentation

◆ createObjectTree()

void ogdf::gml::Parser::createObjectTree ( std::istream &  is,
bool  doCheck 
)
private

◆ destroyObjectList()

void ogdf::gml::Parser::destroyObjectList ( Object object)
private

◆ error()

bool ogdf::gml::Parser::error ( ) const
inline

Definition at line 106 of file GmlParser.h.

◆ getLine()

bool ogdf::gml::Parser::getLine ( )
private

◆ getNextSymbol()

ObjectType ogdf::gml::Parser::getNextSymbol ( )
private

◆ getNodeIdRange()

Object * ogdf::gml::Parser::getNodeIdRange ( int minId,
int maxId 
)
private

◆ parseList()

Object * ogdf::gml::Parser::parseList ( ObjectType  closingKey)
private

◆ read() [1/2]

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

◆ read() [2/2]

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

◆ readCluster()

bool ogdf::gml::Parser::readCluster ( Graph G,
ClusterGraph CG,
ClusterGraphAttributes ACG = nullptr 
)

◆ readLineAttribute()

void ogdf::gml::Parser::readLineAttribute ( Object object,
DPolyline dpl 
)
private

◆ recursiveClusterRead()

bool ogdf::gml::Parser::recursiveClusterRead ( Object clusterObject,
ClusterGraph CG,
cluster  c,
ClusterGraphAttributes ACG = nullptr 
)
protected

Reads cluster subtree information recursively.

◆ setError()

void ogdf::gml::Parser::setError ( const string &  errorString,
Logger::Level  level = Logger::Level::Default 
)
private

Member Data Documentation

◆ m_cStore

char ogdf::gml::Parser::m_cStore
private

Definition at line 83 of file GmlParser.h.

◆ m_doCheck

bool ogdf::gml::Parser::m_doCheck
private

Definition at line 93 of file GmlParser.h.

◆ m_doubleSymbol

double ogdf::gml::Parser::m_doubleSymbol
private

Definition at line 86 of file GmlParser.h.

◆ m_error

bool ogdf::gml::Parser::m_error
private

Definition at line 81 of file GmlParser.h.

◆ m_graphObject

Object* ogdf::gml::Parser::m_graphObject
private

Definition at line 95 of file GmlParser.h.

◆ m_intSymbol

int ogdf::gml::Parser::m_intSymbol
private

Definition at line 85 of file GmlParser.h.

◆ m_is

std::istream* ogdf::gml::Parser::m_is
private

Definition at line 80 of file GmlParser.h.

◆ m_keySymbol

Key ogdf::gml::Parser::m_keySymbol
private

Definition at line 88 of file GmlParser.h.

◆ m_lineBuffer

char * ogdf::gml::Parser::m_lineBuffer
private

Definition at line 83 of file GmlParser.h.

◆ m_longString

string ogdf::gml::Parser::m_longString
private

Definition at line 89 of file GmlParser.h.

◆ m_mapToNode

Array<node> ogdf::gml::Parser::m_mapToNode
private

Definition at line 94 of file GmlParser.h.

◆ m_objectTree

Object* ogdf::gml::Parser::m_objectTree
private

Definition at line 91 of file GmlParser.h.

◆ m_pCurrent

char * ogdf::gml::Parser::m_pCurrent
private

Definition at line 83 of file GmlParser.h.

◆ m_pStore

char * ogdf::gml::Parser::m_pStore
private

Definition at line 83 of file GmlParser.h.

◆ m_rLineBuffer

char* ogdf::gml::Parser::m_rLineBuffer
private

Definition at line 83 of file GmlParser.h.

◆ m_stringSymbol

const char* ogdf::gml::Parser::m_stringSymbol
private

Definition at line 87 of file GmlParser.h.


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