|
Live Cells C++
Reactive Programming for C++
|
Same as make_cell but also provides a value setter value(Parent::value_type) so that the definition satisfies the MutableCell concept.
More...
#include <make_cell.hpp>


Public Member Functions | |
| Parent::value_type | operator= (const Parent::value_type &value) |
| Set the value of the cell to value. | |
| Parent::value_type | operator= (const Parent::value_type &value) const |
| Set the value of the cell. | |
| void | value (const Parent::value_type &value) const |
| Set the value of the cell to value. | |
Public Member Functions inherited from live_cells::make_cell< C > | |
| template<typename K , typename... Args> requires (!Keyable<C> && std::constructible_from<C,Args...>) | |
| make_cell (K &&key, Args &&... args) | |
| Constructor that allows a key to be provided, with args forwarded to the constructor of C. | |
| template<typename... Args> requires (!Keyable<C> && std::constructible_from<C,Args...>) | |
| make_cell (Args &&... args) | |
| Constructor that forwards all its arguments args to the constructor of C. | |
| template<typename... Args> requires (Keyable<C> && std::constructible_from<C,Args...>) | |
| make_cell (Args &&... args) | |
| Constructor that forwards all its arguments args to the constructor of C. | |
| void | add_observer (observer::ref obs) const |
| Add an observer to the cell. | |
| void | remove_observer (observer::ref obs) const |
| Remove an observer from the cell. | |
| value_type | value () const |
| Get the value of the cell. | |
| value_type | operator() () const |
| Get the value of the cell and track it as a dependency. | |
| value_type | operator() () const |
| Get the value of the cell and track it as a dependency. | |
| key_ref | key () const |
| Get the key identifying the cell. | |
| key_ref | key () const |
| Get the key identifying the cell. | |
Additional Inherited Members | |
Public Types inherited from live_cells::make_cell< C > | |
| typedef cell_value_type< C > | value_type |
Cell value type (return type of C::value()). | |
Protected Attributes inherited from live_cells::make_cell< C > | |
| C | cell |
| const std::enable_if<!Keyable< C >, key_ref >::type | key_ |
| Key identifying the cell. | |
Same as make_cell but also provides a value setter value(Parent::value_type) so that the definition satisfies the MutableCell concept.
|
inline |
Set the value of the cell to value.
C::value(value).| value | The new value of the cell |
|
inline |
Set the value of the cell.
This is equivalent to \prop value(value).
const version is provided to allow setting the value of a mutable cell within a lambda provided for the reverse computation function of a mutable computed cell.| value | The new value |
|
inline |
Set the value of the cell to value.
C::value(value).| value | The new value of the cell |