|
Krita Source Code Documentation
|
#include <KoResourceCacheStorage.h>
Inheritance diagram for KoResourceCacheStorage:Classes | |
| struct | Private |
Public Member Functions | |
| QVariant | fetch (const QString &key) const override |
fetch a cached object from the cache using key | |
| KoResourceCacheStorage () | |
| void | put (const QString &key, const QVariant &value) override |
| ~KoResourceCacheStorage () | |
Public Member Functions inherited from KoResourceCacheInterface | |
| RelatedResourceCookie | relatedResourceCookie () const |
| void | setRelatedResourceCookie (RelatedResourceCookie cookie) |
| virtual | ~KoResourceCacheInterface () |
Private Attributes | |
| const QScopedPointer< Private > | m_d |
Additional Inherited Members | |
Public Types inherited from KoResourceCacheInterface | |
| using | RelatedResourceCookie = std::uintptr_t |
A trivial implementation of KoResourceCacheInterface that just stores cached values.
Definition at line 17 of file KoResourceCacheStorage.h.
| KoResourceCacheStorage::KoResourceCacheStorage | ( | ) |
Definition at line 20 of file KoResourceCacheStorage.cpp.
| KoResourceCacheStorage::~KoResourceCacheStorage | ( | ) |
Definition at line 25 of file KoResourceCacheStorage.cpp.
|
overridevirtual |
fetch a cached object from the cache using key
Implements KoResourceCacheInterface.
Definition at line 29 of file KoResourceCacheStorage.cpp.
References m_d.
|
overridevirtual |
store a cached object value into the cache using key WARNING: storing an object twice with the same key is considered as invalid operation and will assert! This behavior is intentional to avoid cache key aliasing.
This assert here is intentional! It catches cache key aliasing problems. See dox in KoResourceCacheInterface
Implements KoResourceCacheInterface.
Definition at line 34 of file KoResourceCacheStorage.cpp.
References KIS_SAFE_ASSERT_RECOVER_NOOP, m_d, and value().
|
private |
Definition at line 28 of file KoResourceCacheStorage.h.