Krita Source Code Documentation
Loading...
Searching...
No Matches
KisLazySharedCacheStorageBase< DataWrapper, T, Args > Class Template Reference

#include <KisLazySharedCacheStorage.h>

Public Types

using ConstType = std::add_const_t<T>
 
using FactoryType = T*(Args...)
 

Public Member Functions

void initialize (Args... args)
 
bool isNull () const
 
 KisLazySharedCacheStorageBase ()
 
 KisLazySharedCacheStorageBase (const KisLazySharedCacheStorageBase &rhs)
 
 KisLazySharedCacheStorageBase (std::function< FactoryType > factory)
 
void reset ()
 
void setFactory (std::function< FactoryType > factory)
 
ConstTypevalue (Args... args)
 

Private Attributes

QAtomicPointer< ConstTypem_cachedValue
 
DataWrapper m_dataWrapper
 
std::function< FactoryTypem_factory
 
QMutex m_mutex
 

Detailed Description

template<typename DataWrapper, typename T, typename... Args>
class KisLazySharedCacheStorageBase< DataWrapper, T, Args >

Definition at line 113 of file KisLazySharedCacheStorage.h.

Member Typedef Documentation

◆ ConstType

template<typename DataWrapper , typename T , typename... Args>
using KisLazySharedCacheStorageBase< DataWrapper, T, Args >::ConstType = std::add_const_t<T>

Definition at line 116 of file KisLazySharedCacheStorage.h.

◆ FactoryType

template<typename DataWrapper , typename T , typename... Args>
using KisLazySharedCacheStorageBase< DataWrapper, T, Args >::FactoryType = T*(Args...)

Definition at line 117 of file KisLazySharedCacheStorage.h.

Constructor & Destructor Documentation

◆ KisLazySharedCacheStorageBase() [1/3]

template<typename DataWrapper , typename T , typename... Args>
KisLazySharedCacheStorageBase< DataWrapper, T, Args >::KisLazySharedCacheStorageBase ( )
inline

Definition at line 120 of file KisLazySharedCacheStorage.h.

121 {
122 }

◆ KisLazySharedCacheStorageBase() [2/3]

template<typename DataWrapper , typename T , typename... Args>
KisLazySharedCacheStorageBase< DataWrapper, T, Args >::KisLazySharedCacheStorageBase ( std::function< FactoryType > factory)
inline

Definition at line 124 of file KisLazySharedCacheStorage.h.

125 : m_factory(factory)
126 {
127 }
std::function< FactoryType > m_factory

◆ KisLazySharedCacheStorageBase() [3/3]

Member Function Documentation

◆ initialize()

template<typename DataWrapper , typename T , typename... Args>
void KisLazySharedCacheStorageBase< DataWrapper, T, Args >::initialize ( Args... args)
inline

Definition at line 157 of file KisLazySharedCacheStorage.h.

157 {
158 (void) value(args...);
159 }
typedef void(QOPENGLF_APIENTRYP PFNGLINVALIDATEBUFFERDATAPROC)(GLuint buffer)

References KisLazySharedCacheStorageBase< DataWrapper, T, Args >::value(), and void().

◆ isNull()

template<typename DataWrapper , typename T , typename... Args>
bool KisLazySharedCacheStorageBase< DataWrapper, T, Args >::isNull ( ) const
inline

◆ reset()

template<typename DataWrapper , typename T , typename... Args>
void KisLazySharedCacheStorageBase< DataWrapper, T, Args >::reset ( )
inline

◆ setFactory()

template<typename DataWrapper , typename T , typename... Args>
void KisLazySharedCacheStorageBase< DataWrapper, T, Args >::setFactory ( std::function< FactoryType > factory)
inline

Definition at line 136 of file KisLazySharedCacheStorage.h.

136 {
137 m_factory = factory;
138 }

References KisLazySharedCacheStorageBase< DataWrapper, T, Args >::m_factory.

◆ value()

template<typename DataWrapper , typename T , typename... Args>
ConstType * KisLazySharedCacheStorageBase< DataWrapper, T, Args >::value ( Args... args)
inline

Member Data Documentation

◆ m_cachedValue

template<typename DataWrapper , typename T , typename... Args>
QAtomicPointer<ConstType> KisLazySharedCacheStorageBase< DataWrapper, T, Args >::m_cachedValue
private

Definition at line 170 of file KisLazySharedCacheStorage.h.

◆ m_dataWrapper

template<typename DataWrapper , typename T , typename... Args>
DataWrapper KisLazySharedCacheStorageBase< DataWrapper, T, Args >::m_dataWrapper
private

Definition at line 169 of file KisLazySharedCacheStorage.h.

◆ m_factory

template<typename DataWrapper , typename T , typename... Args>
std::function<FactoryType> KisLazySharedCacheStorageBase< DataWrapper, T, Args >::m_factory
private

Definition at line 168 of file KisLazySharedCacheStorage.h.

◆ m_mutex

template<typename DataWrapper , typename T , typename... Args>
QMutex KisLazySharedCacheStorageBase< DataWrapper, T, Args >::m_mutex
mutableprivate

Definition at line 171 of file KisLazySharedCacheStorage.h.


The documentation for this class was generated from the following file: