ACF $AcfVersion:0$
CXmlWriteArchiveBase.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5// ACF includes
8
9
10namespace iser
11{
12
13
18{
19public:
21
22 // reimplemented (iser::IArchive)
23 virtual bool IsTagSkippingSupported() const override;
24 virtual bool BeginTag(const CArchiveTag& tag) override;
25 virtual bool BeginMultiTag(const CArchiveTag& tag, const CArchiveTag& subTag, int& count) override;
26 virtual bool EndTag(const CArchiveTag& tag) override;
27 virtual bool Process(QByteArray& value) override;
28 virtual bool Process(QString& value) override;
30
31protected:
32 CXmlWriteArchiveBase(const IVersionInfo* versionInfoPtr, const CArchiveTag& rootTag);
33
34 bool MakeIndent();
35
44
45 // reimplemented (iser::CTextWriteArchiveBase)
46 bool WriteTextNode(const QByteArray& text) override;
47
48 // abstract methods
49 virtual bool WriteString(const QByteArray& value) = 0;
50
51private:
52 CArchiveTag m_rootTag;
53
54 int m_indent;
55
56 bool m_isSeparatorNeeded;
57};
58
59
60} // namespace iser
61
62
63
64
Process tag used to group data in archive stream.
Definition CArchiveTag.h:22
Common archive implementation of text-based storing archives.
virtual bool Process(bool &value) override
Processes (reads or writes) a boolean value.
Base class for all XML implementations for ACF documents.
Base class for XML storing archives.
virtual bool Process(QByteArray &value) override
Process primitive type.
virtual bool IsTagSkippingSupported() const override
Checks if skipping to the end of a tag on EndTag() is supported.
CXmlWriteArchiveBase(const IVersionInfo *versionInfoPtr, const CArchiveTag &rootTag)
bool WriteXmlHeader()
Write XML header.
virtual bool Process(QString &value) override
Process primitive type.
CTextWriteArchiveBase BaseClass
bool WriteTextNode(const QByteArray &text) override
Write single unformatted text node.
virtual bool BeginMultiTag(const CArchiveTag &tag, const CArchiveTag &subTag, int &count) override
Begins a tagged section containing multiple elements of the same type.
virtual bool EndTag(const CArchiveTag &tag) override
Ends a tagged section in the archive.
virtual bool WriteString(const QByteArray &value)=0
bool WriteXmlFooter()
Write XML footer.
virtual bool BeginTag(const CArchiveTag &tag) override
Begins a tagged section in the archive.
Provides access to version information.
Contains general persistence mechanism with basic archives implementations.