LibUDB
1.0.1
Toggle main menu visibility
Loading...
Searching...
No Matches
UDBElement.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 UDBELEMENT_H
17
#define UDBELEMENT_H
18
19
#include <string>
20
#include <vector>
21
27
class
UDBElement
28
{
29
public
:
30
UDBElement();
31
37
UDBElement
(
const
UDBElement &other);
38
44
UDBElement
(UDBElement &&other);
45
51
UDBElement &
52
operator=
(
const
UDBElement &other);
53
59
UDBElement &
60
operator=
(UDBElement &&other);
61
68
bool
69
operator==
(
const
UDBElement &other)
const
;
70
77
bool
78
operator!=
(
const
UDBElement &other)
const
;
79
84
void
85
writeToBuffer
(std::vector<char> &buf);
86
96
size_t
97
readFromBuffer
(
const
std::vector<char> &buf,
const
size_t
&start_pos);
98
103
size_t
104
calculateWriteSize
();
105
109
void
110
shrinkToFit
();
111
115
std::string
id
;
116
120
std::string
content
;
121
125
std::vector<UDBElement>
subelements
;
126
};
127
128
#endif
// UDBELEMENT_H
UDBElement::operator=
UDBElement & operator=(const UDBElement &other)
operator =
UDBElement::id
std::string id
Elements identification value (if any).
Definition
UDBElement.h:115
UDBElement::UDBElement
UDBElement(UDBElement &&other)
UDBElement::subelements
std::vector< UDBElement > subelements
Elements subelement (if any).
Definition
UDBElement.h:125
UDBElement::calculateWriteSize
size_t calculateWriteSize()
UDBElement::operator!=
bool operator!=(const UDBElement &other) const
operator !=
UDBElement::writeToBuffer
void writeToBuffer(std::vector< char > &buf)
UDBElement::UDBElement
UDBElement(const UDBElement &other)
UDBElement::operator==
bool operator==(const UDBElement &other) const
operator ==
UDBElement::shrinkToFit
void shrinkToFit()
UDBElement::content
std::string content
Elements content (if any).
Definition
UDBElement.h:120
UDBElement::operator=
UDBElement & operator=(UDBElement &&other)
operator =
UDBElement::readFromBuffer
size_t readFromBuffer(const std::vector< char > &buf, const size_t &start_pos)
UDBElement.h
Generated by
1.17.0