Open
Graph Drawing
Framework

 v.2012.05
 

ogdf::XmlTagObject Struct Reference

#include <ogdf/fileformats/DinoXmlParser.h>

List of all members.

Public Member Functions

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

Public Attributes

HashedStringm_pTagName
XmlAttributeObjectm_pFirstAttribute
HashedStringm_pTagValue
XmlTagObjectm_pFirstSon
XmlTagObjectm_pBrother
bool m_valid
int m_depth
int m_line

Detailed Description

This struct represents a node in the XML parse tree.

Definition at line 131 of file DinoXmlParser.h.


Constructor & Destructor Documentation

Constructor

Definition at line 164 of file DinoXmlParser.h.

Destructor; will be performed in destroyParseTree().

Definition at line 174 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 264 of file DinoXmlParser.h.

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

Definition at line 275 of file DinoXmlParser.h.

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

Definition at line 246 of file DinoXmlParser.h.

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

Definition at line 250 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

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

NEW

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 269 of file DinoXmlParser.h.

void ogdf::XmlTagObject::setInvalid ( ) [inline]

Definition at line 259 of file DinoXmlParser.h.

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

Definition at line 280 of file DinoXmlParser.h.

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

Setter.

Definition at line 255 of file DinoXmlParser.h.

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

Getter.

Definition at line 242 of file DinoXmlParser.h.


Member Data Documentation

integer value for the depth in the xml parse tree

Definition at line 180 of file DinoXmlParser.h.

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

Definition at line 184 of file DinoXmlParser.h.

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

Definition at line 161 of file DinoXmlParser.h.

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

Definition at line 142 of file DinoXmlParser.h.

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 156 of file DinoXmlParser.h.

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

Definition at line 136 of file DinoXmlParser.h.

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

Definition at line 147 of file DinoXmlParser.h.

Flag denotes whether attribute is valid or not.

Definition at line 174 of file DinoXmlParser.h.


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