Kage Studio 0.7.230612
A Simple Free and Open Source 2D Animation Software
Loading...
Searching...
No Matches
xmltag.h
Go to the documentation of this file.
1/*
2 * xmltag.h
3 *
4 * Copyright 2019 Mj Mendoza IV <mj.mendoza.iv@gmail.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 * MA 02110-1301, USA.
20 *
21 *
22 */
23
24#ifndef KAGE_UTIL_XMLTAG_H
25 #define KAGE_UTIL_XMLTAG_H
26
27 #include <vector>
28 #include <string>
29 #include <sstream>
30 #include "xmltagproperty.h"
31 using namespace std;
32
33 class XmlTag {
34 public:
35 XmlTag();
36 XmlTag(string p_name);
37 XmlTag(string p_name, vector<XmlTagProperty> p_xmlTagProperties);
38 virtual ~XmlTag();
39
40 void setName(string p_name);
41 string getName();
42 void setProperties(vector<XmlTagProperty> p_xmlTagProperties);
43 vector<XmlTagProperty> getProperties();
44 unsigned int addChild(XmlTag p_xmlTag);
45 XmlTag getChild(unsigned int p_index);
46
47 XmlTag clone();
48 std::string toString();
49 void copy(XmlTag p_xmlTag);
50 bool equalTo(XmlTag p_xmlTag);
51 vector<XmlTag> _children;
52 string _value; // <tag>values</tag>
53 protected:
54 string _name;
55 vector<XmlTagProperty> _xmlTagProperties;
56 };
57#endif //KAGE_UTIL_XMLTAG_H
Definition: xmltag.h:33
vector< XmlTagProperty > getProperties()
Definition: xmltag.cpp:103
vector< XmlTag > _children
Definition: xmltag.h:51
XmlTag getChild(unsigned int p_index)
Definition: xmltag.cpp:119
string getName()
Definition: xmltag.cpp:99
void copy(XmlTag p_xmlTag)
Definition: xmltag.cpp:67
unsigned int addChild(XmlTag p_xmlTag)
Definition: xmltag.cpp:114
string _name
Definition: xmltag.h:54
XmlTag()
Definition: xmltag.cpp:26
void setName(string p_name)
Definition: xmltag.cpp:88
virtual ~XmlTag()
Definition: xmltag.cpp:41
string _value
Definition: xmltag.h:52
vector< XmlTagProperty > _xmlTagProperties
Definition: xmltag.h:55
std::string toString()
Definition: xmltag.cpp:72
bool equalTo(XmlTag p_xmlTag)
Definition: xmltag.cpp:50
void setProperties(vector< XmlTagProperty > p_xmlTagProperties)
Definition: xmltag.cpp:92
XmlTag clone()
Definition: xmltag.cpp:45