#include <InputNode.h>
Inheritance diagram for InputNode:
Public Member Functions | |
InputNode () | |
InputNode (QDomElement domElement_h) | |
~InputNode () | |
bool | setWorkingFile (std::string filename_h) |
Load the file on memory. Return false if no success. | |
int | getIntContent () |
Get the content between its tagName as integer. | |
double | getDoubleContent () |
Get the content between its tagName as double. | |
string | getStringContent () |
Get the content between its tagName as std::string. | |
bool | getBoolContent () |
Get the content between its tagName as bool. | |
int | getIntAttributeByName (string attributeName_h) |
Get an attribute by name as integer. | |
double | getDoubleAttributeByName (string attributeName_h) |
Get an attribute by name as double. | |
string | getStringAttributeByName (string attributeName_h) |
Get an attribute by name as string. | |
bool | hasAttributeByName (string attributeName_h) |
Check if an attribute with a certain name exist. | |
InputNode | getNodeByName (string nodeName_h, int debugLevel=MSG_CRITICAL_ERROR, bool childFlag=false) |
return 0-or-1 nodes by name. | |
vector< InputNode > | getNodesByName (string nodeName_h, int debugLevel=MSG_WARNING, bool childFlag=false) |
vector< InputNode > | getChildNodes () |
Retrieve all child nodes with gived name and optionally with gived attribute or gived pair attribute/value. It raises an error if more than one. Filtered to return only child Elements. | |
bool | hasChildNode (string name_h) |
True if it has specified child node. | |
int | getChildNodesCount () |
Only Elements. | |
string | getNodeName () |
Private Attributes | |
QDomElement | domElement |
The underlying library-depending DOM rappresentation of the element. |
A small wrapper class using an underlying library (currently QtXml) to read DOM nodes.
This class works with the individual nodes (DOM Elements), while the companion class InputDocument wrapper the whole document (DOM Document).
Note: In the DOM terminology "Elements" are a subset of the more general "nodes" (that include comments and other typologies..)
Definition at line 49 of file InputNode.h.
InputNode | ( | ) |
Definition at line 27 of file InputNode.cpp.
InputNode | ( | QDomElement | domElement_h | ) | [inline] |
Definition at line 53 of file InputNode.h.
~InputNode | ( | ) |
Definition at line 30 of file InputNode.cpp.
bool setWorkingFile | ( | std::string | filename_h | ) |
Load the file on memory. Return false if no success.
Definition at line 34 of file InputNode.cpp.
Referenced by Gis::initLayers(), and RegData::loadInput().
Here is the caller graph for this function:
int getIntContent | ( | ) |
double getDoubleContent | ( | ) |
std::string getStringContent | ( | ) |
bool getBoolContent | ( | ) |
int getIntAttributeByName | ( | string | attributeName_h | ) |
double getDoubleAttributeByName | ( | string | attributeName_h | ) |
string getStringAttributeByName | ( | string | attributeName_h | ) |
bool hasAttributeByName | ( | string | attributeName_h | ) |
InputNode getNodeByName | ( | string | nodeName_h, | |
int | debugLevel = MSG_CRITICAL_ERROR , |
|||
bool | childFlag = false | |||
) |
vector< InputNode > getNodesByName | ( | string | nodeName_h, | |
int | debugLevel = MSG_WARNING , |
|||
bool | childFlag = false | |||
) |
return 0-to-n nodes by name
Definition at line 152 of file InputNode.cpp.
Referenced by getNodeByName(), Gis::initLayers(), and RegData::loadInput().
Here is the caller graph for this function:
vector< InputNode > getChildNodes | ( | ) |
Retrieve all child nodes with gived name and optionally with gived attribute or gived pair attribute/value. It raises an error if more than one. Filtered to return only child Elements.
Definition at line 232 of file InputNode.cpp.
bool hasChildNode | ( | string | name_h | ) |
int getChildNodesCount | ( | ) |
string getNodeName | ( | ) |
Definition at line 269 of file InputNode.cpp.
QDomElement domElement [private] |
The underlying library-depending DOM rappresentation of the element.
Definition at line 78 of file InputNode.h.
Referenced by getBoolContent(), getChildNodes(), getChildNodesCount(), getDoubleAttributeByName(), getDoubleContent(), getIntAttributeByName(), getIntContent(), getNodeName(), getNodesByName(), getStringAttributeByName(), getStringContent(), hasAttributeByName(), hasChildNode(), InputNode(), and setWorkingFile().