Dirty Cell Tracker¶
-
class
ixion
::
dirty_cell_tracker
¶ This class is designed to track in-direct dependencies of dirty formula cells. A “dirty” formula cell is a formula cell whose result needs to be re-calculated because at least one of its references have their values updated.
This class also takes volatile functions into account when determining the status of the formula cel result. A volatile function is a cell function whose value needs to get re-calculated unconditionally on every re-calculation. One example of a volatile function is NOW(), which returns the current time at the time of calculation.
Public Functions
-
dirty_cell_tracker
(const dirty_cell_tracker&) = delete¶
-
dirty_cell_tracker &
operator=
(const dirty_cell_tracker&) = delete¶
-
dirty_cell_tracker
()¶
-
~dirty_cell_tracker
()¶
-
void
add
(const abs_range_t &src, const abs_range_t &dest)¶ Add a tracking relationship from a source cell or cell range to a destination cell or cell range.
- Parameters
src
: source cell or cell range that includes reference to (therefore listens to) the range.dest
: destination cell or range referenced tracked by the source cell.
-
void
remove
(const abs_range_t &src, const abs_range_t &dest)¶ Remove an existing tracking relationship from a source cell or cell range to a destination cell or cell range. If no such relationship exists, it does nothing.
- Parameters
src
: cell or cell range that includes reference to the range.dest
: cell or range referenced by the cell.
-
void
add_volatile
(const abs_range_t &pos)¶ Register a formula cell located at the specified position as volatile. Note that the caller should ensure that the cell at the specified position is indeed a formula cell.
- Parameters
pos
: position of the cell to register as a volatile cell.
-
void
remove_volatile
(const abs_range_t &pos)¶ Remove the specified cell position from the internal set of registered volatile formula cells.
- Parameters
pos
: position of the cell to unregister as a volatile cell.
-
abs_range_set_t
query_dirty_cells
(const abs_range_t &modified_cell) const¶
-
abs_range_set_t
query_dirty_cells
(const abs_range_set_t &modified_cells) const¶
-
std::vector<abs_range_t>
query_and_sort_dirty_cells
(const abs_range_t &modified_cell) const¶
-
std::vector<abs_range_t>
query_and_sort_dirty_cells
(const abs_range_set_t &modified_cells, const abs_range_set_t *dirty_formula_cells = nullptr) const¶
-
std::string
to_string
() const¶
-
bool
empty
() const¶
-