|
|
using | super = observable_base<T> |
| |
|
using | value_type = typename super::value_type |
| |
|
using | atomic_type = std::conditional_t<is_atomic, std::atomic<value_type>, value_type> |
| |
|
using | value_type = T |
| |
|
using | notifier_type = notifier<void()> |
| |
|
using | callback_type = typename notifier_type::callback_type |
| |
|
using | callback_ptr_type = typename notifier_type::callback_ptr_type |
| |
|
|
static constexpr bool | is_atomic = may_be_atomic_v<value_type> |
| |
◆ load()
template<typename T >
|
|
inlineoverridevirtualnoexcept |
Get the current value.
The value is often calculated directly from the cached values retrieved from notifications down the chain.
Implements tt::detail::observable_base< T >.
◆ store()
template<typename T >
|
|
inlineoverridevirtualnoexcept |
Set the value.
The value is often not directly stored, but instead forwarded up the chain of observables. And then let the notifications flowing backward updated the cached values so that loads() will be quick.
- Parameters
-
- Returns
- true if the value was different from before.
Implements tt::detail::observable_base< T >.
The documentation for this class was generated from the following file: