Kage Studio 0.7.240121
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-2024 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
32 class XmlTag {
33 public:
34 XmlTag();
35 XmlTag(std::string p_name);
36 XmlTag(std::string p_name, std::vector<XmlTagProperty> p_xmlTagProperties);
37 virtual ~XmlTag();
38
39 void setName(std::string p_name);
40 std::string getName();
41 void setProperties(std::vector<XmlTagProperty> p_xmlTagProperties);
42 std::vector<XmlTagProperty> getProperties();
43 unsigned int addChild(XmlTag p_xmlTag);
44 XmlTag getChild(unsigned int p_index);
45
46 XmlTag clone();
47 std::string toString();
48 void copy(XmlTag p_xmlTag);
49 bool equalTo(XmlTag p_xmlTag);
50 std::vector<XmlTag> _children;
51 std::string _value; // <tag>values</tag>
52 protected:
53 std::string _name;
54 std::vector<XmlTagProperty> _xmlTagProperties;
55 };
56#endif //KAGE_UTIL_XMLTAG_H
XmlTag getChild(unsigned int p_index)
Definition xmltag.cpp:119
void copy(XmlTag p_xmlTag)
Definition xmltag.cpp:67
void setProperties(std::vector< XmlTagProperty > p_xmlTagProperties)
Definition xmltag.cpp:92
unsigned int addChild(XmlTag p_xmlTag)
Definition xmltag.cpp:114
std::vector< XmlTag > _children
Definition xmltag.h:50
std::string getName()
Definition xmltag.cpp:99
std::string _name
Definition xmltag.h:53
XmlTag()
Definition xmltag.cpp:26
void setName(std::string p_name)
Definition xmltag.cpp:88
std::vector< XmlTagProperty > _xmlTagProperties
Definition xmltag.h:54
std::string _value
Definition xmltag.h:51
virtual ~XmlTag()
Definition xmltag.cpp:41
std::string toString()
Definition xmltag.cpp:72
bool equalTo(XmlTag p_xmlTag)
Definition xmltag.cpp:50
XmlTag clone()
Definition xmltag.cpp:45
std::vector< XmlTagProperty > getProperties()
Definition xmltag.cpp:103