Krita Source Code Documentation
Loading...
Searching...
No Matches
KisLazySharedCacheStorage.h File Reference
#include <type_traits>
#include <functional>
#include <utility>
#include <QMutex>
#include <QAtomicPointer>
#include <QSharedPointer>
#include <QSharedDataPointer>
#include <QExplicitlySharedDataPointer>

Go to the source code of this file.

Classes

struct  KisLazySharedCacheStorageDetail::DataStorage< StorageType, T, Args >
 
struct  KisLazySharedCacheStorageDetail::DataWrapperShared< T, Args >
 
class  KisLazySharedCacheStorageBase< DataWrapper, T, Args >
 
struct  KisLazySharedCacheStorageDetail::DataWrapperShared< T, Args >::SharedStorage
 

Namespaces

namespace  KisLazySharedCacheStorageDetail
 

Typedefs

template<typename T , typename... Args>
using KisLazySharedCacheStorageDetail::DataWrapperLocal = DataStorage<QSharedPointer<T>, T, Args...>
 
template<typename T , typename... Args>
using KisLazySharedCacheStorage
 
template<typename T , typename... Args>
using KisLazySharedCacheStorageLinked
 

Typedef Documentation

◆ KisLazySharedCacheStorage

template<typename T , typename... Args>
using KisLazySharedCacheStorage
Initial value:

KisLazySharedCacheStorage is a special class that allows two classes lazily share an existing cache data. That is, after the class has been cloned via a copy constructor it keeps a pointer to the cached data of the source object. This link is kept until one of the objects calls cache.reset(), then the cached data is detached.

Take it into account that KisLazySharedCacheStorage will keep a link only in case the cache existed at the moment of cloning. That is the main difference to KisLazySharedCacheStorageLinked.

The class guarantees full tread-safety of the access and detach of the cache object.

Definition at line 189 of file KisLazySharedCacheStorage.h.

◆ KisLazySharedCacheStorageLinked

template<typename T , typename... Args>
using KisLazySharedCacheStorageLinked
Initial value:

KisLazySharedCacheStorageLinked is a special class that allows two classes lazily share a cache object. The two classes will not only share cache data, but also the cache object itself. That is, when one of the objects updates the cache data, this data will also be uploaded into the cache of the other object. The link between the two objects is kept until one of the objects calls cache.reset().

The class guarantees full tread-safety of the access and detach of the cache object.

Definition at line 205 of file KisLazySharedCacheStorage.h.