treecalc.comp
Class ModelSimple

java.lang.Object
  extended by treecalc.comp.ModelSimple

public class ModelSimple
extends java.lang.Object


Nested Class Summary
static class ModelSimple.NodeData
           
 
Field Summary
 java.lang.String[] builtin
           
 Scope combinedScope
           
 Scope globalScope
           
 ScopeNode maintreeScope
           
 java.util.ArrayList<ModelTree> trees
           
 
Constructor Summary
ModelSimple(TcAst root)
           
 
Method Summary
 void addCalcname(java.lang.String calcname, int nargs, int calcindex)
           
 void addFunction(GenFunction function)
           
 void addInput(GenInput input)
           
 void addNodeData(ScopeNode scopeNode, ModelSimple.NodeData nodeData)
           
 void addTable(GenTable table)
           
 int getCacheId(java.lang.String description)
           
 java.util.HashMap<java.lang.Integer,java.lang.String> getCacheIds()
           
 int getCalcindex(java.lang.String calcname, int nargs)
           
 GenNodeCalc getCalcname(int calcindex)
           
 int getCalcnamesSize()
          Map of all all result-definition names within the nodes reachable from the main root node.
 int getCommonParent(int[] nodes)
           
 java.util.HashMap<java.lang.String,FormulaConstant> getConstants()
           
 TcAst getFormula(int id)
           
 int getFormulaSize()
           
 GenFunction getFunction(int index)
           
 GenFunction getFunction(java.lang.String name)
           
 int getFunctionSize()
           
 GenInput getInput(int index)
           
 GenInput getInput(java.lang.String name)
           
 int[] getInputAutocounters(GenInput input)
           
 int getInputcalcIndex(java.lang.String inputcalcName)
           
 java.lang.String getInputcalcName(int index)
           
 int getInputcalcSize()
           
 int getInputSize()
           
 ModelSimple.NodeData getNodeData(int nodeindex)
           
 ModelSimple.NodeData getNodeData(ScopeNode scopeNode)
           
 int getNodeDataSize()
           
 TcAst getRoot()
           
 GenTable getTable(int tableindex)
           
 GenTable getTable(java.lang.String tablename)
           
 int getTableSize()
           
 int getTimesId(java.lang.String name)
           
 java.lang.String getTimesName(int id)
           
 int getTimesSize()
           
 void putConstant(FormulaConstant constant)
           
 int putFormula(TcAst formula)
           
 void putInputcalc(java.lang.String inputcalcName)
           
 void putTimesName(java.lang.String name)
           
 void setAstRoot(TcAst root)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

builtin

public java.lang.String[] builtin

globalScope

public Scope globalScope

maintreeScope

public ScopeNode maintreeScope

combinedScope

public Scope combinedScope

trees

public java.util.ArrayList<ModelTree> trees
Constructor Detail

ModelSimple

public ModelSimple(TcAst root)
Method Detail

addTable

public void addTable(GenTable table)

getTable

public GenTable getTable(java.lang.String tablename)

getTable

public GenTable getTable(int tableindex)

getTableSize

public int getTableSize()

addFunction

public void addFunction(GenFunction function)

getFunction

public GenFunction getFunction(java.lang.String name)

getFunction

public GenFunction getFunction(int index)

getFunctionSize

public int getFunctionSize()

addInput

public void addInput(GenInput input)

getInput

public GenInput getInput(java.lang.String name)

getInput

public GenInput getInput(int index)

getInputSize

public int getInputSize()

getNodeDataSize

public int getNodeDataSize()

getNodeData

public ModelSimple.NodeData getNodeData(ScopeNode scopeNode)

getNodeData

public ModelSimple.NodeData getNodeData(int nodeindex)

addNodeData

public void addNodeData(ScopeNode scopeNode,
                        ModelSimple.NodeData nodeData)

getCalcnamesSize

public int getCalcnamesSize()
Map of all all result-definition names within the nodes reachable from the main root node. name: property name (TODO: add arity to key) value: unique integer to be used as index into the bitset


addCalcname

public void addCalcname(java.lang.String calcname,
                        int nargs,
                        int calcindex)

getCalcname

public GenNodeCalc getCalcname(int calcindex)

getCalcindex

public int getCalcindex(java.lang.String calcname,
                        int nargs)

getCommonParent

public int getCommonParent(int[] nodes)
Returns:
closest common parent, -1 if nodes argument is empty

setAstRoot

public void setAstRoot(TcAst root)

getRoot

public TcAst getRoot()

putTimesName

public void putTimesName(java.lang.String name)

getTimesId

public int getTimesId(java.lang.String name)

getTimesName

public java.lang.String getTimesName(int id)

getTimesSize

public int getTimesSize()

getInputAutocounters

public int[] getInputAutocounters(GenInput input)
Parameters:
inputname -
Returns:
array of timesindex for the given input

putConstant

public void putConstant(FormulaConstant constant)

getConstants

public java.util.HashMap<java.lang.String,FormulaConstant> getConstants()

getInputcalcSize

public int getInputcalcSize()

putInputcalc

public void putInputcalc(java.lang.String inputcalcName)

getInputcalcIndex

public int getInputcalcIndex(java.lang.String inputcalcName)

getInputcalcName

public java.lang.String getInputcalcName(int index)

getCacheId

public int getCacheId(java.lang.String description)

getCacheIds

public java.util.HashMap<java.lang.Integer,java.lang.String> getCacheIds()

putFormula

public int putFormula(TcAst formula)

getFormulaSize

public int getFormulaSize()

getFormula

public TcAst getFormula(int id)


Copyright © 2013. All Rights Reserved.