Public Member Functions | Public Attributes | Private Member Functions | List of all members
stdr_parser::Node Class Reference

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. More...
 
std::vector< int > getTag (std::string tag)
 Searches for a tag in the specific node. More...
 
void increasePriority (void)
 Increases the priority of the node. More...
 
 Node (void)
 Default constructor. More...
 
void printParsedXml (Node *n, std::string indent)
 Debug recursive function - Prints the xml tree. More...
 
 ~Node (void)
 Destructor who also destroys all its children. More...
 

Public Attributes

std::vector< Node * > elements
 File it was into. More...
 
std::string file_origin
 Row in the original file. More...
 
int file_row
 
int priority
 The node tag (if it not a value node) More...
 
std::string tag
 The node value (if it not a tag node) More...
 
std::string value
 The node children. More...
 

Private Member Functions

void unallocateChildren (void)
 Unalloates the memory of the node's children. More...
 

Detailed Description

Implements the main functionalities of the stdr parser tree.

Definition at line 37 of file stdr_parser_node.h.

Constructor & Destructor Documentation

stdr_parser::Node::Node ( void  )

Default constructor.

Returns
void

Definition at line 30 of file stdr_parser_node.cpp.

stdr_parser::Node::~Node ( void  )

Destructor who also destroys all its children.

Returns
void

Definition at line 35 of file stdr_parser_node.cpp.

Member Function Documentation

bool stdr_parser::Node::checkForFilename ( std::string  base)

Checks a node if a specific filename exists.

Returns
void

Definition at line 44 of file stdr_parser_node.cpp.

std::vector< int > stdr_parser::Node::getTag ( std::string  tag)

Searches for a tag in the specific node.

Parameters
tag[std::string] The tag to search for
Returns
std::vector<int> : The indexes in elements where tag is found

Definition at line 61 of file stdr_parser_node.cpp.

void stdr_parser::Node::increasePriority ( void  )

Increases the priority of the node.

Returns
voidThe node priority. Used in merging. Basically works inversely. Nodes in lower priority overwrite the ones in higher priority
void

Definition at line 78 of file stdr_parser_node.cpp.

void stdr_parser::Node::printParsedXml ( Node n,
std::string  indent 
)

Debug recursive function - Prints the xml tree.

Parameters
n[Node*] The stdr xml tree node to begin
indent[std::string] The indentation for the specific node
Returns
void

Definition at line 93 of file stdr_parser_node.cpp.

void stdr_parser::Node::unallocateChildren ( void  )
private

Unalloates the memory of the node's children.

Unallocates the memory of the node's children.

Returns
void

Definition at line 115 of file stdr_parser_node.cpp.

Member Data Documentation

std::vector<Node*> stdr_parser::Node::elements

File it was into.

Definition at line 89 of file stdr_parser_node.h.

std::string stdr_parser::Node::file_origin

Row in the original file.

Definition at line 92 of file stdr_parser_node.h.

int stdr_parser::Node::file_row

Definition at line 95 of file stdr_parser_node.h.

int stdr_parser::Node::priority

The node tag (if it not a value node)

Definition at line 81 of file stdr_parser_node.h.

std::string stdr_parser::Node::tag

The node value (if it not a tag node)

Definition at line 84 of file stdr_parser_node.h.

std::string stdr_parser::Node::value

The node children.

Definition at line 86 of file stdr_parser_node.h.


The documentation for this class was generated from the following files:


stdr_parser
Author(s): Manos Tsardoulias, Chris Zalidis, Aris Thallas
autogenerated on Mon Jun 10 2019 15:14:54