template<typename T>
TnxViewModel class

One set of a view model's values, readable by bindings while it lives. Set from any thread.

Base classes

class TnxViewModelBase
The non-template part of a view model: its target, and how readers reach its values.

Constructors, destructors, conversion operators

TnxViewModel()
Values as T's defaults.
TnxViewModel(const T& initial) explicit
Values as initial.
~TnxViewModel()

Public functions

template<typename TMember>
void Set(TMember T::* member, const TMember& value)
Set one value: Set(&ConnectionInfo::PingMs, 42.0f). What shows it repaints.
template<typename TFn>
void Update(TFn&& change)
Change several values together: change(T&) runs under the view model's lock.
auto Get() const -> T
A copy of its values.