engine
Class RuntimeVCDReader
java.lang.Object
|
+--engine.DummyVCDReader
|
+--engine.RuntimeVCDReader
- public class RuntimeVCDReader
- extends DummyVCDReader
A smarter VCDReader (@see middle.VCDReader)
|
Method Summary |
void |
execute()
At the end of each timUnit flushes all the vars values into a temporary file
After that, it calls each VarHistory created to update itself
And after and only after that, calls the ExternalListaner to update itself |
void |
finalize()
|
long |
getSimulationLength()
Must be called at every update by the externalListener or whoever wants to use
verHistories. |
VariableHistory |
getVarHistory(java.lang.String fqName)
Returns a new VariabeHistory for the variable named FQN |
void |
registerVariable(DataHolder var,
java.lang.String name)
Called by every inspectable variable inside the model, in order to keep track of its evolution in time |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
,
clone,
equals,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
wait,
wait,
wait |
externalListener
TimeUnitChangeListener externalListener
swapFileName
static final java.lang.String swapFileName
dataHolders
java.util.Vector dataHolders
varHistories
java.util.Vector varHistories
swapFile
java.io.RandomAccessFile swapFile
varNumber
long varNumber
RuntimeVCDReader
RuntimeVCDReader(TimeUnitChangeListener externalListener)
finalize
public void finalize()
- Overrides:
- finalize in class java.lang.Object
getVarHistory
public VariableHistory getVarHistory(java.lang.String fqName)
- Returns a new VariabeHistory for the variable named FQN
- Overrides:
- getVarHistory in class DummyVCDReader
getSimulationLength
public long getSimulationLength()
- Must be called at every update by the externalListener or whoever wants to use
verHistories.
- Overrides:
- getSimulationLength in class DummyVCDReader
execute
public void execute()
- At the end of each timUnit flushes all the vars values into a temporary file
After that, it calls each VarHistory created to update itself
And after and only after that, calls the ExternalListaner to update itself
- Overrides:
- execute in class DummyVCDReader
registerVariable
public void registerVariable(DataHolder var,
java.lang.String name)
- Called by every inspectable variable inside the model, in order to keep track of its evolution in time
- Overrides:
- registerVariable in class DummyVCDReader
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object