XMLParserCPP
1.1
Toggle main menu visibility
Loading...
Searching...
No Matches
XMLElement.h
1
/*
2
* Copyright (C) 2025 Yury Bobylev <bobilev_yury@mail.ru>
3
*
4
* This program is free software: you can redistribute it and/or modify it
5
* under the terms of the GNU General Public License as published by the Free
6
* Software Foundation, version 3.
7
*
8
* This program is distributed in the hope that it will be useful, but WITHOUT
9
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11
* more details.
12
*
13
* You should have received a copy of the GNU General Public License along with
14
* this program. If not, see <https://www.gnu.org/licenses/>.
15
*/
16
#ifndef XMLELEMENT_H
17
#define XMLELEMENT_H
18
19
#include <XMLElementAttribute.h>
20
#include <string>
21
#include <vector>
22
28
class
XMLElement
29
{
30
public
:
34
XMLElement
();
35
40
XMLElement
(
const
XMLElement
&other);
41
46
XMLElement
(
XMLElement
&&other);
47
53
XMLElement
&
54
operator=
(
const
XMLElement
&other);
55
61
XMLElement
&
62
operator=
(
XMLElement
&&other);
63
67
std::string
element_name
;
68
72
std::vector<XMLElementAttribute>
element_attributes
;
73
77
std::vector<XMLElement>
elements
;
78
82
std::string
content
;
83
87
enum
Type
88
{
92
ProgramControlElement
,
94
CharData
,
96
Comment
,
98
SpecialElement
,
100
OrdinaryElement
,
103
ElementContent
104
};
105
109
Type
element_type
=
Type::OrdinaryElement
;
110
114
enum
Empty
115
{
117
XML
,
119
HTML
,
121
NotEmpty
122
};
123
127
Empty
empty
=
NotEmpty
;
128
};
129
130
#endif
// XMLELEMENT_H
XMLElement::empty
Empty empty
Element emptiness indicator.
Definition
XMLElement.h:127
XMLElement::element_type
Type element_type
XMLElement type.
Definition
XMLElement.h:109
XMLElement::operator=
XMLElement & operator=(XMLElement &&other)
operator =
XMLElement::element_attributes
std::vector< XMLElementAttribute > element_attributes
Vector of XML element attributes.
Definition
XMLElement.h:72
XMLElement::operator=
XMLElement & operator=(const XMLElement &other)
operator =
XMLElement::Empty
Empty
Enumerator for empty elements.
Definition
XMLElement.h:115
XMLElement::NotEmpty
@ NotEmpty
Definition
XMLElement.h:121
XMLElement::HTML
@ HTML
Definition
XMLElement.h:119
XMLElement::XML
@ XML
Definition
XMLElement.h:117
XMLElement::element_name
std::string element_name
XML element name.
Definition
XMLElement.h:67
XMLElement::XMLElement
XMLElement(XMLElement &&other)
XMLElement move constructor.
XMLElement::elements
std::vector< XMLElement > elements
Vector of XML element subelements.
Definition
XMLElement.h:77
XMLElement::XMLElement
XMLElement(const XMLElement &other)
XMLElement copy constructor.
XMLElement::content
std::string content
XML element content if any.
Definition
XMLElement.h:82
XMLElement::Type
Type
XML elements types enumerator.
Definition
XMLElement.h:88
XMLElement::SpecialElement
@ SpecialElement
Definition
XMLElement.h:98
XMLElement::ProgramControlElement
@ ProgramControlElement
Definition
XMLElement.h:92
XMLElement::Comment
@ Comment
Definition
XMLElement.h:96
XMLElement::CharData
@ CharData
Definition
XMLElement.h:94
XMLElement::OrdinaryElement
@ OrdinaryElement
Definition
XMLElement.h:100
XMLElement::ElementContent
@ ElementContent
Definition
XMLElement.h:103
XMLElement::XMLElement
XMLElement()
XMLElement constructor.
XMLElement.h
Generated by
1.17.0