Maintains the state of a mutable_cell
.
More...
#include <mutable_cell.hpp>
|
void | silent_set (T value) |
| Set the cell's value without notifying observers.
|
|
void | add_to_batch () |
| Add this state to the list of mutable cells that were updating during the current batch update.
|
|
bool | is_active () const |
| Does the cell have at least one observer?
|
|
|
typedef std::shared_ptr< cell_state > | ref |
| Shared pointer to a cell_state .
|
|
key_ref | key_ |
| Key identifying the cell corresponding to this state.
|
|
std::unordered_map< observer::ref, std::size_t > | observers |
| The set of observers observing changes to the values in the cell corresponding to this state.
|
|
template<
typename T>
class live_cells::mutable_cell_state< T >
Maintains the state of a mutable_cell
.
◆ mutable_cell_state()
Create a mutable cell state with the value initialized to value.
- Parameters
-
key | Key identifying the state |
value | Initial value |
◆ cell_state()
live_cells::cell_state::cell_state |
( |
key_ref | k | ) |
|
|
inline |
Create a cell state with a given key.
- Parameters
-
◆ is_batch_update()
Is a batch update of mutable cells currently in effect?
- Returns
true
if a batch update is in effect
◆ silent_set()
Set the cell's value without notifying observers.
- Parameters
-
◆ value() [1/2]
Get the value of the cell.
- Returns
- The value
◆ value() [2/2]
Set the value of the cell and notify its observers.
- Parameters
-
The documentation for this class was generated from the following file: