Open
Graph Drawing
Framework

 v.2012.07
 

ogdf::XmlTagObject Struct Reference

#include <ogdf/fileformats/DinoXmlParser.h>

List of all members.

Public Member Functions

 XmlTagObject (HashedString *name)
 ~XmlTagObject ()
bool findSonXmlTagObjectByName (const String sonsName, XmlTagObject *&son) const
bool findSonXmlTagObjectByName (const String sonsName, List< XmlTagObject * > &sons) const
bool findXmlAttributeObjectByName (const String attName, XmlAttributeObject *&attribute) const
const int & getDepth () const
const int & getLine () const
const StringgetName () const
const StringgetValue () const
bool hasMoreSonXmlTagObject (const List< String > &sonNamesToIgnore) const
bool isAttributeLess () const
bool isLeaf () const
void setDepth (int newDepth)
void setInvalid ()
void setLine (int line)
void setValid () const
const bool & valid () const

Public Attributes

int m_depth
int m_line
XmlTagObjectm_pBrother
XmlAttributeObjectm_pFirstAttribute
XmlTagObjectm_pFirstSon
HashedStringm_pTagName
HashedStringm_pTagValue
bool m_valid

Detailed Description

This struct represents a node in the XML parse tree.

Definition at line 132 of file DinoXmlParser.h.


Constructor & Destructor Documentation

ogdf::XmlTagObject::XmlTagObject ( HashedString name)
inline

Constructor

Definition at line 165 of file DinoXmlParser.h.

ogdf::XmlTagObject::~XmlTagObject ( )
inline

Destructor; will be performed in destroyParseTree().

Definition at line 175 of file DinoXmlParser.h.


Member Function Documentation

bool ogdf::XmlTagObject::findSonXmlTagObjectByName ( const String  sonsName,
XmlTagObject *&  son 
) const

Searches for a son with tag name sonsName. Returns the son via the referenced pointer son. Returns true if son is found. Returns false, otherwise, son is set to NULL.

NEW

bool ogdf::XmlTagObject::findSonXmlTagObjectByName ( const String  sonsName,
List< XmlTagObject * > &  sons 
) const

Searches for sons with tag name sonsName. Returns the sons via a list with pointers to the sons. Returns true if at least one son was found. Returns false otherwise, sons is set to NULL.

NEW

bool ogdf::XmlTagObject::findXmlAttributeObjectByName ( const String  attName,
XmlAttributeObject *&  attribute 
) const

Searches for an attribute with name name.

NEW

const int& ogdf::XmlTagObject::getDepth ( ) const
inline

Definition at line 266 of file DinoXmlParser.h.

const int& ogdf::XmlTagObject::getLine ( ) const
inline

Definition at line 277 of file DinoXmlParser.h.

const String& ogdf::XmlTagObject::getName ( ) const
inline

Definition at line 248 of file DinoXmlParser.h.

const String& ogdf::XmlTagObject::getValue ( ) const
inline

Definition at line 252 of file DinoXmlParser.h.

bool ogdf::XmlTagObject::hasMoreSonXmlTagObject ( const List< String > &  sonNamesToIgnore) const

Searches for sons of father which names are inequal to those in list sonsNames. Returns true if at least one son of father is found whose name doesn't match one in sonsNames. Returns false otherwise.

NEW

bool ogdf::XmlTagObject::isAttributeLess ( ) const

Checks if currentTag owns at least one attribute. Returns true if list of attributes isn't empty. Returns false otherwise.

NEW

bool ogdf::XmlTagObject::isLeaf ( ) const

Checks if currentNode is leaf in the parse tree. Returns true if list of sons is empty. Returns false otherwise.

NEW

void ogdf::XmlTagObject::setDepth ( int  newDepth)
inline

Definition at line 271 of file DinoXmlParser.h.

void ogdf::XmlTagObject::setInvalid ( )
inline

Definition at line 261 of file DinoXmlParser.h.

void ogdf::XmlTagObject::setLine ( int  line)
inline

Definition at line 282 of file DinoXmlParser.h.

void ogdf::XmlTagObject::setValid ( ) const
inline

Setter.

Definition at line 257 of file DinoXmlParser.h.

const bool& ogdf::XmlTagObject::valid ( ) const
inline

Getter.

Definition at line 244 of file DinoXmlParser.h.


Member Data Documentation

int ogdf::XmlTagObject::m_depth

integer value for the depth in the xml parse tree

Definition at line 181 of file DinoXmlParser.h.

int ogdf::XmlTagObject::m_line

integer value that stores the line number of the tag in the parsed xml document

Definition at line 185 of file DinoXmlParser.h.

XmlTagObject* ogdf::XmlTagObject::m_pBrother

Contains the pointer to a brother tag object or 0 if this object is the only child

Definition at line 162 of file DinoXmlParser.h.

XmlAttributeObject* ogdf::XmlTagObject::m_pFirstAttribute

Pointer to the first attribute; if there is more than one attribute these are linked by m_pNextAttribute in struct XmlAttributeObject

Definition at line 143 of file DinoXmlParser.h.

XmlTagObject* ogdf::XmlTagObject::m_pFirstSon

Contains the pointer to the first son tag object, i.e. for ... ... it contains a pointer to the object representing B The other children of A are reachable via m_pBrother of the first son, i.e. the variable m_pBrother of the object representing B contains a pointer to the object representing C

Definition at line 157 of file DinoXmlParser.h.

HashedString* ogdf::XmlTagObject::m_pTagName

The identifier of the tag, *i.e. for the identifier is "A"

Definition at line 137 of file DinoXmlParser.h.

HashedString* ogdf::XmlTagObject::m_pTagValue

Contains the characters inbetween the start tag and the end tag, i.e. for lala it contains " lala "

Definition at line 148 of file DinoXmlParser.h.

bool ogdf::XmlTagObject::m_valid
mutable

Flag denotes whether attribute is valid or not.

Definition at line 175 of file DinoXmlParser.h.


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