stdr_parser_node.h
Go to the documentation of this file.
1 /******************************************************************************
2  STDR Simulator - Simple Two DImensional Robot Simulator
3  Copyright (C) 2013 STDR Simulator
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 3 of the License, or
7  (at your option) any later version.
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12  You should have received a copy of the GNU General Public License
13  along with this program; if not, write to the Free Software Foundation,
14  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 
16  Authors :
17  * Manos Tsardoulias, etsardou@gmail.com
18  * Aris Thallas, aris.thallas@gmail.com
19  * Chris Zalidis, zalidis@gmail.com
20 ******************************************************************************/
21 
22 #ifndef STDR_PARSER_NODE
23 #define STDR_PARSER_NODE
24 
26 
31 namespace stdr_parser
32 {
37  class Node
38  {
39  private:
40 
45  void unallocateChildren(void);
46 
47  public:
48 
53  Node(void);
54 
59  ~Node(void);
60 
65  bool checkForFilename(std::string base);
66 
72  std::vector<int> getTag(std::string tag);
73 
78  void increasePriority(void);
79 
81  int priority;
82 
84  std::string tag;
86  std::string value;
87 
89  std::vector<Node*> elements;
90 
92  std::string file_origin;
93 
95  int file_row;
96 
103  void printParsedXml(Node *n,std::string indent);
104 
105  };
106 
107 }
108 #endif
std::string tag
The node value (if it not a tag node)
void increasePriority(void)
Increases the priority of the node.
std::vector< int > getTag(std::string tag)
Searches for a tag in the specific node.
The main namespace for STDR GUI XML parser.
std::string value
The node children.
Node(void)
Default constructor.
bool checkForFilename(std::string base)
Checks a node if a specific filename exists.
void printParsedXml(Node *n, std::string indent)
Debug recursive function - Prints the xml tree.
void unallocateChildren(void)
Unalloates the memory of the node&#39;s children.
int priority
The node tag (if it not a value node)
Implements the main functionalities of the stdr parser tree.
std::string file_origin
Row in the original file.
std::vector< Node * > elements
File it was into.
~Node(void)
Destructor who also destroys all its children.


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