A stateful cell which can have its value set directly.
More...
#include <mutable_cell.hpp>
|
typedef T | value_type |
| The type of value held by this cell.
|
|
template<
typename T>
class live_cells::mutable_cell< T >
A stateful cell which can have its value set directly.
◆ mutable_cell() [1/2]
Create a mutable cell with an initial value.
- Parameters
-
value | The initial value of the cell |
◆ mutable_cell() [2/2]
Create a mutable cell with an initial value.
If there is no state associated with key key, a new state is created and the value of the cell is initialized to value.
If there is a state associated with key, value is ignored.
- Parameters
-
key | Key identifying cell |
value | Initial value |
◆ operator()()
Get the value of the cell and track it as a dependency.
- Returns
- The value of the cell.
◆ operator=() [1/2]
Set the value of the cell.
This is equivalent to \prop value(value).
- Parameters
-
- Returns
- value
◆ operator=() [2/2]
Set the value of the cell.
This is equivalent to \prop value(value).
- Note
- This
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.
- Parameters
-
- Returns
- value
◆ value() [1/2]
Get the value of the cell.
- Returns
- The value of the cell.
◆ value() [2/2]
Set the value of the cell.
- Note
- This method is marked const to allow the value of the cell to be set when it is copy-captured by a lambda.
- Parameters
-
The documentation for this class was generated from the following file: