This struct represents a node in the XML parse tree. More...
#include <ogdf/fileformats/XmlParser.h>
Public Member Functions | |
| XmlTagObject (HashedString *name) | |
| Constructor. More... | |
| ~XmlTagObject () | |
| Destructor; will be performed in destroyParseTree(). More... | |
| bool | findSonXmlTagObjectByName (const string &sonsName, XmlTagObject *&son) const |
| Searches for a son with tag name sonsName. More... | |
| bool | findSonXmlTagObjectByName (const string &sonsName, List< XmlTagObject *> &sons) const |
| Searches for sons with tag name sonsName. More... | |
| bool | findXmlAttributeObjectByName (const string &attName, XmlAttributeObject *&attribute) const |
| Searches for an attribute with name name. More... | |
| const int & | getDepth () const |
| const int & | getLine () const |
| const string & | getName () const |
| const string & | getValue () const |
| bool | hasMoreSonXmlTagObject (const List< string > &sonNamesToIgnore) const |
| Searches for sons of father which names are inequal to those in list sonsNames. More... | |
| bool | isAttributeLess () const |
| Checks if currentTag owns at least one attribute. More... | |
| bool | isLeaf () const |
| Checks if currentNode is leaf in the parse tree. More... | |
| void | setDepth (int newDepth) |
| void | setInvalid () |
| void | setLine (int line) |
| void | setValid () const |
| Setter. More... | |
| const bool & | valid () const |
| Getter. More... | |
Public Attributes | |
| int | m_depth |
| integer value for the depth in the xml parse tree More... | |
| int | m_line |
| integer value that stores the line number of the tag in the parsed xml document More... | |
| XmlTagObject * | m_pBrother |
| Contains the pointer to a brother tag object or 0 if this object is the only child. More... | |
| XmlAttributeObject * | m_pFirstAttribute |
| Pointer to the first attribute; if there is more than one attribute these are linked by m_pNextAttribute in struct XmlAttributeObject. More... | |
| XmlTagObject * | m_pFirstSon |
| Contains the pointer to the first son tag object, i.e. More... | |
| HashedString * | m_pTagName |
| The identifier of the tag, i.e. More... | |
| HashedString * | m_pTagValue |
| Contains the characters inbetween the start tag and the end tag, i.e. More... | |
| bool | m_valid |
| Flag denotes whether attribute is valid or not. More... | |
This struct represents a node in the XML parse tree.
Definition at line 104 of file XmlParser.h.
|
inline |
Constructor.
Definition at line 137 of file XmlParser.h.
|
inline |
Destructor; will be performed in destroyParseTree().
Definition at line 147 of file XmlParser.h.
| 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 nullptr.
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 nullptr.
NEW
| bool ogdf::XmlTagObject::findXmlAttributeObjectByName | ( | const string & | attName, |
| XmlAttributeObject *& | attribute | ||
| ) | const |
Searches for an attribute with name name.
NEW
|
inline |
Definition at line 238 of file XmlParser.h.
|
inline |
Definition at line 249 of file XmlParser.h.
|
inline |
Definition at line 220 of file XmlParser.h.
|
inline |
Definition at line 224 of file XmlParser.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
|
inline |
Definition at line 243 of file XmlParser.h.
|
inline |
Definition at line 233 of file XmlParser.h.
|
inline |
Definition at line 254 of file XmlParser.h.
|
inline |
Setter.
Definition at line 229 of file XmlParser.h.
|
inline |
Getter.
Definition at line 216 of file XmlParser.h.
| int ogdf::XmlTagObject::m_depth |
integer value for the depth in the xml parse tree
Definition at line 153 of file XmlParser.h.
| int ogdf::XmlTagObject::m_line |
integer value that stores the line number of the tag in the parsed xml document
Definition at line 157 of file XmlParser.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 134 of file XmlParser.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 115 of file XmlParser.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 129 of file XmlParser.h.
| HashedString* ogdf::XmlTagObject::m_pTagName |
The identifier of the tag, i.e.
for the identifier is "A"
Definition at line 109 of file XmlParser.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 120 of file XmlParser.h.
|
mutable |
Flag denotes whether attribute is valid or not.
Definition at line 147 of file XmlParser.h.