Implements the main functionalities of the stdr parser tree. More...
#include <stdr_parser_node.h>
Public Member Functions | |
bool | checkForFilename (std::string base) |
Checks a node if a specific filename exists. | |
std::vector< int > | getTag (std::string tag) |
Searches for a tag in the specific node. | |
void | increasePriority (void) |
Increases the priority of the node. | |
Node (void) | |
Default constructor. | |
void | printParsedXml (Node *n, std::string indent) |
Debug recursive function - Prints the xml tree. | |
void | unallocateChildren (void) |
Unalloates the memory of the node's children. | |
Public Attributes | |
std::vector< Node * > | elements |
File it was into. | |
std::string | file_origin |
Row in the original file. | |
int | file_row |
int | priority |
The node tag (if it not a value node) | |
std::string | tag |
The node value (if it not a tag node) | |
std::string | value |
The node children. |
Implements the main functionalities of the stdr parser tree.
Definition at line 37 of file stdr_parser_node.h.
stdr_parser::Node::Node | ( | void | ) |
bool stdr_parser::Node::checkForFilename | ( | std::string | base | ) |
Checks a node if a specific filename exists.
Definition at line 39 of file stdr_parser_node.cpp.
std::vector< int > stdr_parser::Node::getTag | ( | std::string | tag | ) |
Searches for a tag in the specific node.
tag | [std::string] The tag to search for |
Definition at line 56 of file stdr_parser_node.cpp.
void stdr_parser::Node::increasePriority | ( | void | ) |
Increases the priority of the node.
Definition at line 73 of file stdr_parser_node.cpp.
void stdr_parser::Node::printParsedXml | ( | Node * | n, |
std::string | indent | ||
) |
Debug recursive function - Prints the xml tree.
n | [Node*] The stdr xml tree node to begin |
indent | [std::string] The indentation for the specific node |
Definition at line 88 of file stdr_parser_node.cpp.
void stdr_parser::Node::unallocateChildren | ( | void | ) |
Unalloates the memory of the node's children.
Definition at line 110 of file stdr_parser_node.cpp.
std::vector<Node*> stdr_parser::Node::elements |
File it was into.
Definition at line 79 of file stdr_parser_node.h.
std::string stdr_parser::Node::file_origin |
Row in the original file.
Definition at line 82 of file stdr_parser_node.h.
Definition at line 83 of file stdr_parser_node.h.
The node tag (if it not a value node)
Definition at line 71 of file stdr_parser_node.h.
std::string stdr_parser::Node::tag |
The node value (if it not a tag node)
Definition at line 73 of file stdr_parser_node.h.
std::string stdr_parser::Node::value |
The node children.
Definition at line 76 of file stdr_parser_node.h.