Struct thl::AtomicCacheEntry#

struct AtomicCacheEntry#

Collaboration diagram for thl::AtomicCacheEntry:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "5" [label="std::atomic< bool >" tooltip="std::atomic< bool >"] "2" [label="std::atomic< double >" tooltip="std::atomic< double >"] "3" [label="std::atomic< float >" tooltip="std::atomic< float >"] "4" [label="std::atomic< int >" tooltip="std::atomic< int >"] "1" [label="thl::AtomicCacheEntry" tooltip="thl::AtomicCacheEntry" fillcolor="#BFBFBF"] "1" -> "2" [dir=forward tooltip="usage"] "1" -> "3" [dir=forward tooltip="usage"] "1" -> "4" [dir=forward tooltip="usage"] "1" -> "5" [dir=forward tooltip="usage"] }

Atomic cache entry for real-time safe per-sample parameter access.

Each parameter gets one AtomicCacheEntry, embedded in the owning ParameterRecord. This is the single source of truth for numeric values. ParameterHandle<T> accesses this entry via ParameterRecord*. The entry’s address is stable (std::map pointer stability) until State::clear() or State destruction.

Only the native-type atomic (matching ParameterRecord::m_def.m_type) is written on set. Reads convert on the fly from the native atomic.

Note

Non-copyable, non-movable — always accessed via pointer.

Public Functions

AtomicCacheEntry() = default#
AtomicCacheEntry(const AtomicCacheEntry&) = delete#
AtomicCacheEntry &operator=(const AtomicCacheEntry&) = delete#

Public Members

std::atomic<double> m_atomic_double = {0.0}#
std::atomic<float> m_atomic_float = {0.0f}#
std::atomic<int> m_atomic_int = {0}#
std::atomic<bool> m_atomic_bool = {false}#