Live Cells C++
Reactive Programming for C++
|
A Cell
that reads the value of another Cell
without notifying its observers when it changes.
More...
#include <peek_cell.hpp>
Public Types | |
typedef C::value_type | value_type |
The type of value held by this cell. | |
Public Member Functions | |
peek_cell (const C &cell) | |
Create a peek cell that reads the value of cell. | |
C::value_type | value () const |
Get the value of the argument cell. | |
C::value_type | operator() () const |
Get the value of the argument cell and track it as a dependency. | |
Public Member Functions inherited from live_cells::stateful_cell< peek_cell_state< C > > | |
stateful_cell (key_ref k, Args... args) | |
Create a stateful cell and associate it with a state. | |
key_ref | key () const |
Get the key identifying the cell. | |
void | add_observer (observer::ref o) const |
Add an observer to the cell. | |
void | remove_observer (observer::ref o) const |
Remove an observer from the cell. | |
Additional Inherited Members | |
Protected Attributes inherited from live_cells::stateful_cell< peek_cell_state< C > > | |
const key_ref | key_ |
Key identifying the cell. | |
std::shared_ptr< peek_cell_state< C > > | state |
Reference to the cell's state. | |
A Cell
that reads the value of another Cell
without notifying its observers when it changes.
|
inline |
Create a peek cell that reads the value of cell.
cell | The cell of which to read the value. |
|
inline |
Get the value of the argument cell and track it as a dependency.
|
inline |
Get the value of the argument cell.