FSFormulaSpace


Inherits From:
NSObject
Declared In:
FSFormulaSpace.h


Class Description

A FSFormulaSpace instance (or short a formula space) is the environment formulae belonging to a table are executed in.

If variables are defined by one formula, the formula space is the place this variable gets stored in. So a formula that is executed later can access that variable.

The formula space is completely capsulated by FSTable. An instance is automatically created for each FSTable instance. Further instances should not be needed and are useless without being attached to a table.


Instance Variables

FSTable *_table;
NSMutableDictionary *_variables;
NSMutableArray *_formulae;
NSMutableArray *_touchedKeySets;
FSKeySet *_selection;
BOOL _inRecalc;
int _disabled;

_tableNo description.
_variablesNo description.
_formulaeNo description.
_touchedKeySetsNo description.
_selectionNo description.
_inRecalcNo description.
_disabledNo description.


Method Types

- initWithTable:
- table
- formulae
- addFormula:
- insertFormula:atIndex:
- removeFormula:
- declareVariable:withValue:
- valueForVariable:
- removeVariable:
- removeAllVariables
- formulaCalculatingKeySet:
- confirmTouchedKeySets:
- selection
- setSelection:
- recalculate
- disableRecalculation
- enableRecalculation

Instance Methods

addFormula:

- (void)addFormula:(FSFormula*)aFormula

No method description.


confirmTouchedKeySets:

- (NSArray*)confirmTouchedKeySets:(NSArray*)keySets

Removes all key sets from the array that have been touched by prior formulae already. Adds all other key sets to the touched list.


declareVariable:withValue:

- (void)declareVariable:(NSString*)varName withValue:(id)value

No method description.


disableRecalculation

- (void)disableRecalculation

No method description.


enableRecalculation

- (void)enableRecalculation

No method description.


formulaCalculatingKeySet:

- (FSFormula*)formulaCalculatingKeySet:(FSKeySet*)keySet

No method description.


formulae

- (NSArray*)formulae

Returns the list of formulas in the formula space.


initWithTable:

- (id)initWithTable:(FSTable*)table

Designated initializer.


insertFormula:atIndex:

- (void)insertFormula:(FSFormula*)aFormula atIndex:(int)index

No method description.


recalculate

- (void)recalculate

No method description.


removeAllVariables

- (void)removeAllVariables

No method description.


removeFormula:

- (void)removeFormula:(FSFormula*)aFormula

No method description.


removeVariable:

- (void)removeVariable:(NSString*)varName

No method description.


selection

- (FSKeySet*)selection

Returns the current selection, i.e. the key set representing the value that is currently calculated.

This method should only be called by formulas in this formula space during execution of their calculate method.


setSelection:

- (void)setSelection:(FSKeySet*)keySet

Sets the key set representing the value currently in calculation. There should be no need to call this method directly.


table

- (FSTable*)table

Returns the FSTable instance this formula space is attached to. All FSFormulaSpace instances are attached to exactly one table.


valueForVariable:

- (id)valueForVariable:(NSString*)varName

No method description.


Version 1.1 Copyright ©2001 by Stefan Leuker. All Rights Reserved.