ICF 3.1.1.10
Technical documentation of ICF Libraries
CSettingsWriteArchive.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#pragma once
7
8
9// ICF includes
12
13
14namespace ifile
15{
16
17
22{
23public:
26
37 const QString& organizationName,
38 const QString& applicationName,
39 const QString& rootKey,
40 QSettings::Scope settingsScope = QSettings::UserScope,
41 const iser::IVersionInfo* versionInfoPtr = nullptr);
42
43 // reimplemented (iser::IArchive)
45 const iser::CArchiveTag& listTag,
46 const iser::CArchiveTag& subTag,
47 int count,
48 std::function<bool(int, iser::IArchive&)> iterArchiveFn,
49 std::function<bool(int)> resizeFn = nullptr) override;
51 const iser::CArchiveTag& listTag,
52 const iser::CArchiveTag& groupTag,
53 int count,
54 std::function<bool(int, iser::IArchive&)> groupArchiveFn,
55 std::function<bool(int)> resizeFn = nullptr) override;
57 bool ProcessLeaf(const iser::CArchiveTag& tag, QString& value) override;
58
59protected:
60 // reimplemented (iser::CTextWriteArchiveBase)
61 bool WriteTextNode(const QByteArray& text);
62 virtual bool BeginTag(const iser::CArchiveTag& tag);
63 virtual bool BeginMultiTag(const iser::CArchiveTag& tag, const iser::CArchiveTag& subTag, int& count);
64 virtual bool EndTag(const iser::CArchiveTag& tag);
65};
66
67
68} // namespace ifile
69
70
Basic implementation for an archive used Qt settings implementation as persistence medium.
Write archive implementation for serialization based on QSettings.
bool ProcessLeaf(const iser::CArchiveTag &tag, QString &value) override
Process primitive type.
iser::CTextWriteArchiveBase BaseClass
bool ProcessGroupList(const iser::CArchiveTag &listTag, const iser::CArchiveTag &groupTag, int count, std::function< bool(int, iser::IArchive &)> groupArchiveFn, std::function< bool(int)> resizeFn=nullptr) override
Process list of elements in groups.
CSettingsWriteArchive(const QString &organizationName, const QString &applicationName, const QString &rootKey, QSettings::Scope settingsScope=QSettings::UserScope, const iser::IVersionInfo *versionInfoPtr=nullptr)
Constructor.
virtual bool EndTag(const iser::CArchiveTag &tag)
End of archive tag.
ifile::CSettingsArchiveBase BaseClass2
virtual bool BeginTag(const iser::CArchiveTag &tag)
Begin of archive tag.
virtual bool BeginMultiTag(const iser::CArchiveTag &tag, const iser::CArchiveTag &subTag, int &count)
bool ProcessAnyList(const iser::CArchiveTag &listTag, const iser::CArchiveTag &subTag, int count, std::function< bool(int, iser::IArchive &)> iterArchiveFn, std::function< bool(int)> resizeFn=nullptr) override
Process some list of elements.
bool WriteTextNode(const QByteArray &text)
Write single unformatted text node.
Process tag used to group data in archive stream.
Definition CArchiveTag.h:25
Common archive implementation of text-based storing archives.
bool ProcessLeaf(const CArchiveTag &tag, bool &value) override
Process primitive type.
Represent input/output persistence archive.
Definition IArchive.h:34
Provides access to version information.
Contains interfaces and implementations of file system related components.

© Witold Gantzke and Kirill Lepskiy