Package io.keikai.model.impl.sys.formula
Class DependencyTrackerImpl
- java.lang.Object
-
- io.keikai.model.impl.sys.formula.DependencyTrackerImpl
-
- All Implemented Interfaces:
DependencyTracker
- Direct Known Subclasses:
DependencyTrackerEx
public class DependencyTrackerImpl extends Object implements DependencyTracker
A default dependency tracker.- Author:
- Pao
-
-
Constructor Summary
Constructors Constructor Description DependencyTrackerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDependency(OperationEvaluationContext ec, Ptg[] ptgs)
Construct formula reference dependencies.void
clearIndirectRefPrecedent(OperationEvaluationContext ec)
Clear precedent for anio.keikai.model.sys.dependency.IndirectRef
void
clearOffsetRefPrecedent(OperationEvaluationContext ec)
Clear precedent for anio.keikai.model.sys.dependency.OffsetRef
ValueEval
postProcessValueEval(OperationEvaluationContext ec, ValueEval opResult, boolean eval)
Callback when evaluating a formula cell.void
setIndirectRefPrecedent(OperationEvaluationContext ec, ValueEval preRef)
Sets precedent for anio.keikai.model.sys.dependency.IndirectRef
void
setOffsetRefPrecedent(OperationEvaluationContext ec, ValueEval preRef)
Sets precedent for anio.keikai.model.sys.dependency.OffsetRef
-
-
-
Method Detail
-
postProcessValueEval
public ValueEval postProcessValueEval(OperationEvaluationContext ec, ValueEval opResult, boolean eval)
Description copied from interface:DependencyTracker
Callback when evaluating a formula cell.- Specified by:
postProcessValueEval
in interfaceDependencyTracker
- Parameters:
ec
- the evaluation context of the evaluated formula cell.opResult
- the precedent that might change the formula cell.eval
- whether this reference is an evaluated result(e.g. from INDIRECT() function(true), or directly specified in formula(false))- Returns:
- the ValueEval after the dependency checking
-
addDependency
public void addDependency(OperationEvaluationContext ec, Ptg[] ptgs)
Description copied from interface:DependencyTracker
Construct formula reference dependencies.- Specified by:
addDependency
in interfaceDependencyTracker
- Parameters:
ec
- the evaluation context of the evaluated formula cell.ptgs
- the precedent that might change the formula cell.
-
clearIndirectRefPrecedent
public void clearIndirectRefPrecedent(OperationEvaluationContext ec)
Description copied from interface:DependencyTracker
Clear precedent for anio.keikai.model.sys.dependency.IndirectRef
- Specified by:
clearIndirectRefPrecedent
in interfaceDependencyTracker
-
setIndirectRefPrecedent
public void setIndirectRefPrecedent(OperationEvaluationContext ec, ValueEval preRef)
Description copied from interface:DependencyTracker
Sets precedent for anio.keikai.model.sys.dependency.IndirectRef
- Specified by:
setIndirectRefPrecedent
in interfaceDependencyTracker
-
clearOffsetRefPrecedent
public void clearOffsetRefPrecedent(OperationEvaluationContext ec)
Description copied from interface:DependencyTracker
Clear precedent for anio.keikai.model.sys.dependency.OffsetRef
- Specified by:
clearOffsetRefPrecedent
in interfaceDependencyTracker
-
setOffsetRefPrecedent
public void setOffsetRefPrecedent(OperationEvaluationContext ec, ValueEval preRef)
Description copied from interface:DependencyTracker
Sets precedent for anio.keikai.model.sys.dependency.OffsetRef
- Specified by:
setOffsetRefPrecedent
in interfaceDependencyTracker
-
-