Krita Source Code Documentation
Loading...
Searching...
No Matches
KoResourceCachePrefixedStorageWrapper.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2021 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6#ifndef KORESOURCECACHEPREFIXEDSTORAGEWRAPPER_H
7#define KORESOURCECACHEPREFIXEDSTORAGEWRAPPER_H
8
10#include <QString>
11
22{
23public:
24 KoResourceCachePrefixedStorageWrapper(const QString &prefix, KoResourceCacheInterfaceSP baseInterface);
25
26 QVariant fetch(const QString &key) const override;
27 void put(const QString &key, const QVariant &value) override;
28
29private:
30 QString m_prefix;
32
33};
34
35#endif // KORESOURCECACHEPREFIXEDSTORAGEWRAPPER_H
float value(const T *src, size_t ch)
a provider-like interface class for sharing caches between multiple resources
virtual QVariant fetch(const QString &key) const =0
fetch a cached object from the cache using key
virtual void put(const QString &key, const QVariant &value)=0