|
Aria 2.0.0
C++23 MVVM framework (C++20 minimum) — reactive, coroutine-first, ABI-layered
|
#include <command.hpp>
Public Types | |
| using | Action = std::function<void()> |
| using | Predicate = std::function<bool()> |
| using | CanExecuteSignal = detail::TypedSignal<bool> |
Public Member Functions | |
| template<std::invocable<> A> | |
| Command (A &&action) | |
| template<std::invocable<> A, std::predicate<> P> | |
| Command (A &&action, P &&predicate) | |
| Command (const Command &)=delete | |
| Command & | operator= (const Command &)=delete |
| Command (Command &&)=delete | |
| Command & | operator= (Command &&)=delete |
| ~Command () | |
| void | execute () |
| void | operator() () |
| bool | can_execute () const |
| void | notify_can_execute_changed () const |
| Force-emit a can_execute notification. | |
| Subscription | observe_can_execute (std::function< void(bool)> fn) |
Friends | |
| class | binding::BindingEngine |
| using aria::Command<>::Action = std::function<void()> |
| using aria::Command<>::Predicate = std::function<bool()> |
| using aria::Command<>::CanExecuteSignal = detail::TypedSignal<bool> |
|
inlineexplicit |
|
inline |
|
delete |
|
delete |
|
inline |
|
delete |
|
delete |
|
inline |
|
inline |
|
inlinenodiscard |
|
inline |
Force-emit a can_execute notification.
Rarely needed for Command<> (the built-in Effect handles reactive state automatically); provided as an escape hatch when the predicate depends on non-reactive state.
|
inlinenodiscard |
|
friend |