Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

ogdf::GmlParser Class Reference

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

#include <ogdf/fileformats/GmlParser.h>

Public Member Functions

 GmlParser (istream &is, bool doCheck=false)
 
 ~GmlParser ()
 Destruction: destroys object tree. More...
 
bool error () const
 
const string & errorString () const
 
int id (GmlObject *object) const
 
bool read (Graph &G)
 
bool read (Graph &G, GraphAttributes &AG)
 
bool readCluster (Graph &G, ClusterGraph &CG, ClusterGraphAttributes *ACG=nullptr)
 

Protected Member Functions

bool clusterRead (GmlObject *rootCluster, ClusterGraph &CG, ClusterGraphAttributes *ACG=nullptr)
 
bool readClusterAttributes (GmlObject *cGraphics, cluster c, ClusterGraphAttributes &ACG)
 
bool recursiveClusterRead (GmlObject *clusterObject, ClusterGraph &CG, cluster c, ClusterGraphAttributes *ACG=nullptr)
 Reads cluster subtree information recursively. More...
 

Private Member Functions

void createObjectTree (istream &is, bool doCheck)
 
void destroyObjectList (GmlObject *object)
 
bool getLine ()
 
int getNextSymbol ()
 
GmlObject * getNodeIdRange (int &minId, int &maxId)
 
GmlKey hashString (const string &str)
 
void indent (ostream &os, int d)
 
void initPredefinedKeys ()
 
void output (ostream &os, GmlObject *object, int d)
 
GmlObject * parseList (int closingKey, int errorKey)
 
void readLineAttribute (GmlObject *object, DPolyline &dpl)
 
void setError (const char *errorString)
 

Private Attributes

char m_cStore
 
bool m_doCheck
 
double m_doubleSymbol
 
bool m_error
 
string m_errorString
 
GmlObject * m_graphObject
 
Hashing< string, int > m_hashTable
 
int m_intSymbol
 
istream * m_is
 
GmlKey m_keySymbol
 
char * m_lineBuffer
 
string m_longString
 
Array< node > m_mapToNode
 
int m_num
 
GmlObject * m_objectTree
 
char * m_pCurrent
 
char * m_pStore
 
char * m_rLineBuffer
 
const char * m_stringSymbol
 

Detailed Description

Reads GML file and constructs GML parse tree.

Definition at line 130 of file GmlParser.h.

Constructor & Destructor Documentation

◆ GmlParser()

ogdf::GmlParser::GmlParser ( istream &  is,
bool  doCheck = false 
)
explicit

◆ ~GmlParser()

ogdf::GmlParser::~GmlParser ( )

Destruction: destroys object tree.

Member Function Documentation

◆ clusterRead()

bool ogdf::GmlParser::clusterRead ( GmlObject *  rootCluster,
ClusterGraph &  CG,
ClusterGraphAttributes *  ACG = nullptr 
)
protected

◆ createObjectTree()

void ogdf::GmlParser::createObjectTree ( istream &  is,
bool  doCheck 
)
private

◆ destroyObjectList()

void ogdf::GmlParser::destroyObjectList ( GmlObject *  object)
private

◆ error()

bool ogdf::GmlParser::error ( ) const
inline

Definition at line 164 of file GmlParser.h.

◆ errorString()

const string& ogdf::GmlParser::errorString ( ) const
inline

Definition at line 166 of file GmlParser.h.

◆ getLine()

bool ogdf::GmlParser::getLine ( )
private

◆ getNextSymbol()

int ogdf::GmlParser::getNextSymbol ( )
private

◆ getNodeIdRange()

GmlObject* ogdf::GmlParser::getNodeIdRange ( int &  minId,
int &  maxId 
)
private

◆ hashString()

GmlKey ogdf::GmlParser::hashString ( const string &  str)
private

◆ id()

int ogdf::GmlParser::id ( GmlObject *  object) const
inline

Definition at line 161 of file GmlParser.h.

◆ indent()

void ogdf::GmlParser::indent ( ostream &  os,
int  d 
)
private

