A wrapper class around arbitrary object that needs thread safe caching. More...
#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/MTUtils.hpp>
Public Types | |
| using | Setter = std::function<void(T &)> |
Public Member Functions | |
| template<class... Args> | |
| CachedObject (Setter &&fn, Args &&... args) | |
| template<class Fn> | |
| void | invalidate (Fn &&fn) |
| const T & | get () |
Private Attributes | |
| T | m_obj |
| bool | m_valid |
| SpinMutex | m_lck |
| std::function< void(T &)> | m_setter |
A wrapper class around arbitrary object that needs thread safe caching.
| using Slic3r::CachedObject< T >::Setter = std::function<void(T &)> |
|
inline |
|
inline |
|
private |
Referenced by get(), and invalidate().
|
private |
Referenced by CachedObject(), and get().
|
private |
Referenced by CachedObject(), and get().
|
private |
Referenced by CachedObject(), get(), and invalidate().