8#include "observer_intf.hpp"
9#include "../utility/utility.hpp"
11#include "../macros.hpp"
14hi_export_module(hikogui.observer : shared_state);
16hi_export
namespace hi::inline
v1 {
55 template<
typename... Args>
61 observer<value_type> observer() const & noexcept
63 return ::hi::observer<value_type>(_pimpl);
72 [[nodiscard]]
auto sub(
auto const& index)
const&
noexcept
73 requires requires { observer().sub(index); }
75 return observer().sub(index);
85 template<fixed_
string Name>
86 [[nodiscard]]
auto sub() const& noexcept
88 return observer().template sub<Name>();
Functions and types for accessing operating system threads.
DOXYGEN BUG.
Definition algorithm_misc.hpp:20
Shared state of an application.
Definition shared_state.hpp:41
constexpr shared_state(Args &&...args) noexcept
Construct the shared state and initialize the value.
Definition shared_state.hpp:56
auto sub() const &noexcept
Get a observer to a member variable of the value.
Definition shared_state.hpp:86
auto sub(auto const &index) const &noexcept
Get a observer to a sub-object of value accessed by the index operator.
Definition shared_state.hpp:72