◆ initPredefinedKeys()

void ogdf::GmlParser::initPredefinedKeys ( )
private

◆ output()

void ogdf::GmlParser::output ( ostream &  os,
GmlObject *  object,
int  d 
)
private

◆ parseList()

GmlObject* ogdf::GmlParser::parseList ( int  closingKey,
int  errorKey 
)
private

◆ read() [1/2]

bool ogdf::GmlParser::read ( Graph &  G)

◆ read() [2/2]

bool ogdf::GmlParser::read ( Graph &  G,
GraphAttributes &  AG 
)

◆ readCluster()

bool ogdf::GmlParser::readCluster ( Graph &  G,
ClusterGraph &  CG,
ClusterGraphAttributes *  ACG = nullptr 
)

◆ readClusterAttributes()

bool ogdf::GmlParser::readClusterAttributes ( GmlObject *  cGraphics,
cluster  c,
ClusterGraphAttributes &  ACG 
)
protected

◆ readLineAttribute()

void ogdf::GmlParser::readLineAttribute ( GmlObject *  object,
DPolyline &  dpl 
)
private

◆ recursiveClusterRead()

bool ogdf::GmlParser::recursiveClusterRead ( GmlObject *  clusterObject,
ClusterGraph &  CG,
cluster  c,
ClusterGraphAttributes *  ACG = nullptr 
)
protected

Reads cluster subtree information recursively.

◆ setError()

void ogdf::GmlParser::setError ( const char *  errorString)
private

Member Data Documentation

◆ m_cStore

char ogdf::GmlParser::m_cStore
private

Definition at line 138 of file GmlParser.h.

◆ m_doCheck

bool ogdf::GmlParser::m_doCheck
private

Definition at line 148 of file GmlParser.h.

◆ m_doubleSymbol

double ogdf::GmlParser::m_doubleSymbol
private

Definition at line 141 of file GmlParser.h.

◆ m_error

bool ogdf::GmlParser::m_error
private

Definition at line 135 of file GmlParser.h.

◆ m_errorString

string ogdf::GmlParser::m_errorString
private

Definition at line 136 of file GmlParser.h.

◆ m_graphObject

GmlObject* ogdf::GmlParser::m_graphObject
private

Definition at line 150 of file GmlParser.h.

◆ m_hashTable

Hashing<string,int> ogdf::GmlParser::m_hashTable
private

Definition at line 131 of file GmlParser.h.

◆ m_intSymbol

int ogdf::GmlParser::m_intSymbol
private

Definition at line 140 of file GmlParser.h.

◆ m_is

istream* ogdf::GmlParser::m_is
private

Definition at line 134 of file GmlParser.h.

◆ m_keySymbol

GmlKey ogdf::GmlParser::m_keySymbol
private

Definition at line 143 of file GmlParser.h.

◆ m_lineBuffer

char * ogdf::GmlParser::m_lineBuffer
private

Definition at line 138 of file GmlParser.h.

◆ m_longString

string ogdf::GmlParser::m_longString
private

Definition at line 144 of file GmlParser.h.

◆ m_mapToNode

Array<node> ogdf::GmlParser::m_mapToNode
private

Definition at line 149 of file GmlParser.h.

◆ m_num

int ogdf::GmlParser::m_num
private

Definition at line 132 of file GmlParser.h.

◆ m_objectTree

GmlObject* ogdf::GmlParser::m_objectTree
private

Definition at line 146 of file GmlParser.h.

◆ m_pCurrent

char * ogdf::GmlParser::m_pCurrent
private

Definition at line 138 of file GmlParser.h.

◆ m_pStore

char * ogdf::GmlParser::m_pStore
private

Definition at line 138 of file GmlParser.h.

◆ m_rLineBuffer

char* ogdf::GmlParser::m_rLineBuffer
private

Definition at line 138 of file GmlParser.h.

◆ m_stringSymbol

const char* ogdf::GmlParser::m_stringSymbol
private

Definition at line 142 of file GmlParser.h.


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