- Inherits From:
- NSObject
- Declared In:
- FSFormulaSpace.h
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.
FSTable *_table;
NSMutableDictionary *_variables;
NSMutableArray *_formulae;
NSMutableArray *_touchedKeySets;
FSKeySet *_selection;
BOOL _inRecalc;
int _disabled;
_table No description. _variables No description. _formulae No description. _touchedKeySets No description. _selection No description. _inRecalc No description. _disabled No description.
- - initWithTable:
- - table
- - formulae
- - addFormula:
- - insertFormula:atIndex:
- - removeFormula:
- - declareVariable:withValue:
- - valueForVariable:
- - removeVariable:
- - removeAllVariables
- - formulaCalculatingKeySet:
- - confirmTouchedKeySets:
- - selection
- - setSelection:
- - recalculate
- - disableRecalculation
- - enableRecalculation
- (void)addFormula:(FSFormula*)aFormula
No method description.
- (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.
- (void)declareVariable:(NSString*)varName withValue:(id)value
No method description.
- (void)disableRecalculation
No method description.
- (void)enableRecalculation
No method description.
- (FSFormula*)formulaCalculatingKeySet:(FSKeySet*)keySet
No method description.
- (NSArray*)formulae
Returns the list of formulas in the formula space.
- (id)initWithTable:(FSTable*)table
Designated initializer.
- (void)insertFormula:(FSFormula*)aFormula atIndex:(int)index
No method description.
- (void)recalculate
No method description.
- (void)removeAllVariables
No method description.
- (void)removeFormula:(FSFormula*)aFormula
No method description.
- (void)removeVariable:(NSString*)varName
No method description.
- (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.
- (void)setSelection:(FSKeySet*)keySet
Sets the key set representing the value currently in calculation. There should be no need to call this method directly.
- (FSTable*)table
Returns the FSTable instance this formula space is attached to. All FSFormulaSpace instances are attached to exactly one table.
- (id)valueForVariable:(NSString*)varName
No method description.