Open
Graph Drawing
Framework

 v.2010.10
 

Public Types | Public Member Functions | Private Member Functions | Private Attributes

ogdf::XmlParser Class Reference

#include <ogdf/fileformats/XmlParser.h>

List of all members.

Public Types

enum  PredefinedKey {
  idPredefKey = 0, labelPredefKey, CreatorPredefKey, namePredefKey,
  graphPredefKey, versionPredefKey, directedPredefKey, nodePredefKey,
  edgePredefKey, graphicsPredefKey, xPredefKey, yPredefKey,
  wPredefKey, hPredefKey, nodetypePredefKey, edgetypePredefKey,
  typePredefKey, widthPredefKey, heightPredefKey, sizePredefKey,
  positionPredefKey, pathPredefKey, sourcePredefKey, targetPredefKey,
  sensePredefKey, arrowPredefKey, LinePredefKey, pointPredefKey,
  NEXTPREDEFKEY
}

Public Member Functions

 XmlParser (const char *fileName, bool doCheck=false)
 XmlParser (istream &is, bool doCheck=false)
 ~XmlParser ()
XmlObjectroot ()
int getId (const String &tag) const
int id (XmlObject *object) const
bool error () const
const StringerrorString () const
bool read (Graph &G)
bool read (Graph &G, GraphAttributes &AG)

Private Member Functions

void createObjectTree (istream &is, bool doCheck)
void initPredefinedKeys ()
void setError (const char *errorString)
XmlObjectparseList (XmlObjectType closingKey, XmlObjectType errorKey, const char *objectBodyName)
XmlObjectType getNextSymbol ()
bool getLine ()
XmlKey hashString (const String &str)
XmlObjectgetNodeIdRange (int &minId, int &maxId, int &nodetypeCount, XmlObject *graphObject)
bool makeIdMap (int maxId, Array< char * > &idMap, int nodetypeCount, Array< char * > &typeName, Array< double > &typeWidth, Array< double > &typeHeight, XmlObject *graphObject)
void closeLabels (Array< char * > idMap, Array< char * > typeName)
void readLineAttribute (XmlObject *object, DPolyline &dpl)
void destroyObjectList (XmlObject *object)
void indent (ostream &os, int d)
void output (ostream &os, XmlObject *object, int d)

Private Attributes

Hashing< String, int > m_hashTable
int m_num
istream * m_is
bool m_error
String m_errorString
char * m_rLineBuffer
char * m_lineBuffer
char * m_pCurrent
char * m_pStore
char m_cStore
int m_intSymbol
double m_doubleSymbol
const char * m_stringSymbol
char * m_keyName
XmlKey m_keySymbol
String m_longString
bool m_eoTag
XmlObjectm_objectTree
bool m_doCheck
SList< char * > m_objectBody

Detailed Description

Definition at line 73 of file XmlParser.h.


Member Enumeration Documentation

Enumerator:
idPredefKey 
labelPredefKey 
CreatorPredefKey 
namePredefKey 
graphPredefKey 
versionPredefKey 
directedPredefKey 
nodePredefKey 
edgePredefKey 
graphicsPredefKey 
xPredefKey 
yPredefKey 
wPredefKey 
hPredefKey 
nodetypePredefKey 
edgetypePredefKey 
typePredefKey 
widthPredefKey 
heightPredefKey 
sizePredefKey 
positionPredefKey 
pathPredefKey 
sourcePredefKey 
targetPredefKey 
sensePredefKey 
arrowPredefKey 
LinePredefKey 
pointPredefKey 
NEXTPREDEFKEY 

Definition at line 91 of file XmlParser.h.


Constructor & Destructor Documentation

ogdf::XmlParser::XmlParser ( const char *  fileName,
bool  doCheck = false 
)
ogdf::XmlParser::XmlParser ( istream &  is,
bool  doCheck = false 
)
ogdf::XmlParser::~XmlParser (  ) 

