Live Cells C++
Reactive Programming for C++
Loading...
Searching...
No Matches
live_cells::observer Class Referenceabstract

Defines the interface for observing changes to the value of a Cell. More...

#include <types.hpp>

Inheritance diagram for live_cells::observer:

Public Types

typedef std::shared_ptr< observerref
 Shared pointer to an observer.
 

Public Member Functions

virtual void will_update (const key_ref &k)=0
 Notifies this observer that the value of the Cell identified by k is going to change.
 
virtual void update (const key_ref &k, bool did_change)=0
 Notifies this observer that the value of the Cell identified by k has changed.
 

Detailed Description

Defines the interface for observing changes to the value of a Cell.

Member Function Documentation

◆ update()

virtual void live_cells::observer::update ( const key_ref & k,
bool did_change )
pure virtual

Notifies this observer that the value of the Cell identified by k has changed.

Parameters
kidentifying observable
did_changetrue if the value of the cell may have changed, false if it is know that it hasn't changed.

Implemented in live_cells::compute_cell_state< C >, live_cells::compute_cell_state< dynamic_compute_state< F > >, live_cells::compute_cell_state< store_cell_compute_state< C > >, live_cells::mutable_compute_cell_state< T >, live_cells::mutable_compute_cell_state< std::invoke_result_t< F > >, live_cells::previous_value_cell_state< C >, and live_cells::peek_cell_state< C >.

◆ will_update()


The documentation for this class was generated from the following file: