Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_meta_data_store.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2007 Cyrille Berger <cberger@cberger.net>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-or-later
5 */
6
7
8#ifndef _KIS_META_DATA_STORE_H_
9#define _KIS_META_DATA_STORE_H_
10
11#include <kritametadata_export.h>
12
13#include <QHash>
14
15namespace KisMetaData
16{
17class Schema;
18class Entry;
19class Filter;
20class Value;
21
26class KRITAMETADATA_EXPORT Store
27{
28 struct Private;
29public:
30 Store();
31 Store(const Store&);
32 ~Store();
33public:
34
38 void copyFrom(const Store* store);
39
43 bool empty() const;
44 bool isEmpty() const;
45
46
56 bool addEntry(const Entry& entry);
57
62 Entry& getEntry(const QString & entryKey);
63
69 Entry& getEntry(const QString & uri, const QString & entryName);
70
76 Entry& getEntry(const KisMetaData::Schema* schema, const QString & entryName);
77
82 const Entry& getEntry(const QString & entryKey) const;
88 const Entry& getEntry(const QString & uri, const QString & entryName) const;
89
95 const Entry& getEntry(const KisMetaData::Schema* schema, const QString & entryName) const;
96
101 void removeEntry(const QString & entryKey);
102
108 void removeEntry(const QString & uri, const QString & entryName);
109
115 void removeEntry(const KisMetaData::Schema* schema, const QString & entryName);
116
123 const Value& getValue(const QString & uri, const QString & entryName) const;
124
125 QHash<QString, Entry>::const_iterator begin() const;
126 QHash<QString, Entry>::const_iterator end() const;
127
132 bool containsEntry(const QString & entryKey) const;
133
137 bool containsEntry(const KisMetaData::Schema* schema, const QString & entryName) const;
138
144 bool containsEntry(const QString & uri, const QString & entryName) const;
145
149 void debugDump() const;
150
154 void applyFilters(const QList<const Filter*> & filters);
155
159 QList<QString> keys() const;
160
165private:
166 Private* const d;
167};
168}
169
170#endif
QList< Entry > entries() const
Store(const Store &)