|
Krita Source Code Documentation
|
#include <kis_lock_free_cache.h>
Public Member Functions | |
| T | getValue () const |
| void | invalidate () |
| bool | tryGetValue (T &result) const |
| virtual | ~KisLockFreeCache () |
Protected Member Functions | |
| virtual T | calculateNewValue () const =0 |
Private Attributes | |
| KisCacheStateValue | m_state |
| T | m_value |
Definition at line 98 of file kis_lock_free_cache.h.
|
inlinevirtual |
Definition at line 101 of file kis_lock_free_cache.h.
|
protectedpure virtual |
Calculate the value. Used by the cache internally. Reimplemented by the user.
|
inline |
Calculate the value or fetch it from the cache
Definition at line 113 of file kis_lock_free_cache.h.
References KisLockFreeCache< T >::calculateNewValue(), KisCacheStateValue::endRead(), KisCacheStateValue::endWrite(), KisLockFreeCache< T >::m_state, KisLockFreeCache< T >::m_value, KisCacheStateValue::startRead(), and KisCacheStateValue::startWrite().
|
inline |
Notify the cache that the value has changed
Definition at line 106 of file kis_lock_free_cache.h.
References KisCacheStateValue::invalidate(), and KisLockFreeCache< T >::m_state.
|
inline |
Definition at line 135 of file kis_lock_free_cache.h.
References KisCacheStateValue::endRead(), KisLockFreeCache< T >::m_state, KisLockFreeCache< T >::m_value, and KisCacheStateValue::startRead().
|
mutableprivate |
Definition at line 160 of file kis_lock_free_cache.h.
|
mutableprivate |
Definition at line 161 of file kis_lock_free_cache.h.