Krita Source Code Documentation
Loading...
Searching...
No Matches
KoResourceCachePrefixedStorageWrapper.cpp
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 */
7
8#include <QVariant>
9
10
12 : m_prefix(prefix),
13 m_baseInterface(baseInterface)
14{
15}
16
17QVariant KoResourceCachePrefixedStorageWrapper::fetch(const QString &key) const
18{
19 return m_baseInterface->fetch(m_prefix + key);
20}
21
22void KoResourceCachePrefixedStorageWrapper::put(const QString &key, const QVariant &value)
23{
24 m_baseInterface->put(m_prefix + key, value);
25}
float value(const T *src, size_t ch)
void put(const QString &key, const QVariant &value) override
KoResourceCachePrefixedStorageWrapper(const QString &prefix, KoResourceCacheInterfaceSP baseInterface)
QVariant fetch(const QString &key) const override
fetch a cached object from the cache using key