treecalc.rt
Interface S


public interface S

Status including input values, times-counter etc.

Author:
Stefan

Nested Class Summary
static class S.Traceaction
           
 
Method Summary
 java.lang.String calculate(long id)
           
 java.lang.String calculate(long id, int... args)
           
 java.lang.String calculate(long id, java.lang.String... args)
           
 java.lang.String calculate(java.lang.String name)
           
 java.lang.String calculateFunction(java.lang.String name)
           
 java.lang.String calculateInput(java.lang.String name)
           
 java.lang.String calculateInputCalc(java.lang.String name, java.lang.String calcname)
           
 java.lang.String calculateMaintree(int calcindex, java.lang.String... args)
           
 java.lang.String calculateMaintree(java.lang.String name)
           
 java.lang.String calculateTable(java.lang.String name)
           
 V[] getAutocounterValues(int[] autocounters)
           
 java.lang.Object getCacheKey(int id, V... args)
           
 long getCalculateId(java.lang.String name)
           
 V getInput(int inputid, V... index)
           
 V getInputAutocounter(int inputid, int[] autocounters)
           
 boolean getInputIsNull(java.lang.String inputname)
           
 java.util.List<java.lang.String[]> getInputList(int inputid, int... index)
           
 java.util.List<java.lang.String[]> getInputList(java.lang.String name)
           
 S getSubmodel(java.lang.String vpmname)
           
 int getTimesCounter(int timesid)
          Get current value of the timer with the given id.
 V getTimesCounterV(int timesid)
          see popTimesCounter.
 void incTimesCounterTop()
          increment the topmost counter by 1
 boolean needed(java.lang.String inputname, java.lang.String calcname)
           
 void popTimesCounter()
          remove topmost counter from the stack of active counters
 void pushTimesCounter(int timesid)
          push a counter to the stack of active counters
 V readCache(java.lang.Object key)
           
 void reset()
          reset all input values
 void setInput(int inputid, V value, int... index)
           
 void setInput(java.lang.String name, java.lang.String value)
           
 void setTimesCounterTop(int value)
          Set the value of the topmost counter to the given 'value'
 void trace(java.lang.String msg, java.lang.String ret, S.Traceaction traceaction)
           
 void writeCache(java.lang.Object key, V value)
           
 

Method Detail

reset

void reset()
reset all input values


getInput

V getInput(int inputid,
           V... index)
           throws ExceptionNeedMoreInput
Parameters:
inputid -
index - will be converted to int values. trailing 0 elements in the array are discarded
Returns:
current value of Input with given id
Throws:
ExceptionNeedMoreInput

getInputAutocounter

V getInputAutocounter(int inputid,
                      int[] autocounters)
                      throws ExceptionNeedMoreInput
Parameters:
inputid -
autocounters: - array of counters to care about. those are looked up in the stack of active counters
Returns:
current value
Throws:
ExceptionNeedMoreInput

getAutocounterValues

V[] getAutocounterValues(int[] autocounters)

setInput

void setInput(int inputid,
              V value,
              int... index)
Parameters:
inputid -
value -
index: - trailing 0 elements are discarded

setInput

void setInput(java.lang.String name,
              java.lang.String value)
Parameters:
name: - inputname case-insensitive. may include indizes in [] with , as separator.
value -

getInputList

java.util.List<java.lang.String[]> getInputList(int inputid,
                                                int... index)

getInputList

java.util.List<java.lang.String[]> getInputList(java.lang.String name)
Parameters:
name: - inputname case-insensitive. may include indizes in [] with , as separator.
Returns:
result of calculation

calculateMaintree

java.lang.String calculateMaintree(int calcindex,
                                   java.lang.String... args)
Parameters:
calcindex: - index of the thing to be calculated
args: - the arguments to be passed. They are handled as Strings
Returns:
result of calculation

calculateMaintree

java.lang.String calculateMaintree(java.lang.String name)
Parameters:
name: - propertyname case-insensitive. optional parameters are passed within (), separated with ,
Returns:
result of calculation

calculateInput

java.lang.String calculateInput(java.lang.String name)

calculateInputCalc

java.lang.String calculateInputCalc(java.lang.String name,
                                    java.lang.String calcname)

calculateFunction

java.lang.String calculateFunction(java.lang.String name)

calculateTable

java.lang.String calculateTable(java.lang.String name)

getCalculateId

long getCalculateId(java.lang.String name)

calculate

java.lang.String calculate(java.lang.String name)

calculate

java.lang.String calculate(long id)

calculate

java.lang.String calculate(long id,
                           java.lang.String... args)

calculate

java.lang.String calculate(long id,
                           int... args)

needed

boolean needed(java.lang.String inputname,
               java.lang.String calcname)

pushTimesCounter

void pushTimesCounter(int timesid)
push a counter to the stack of active counters

Parameters:
timesid -

incTimesCounterTop

void incTimesCounterTop()
increment the topmost counter by 1


setTimesCounterTop

void setTimesCounterTop(int value)
Set the value of the topmost counter to the given 'value'

Parameters:
value -

popTimesCounter

void popTimesCounter()
remove topmost counter from the stack of active counters


getTimesCounter

int getTimesCounter(int timesid)
Get current value of the timer with the given id. If multiple of counters with that id are active, the topmost one is used.

Parameters:
timesid: - id of counter
Returns:
current value of counter or -1 if it is not active

getTimesCounterV

V getTimesCounterV(int timesid)
see popTimesCounter.

Parameters:
timesid: - id of counter
Returns:
the current value of the counter

getCacheKey

java.lang.Object getCacheKey(int id,
                             V... args)

readCache

V readCache(java.lang.Object key)

writeCache

void writeCache(java.lang.Object key,
                V value)

getSubmodel

S getSubmodel(java.lang.String vpmname)

getInputIsNull

boolean getInputIsNull(java.lang.String inputname)

trace

void trace(java.lang.String msg,
           java.lang.String ret,
           S.Traceaction traceaction)


Copyright © 2013. All Rights Reserved.