Member Function Documentation

void ogdf::XmlParser::closeLabels ( Array< char * >  idMap,
Array< char * >  typeName 
) [private]
void ogdf::XmlParser::createObjectTree ( istream &  is,
bool  doCheck 
) [private]
void ogdf::XmlParser::destroyObjectList ( XmlObject object  )  [private]
bool ogdf::XmlParser::error (  )  const [inline]

Definition at line 121 of file XmlParser.h.

const String& ogdf::XmlParser::errorString (  )  const [inline]

Definition at line 123 of file XmlParser.h.

int ogdf::XmlParser::getId ( const String tag  )  const [inline]

Definition at line 112 of file XmlParser.h.

bool ogdf::XmlParser::getLine (  )  [private]
XmlObjectType ogdf::XmlParser::getNextSymbol (  )  [private]
XmlObject* ogdf::XmlParser::getNodeIdRange ( int &  minId,
int &  maxId,
int &  nodetypeCount,
XmlObject graphObject 
) [private]
XmlKey ogdf::XmlParser::hashString ( const String str  )  [private]
int ogdf::XmlParser::id ( XmlObject object  )  const [inline]

Definition at line 118 of file XmlParser.h.

void ogdf::XmlParser::indent ( ostream &  os,
int  d 
) [private]
void ogdf::XmlParser::initPredefinedKeys (  )  [private]
bool ogdf::XmlParser::makeIdMap ( int  maxId,
Array< char * > &  idMap,
int  nodetypeCount,
Array< char * > &  typeName,
Array< double > &  typeWidth,
Array< double > &  typeHeight,
XmlObject graphObject 
) [private]
void ogdf::XmlParser::output ( ostream &  os,
XmlObject object,
int  d 
) [private]
XmlObject* ogdf::XmlParser::parseList ( XmlObjectType  closingKey,
XmlObjectType  errorKey,
const char *  objectBodyName 
) [private]
bool ogdf::XmlParser::read ( Graph G,
GraphAttributes AG 
)
bool ogdf::XmlParser::read ( Graph G  ) 
void ogdf::XmlParser::readLineAttribute ( XmlObject object,
DPolyline dpl 
) [private]
XmlObject* ogdf::XmlParser::root (  )  [inline]

Definition at line 109 of file XmlParser.h.

void ogdf::XmlParser::setError ( const char *  errorString  )  [private]

Member Data Documentation

char ogdf::XmlParser::m_cStore [private]

Definition at line 73 of file XmlParser.h.

Definition at line 85 of file XmlParser.h.

Definition at line 76 of file XmlParser.h.

bool ogdf::XmlParser::m_eoTag [private]

Definition at line 81 of file XmlParser.h.

bool ogdf::XmlParser::m_error [private]

Definition at line 70 of file XmlParser.h.

Definition at line 71 of file XmlParser.h.

Definition at line 66 of file XmlParser.h.

Definition at line 75 of file XmlParser.h.

istream* ogdf::XmlParser::m_is [private]

Definition at line 69 of file XmlParser.h.

char* ogdf::XmlParser::m_keyName [private]

Definition at line 78 of file XmlParser.h.

Definition at line 79 of file XmlParser.h.

Definition at line 73 of file XmlParser.h.

Definition at line 80 of file XmlParser.h.

int ogdf::XmlParser::m_num [private]

Definition at line 67 of file XmlParser.h.

Definition at line 87 of file XmlParser.h.

Definition at line 83 of file XmlParser.h.

char * ogdf::XmlParser::m_pCurrent [private]

Definition at line 73 of file XmlParser.h.

char * ogdf::XmlParser::m_pStore [private]

Definition at line 73 of file XmlParser.h.

Definition at line 73 of file XmlParser.h.

const char* ogdf::XmlParser::m_stringSymbol [private]

Definition at line 77 of file XmlParser.h.


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