|
Aria 2.0.0
C++23 MVVM framework (C++20 minimum) — reactive, coroutine-first, ABI-layered
|
#include <selection.hpp>
Public Types | |
| using | value_type = T |
| using | handle = std::shared_ptr<T> |
Public Member Functions | |
| Selection ()=default | |
| ~Selection () | |
| Selection (const Selection &)=delete | |
| Selection & | operator= (const Selection &)=delete |
| Selection (Selection &&)=delete | |
| Selection & | operator= (Selection &&)=delete |
| reactive::Property< handle > & | selected () noexcept |
| Reactive selected handle (null when nothing is selected). | |
| const reactive::Property< handle > & | selected () const noexcept |
| handle | value () const |
| Current selected element (may be null). | |
| bool | has_value () const |
| void | select (handle item) |
| Select item (null clears). | |
| void | clear () |
| Clear the selection. | |
| bool | is_selected (const handle &item) const |
| True iff item is the current selection (by shared_ptr identity). | |
| void | bind_to (ObservableList< T > &source) |
| Follow source membership by replaying its owning events. | |
| void | unbind () noexcept |
| Detach from the bound source list (idempotent). | |
| using aria::Selection< T >::value_type = T |
| using aria::Selection< T >::handle = std::shared_ptr<T> |
|
default |
|
inline |
|
delete |
|
delete |
|
delete |
|
delete |
|
inlinenodiscardnoexcept |
Reactive selected handle (null when nothing is selected).
|
inlinenodiscardnoexcept |
|
inlinenodiscard |
Current selected element (may be null).
|
inlinenodiscard |
|
inline |
Select item (null clears).
No-op if already selected (equality gate on the shared_ptr identity).
|
inline |
Clear the selection.
|
inlinenodiscard |
True iff item is the current selection (by shared_ptr identity).
|
inline |
Follow source membership by replaying its owning events.
A removed or replaced selection clears only when no occurrence remains. Reset preserves handles present in its snapshot. The binding may outlive the source; cached handles remain valid until explicitly cleared/unbound. Bind on the source writer thread or while its writer is quiescent.
|
inlinenoexcept |
Detach from the bound source list (idempotent).