kspread

KSpread::RecalcManager Class Reference

Manages the recalculations of cells containing a formula. More...

#include <RecalcManager.h>

List of all members.

Public Member Functions

 RecalcManager (const Map *map)
 ~RecalcManager ()
void dump () const
bool isActive () const
void recalcMap ()
void recalcSheet (Sheet *const sheet)
void regionChanged (const Region &region)

Protected Member Functions

void recalc ()

Detailed Description

Manages the recalculations of cells containing a formula.

The recalculations of a cell region, a sheet or the map are based on the following principle:

A cell could refer to other cells, which need to be recalculated before. The order of recalculation is determined by the depth of references, i.e. first the cells, which do not refer to other cells, are recalculated. Cells referring to those are next. Then cells, which refer to the ones in the last step follow and so on until all cells have been updated.

Cell value changes are blocked while doing this, i.e. they do not trigger a new recalculation event.

Definition at line 48 of file RecalcManager.h.


Constructor & Destructor Documentation

RecalcManager::RecalcManager ( const Map map  )  [explicit]

Creates a RecalcManager.

It is used for a whole map.

Parameters:
map The Map which this RecalcManager belongs to.

Definition at line 168 of file RecalcManager.cpp.

RecalcManager::~RecalcManager (  ) 

Destructor.

Definition at line 175 of file RecalcManager.cpp.


Member Function Documentation

void RecalcManager::dump (  )  const

Prints out the cell depths in the current recalculation event.

Definition at line 259 of file RecalcManager.cpp.

bool RecalcManager::isActive (  )  const

Returns the recalculation state.

Returns:
true, if recalculations are in progress

Definition at line 214 of file RecalcManager.cpp.

void RecalcManager::recalc (  )  [protected]

Iterates over the map of cell with their reference depths and calls recalcCell().

See also:
recalcCell()

Definition at line 219 of file RecalcManager.cpp.

void RecalcManager::recalcMap (  ) 

Recalculates the whole map.

The cells are recalculated sorted by the reference depth in ascending order.

See also:
recalc()

Definition at line 203 of file RecalcManager.cpp.

void RecalcManager::recalcSheet ( Sheet *const   sheet  ) 

Recalculates the sheet sheet .

The cells are recalculated sorted by the reference depth in ascending order.

See also:
recalc()

Definition at line 192 of file RecalcManager.cpp.

void RecalcManager::regionChanged ( const Region region  ) 

Recalculates the cells referring to cells in region .

The cells are recalculated sorted by the reference depth in ascending order.

See also:
recalc()

Definition at line 180 of file RecalcManager.cpp.


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