jasi.sim.basic
Class AbstractSimArchive

java.lang.Object
  extended by jasi.sim.basic.AbstractSimArchive
Direct Known Subclasses:
StreamArchive, XMLArchive

public abstract class AbstractSimArchive
extends java.lang.Object

Base class for all simulation archives. In an instance of an archive the tables, simulation elements and events are saved. The extension should be used to differentiate between the various implementation.


Constructor Summary
AbstractSimArchive()
           
 
Method Summary
abstract  java.lang.String getExtension()
          Get the file extension of an archive.
 void read(java.lang.String file, AbstractSimKernel sim)
          Read this archive from a file.
abstract  void readElements()
          Read simulation elements from archive.
abstract  void readEvents()
          Read simulation events from archive.
abstract  void readFinish()
          Finish reading this archive from a file.
abstract  void readInit(AbstractSimKernel sim, java.lang.String file)
          Initialization of reading this archive, when imported from a file.
abstract  void readTables()
          Read condition tables from archive.
 void write(java.lang.String file, AbstractSimKernel sim)
          Write this archive to a file.
abstract  void writeElements()
          Write simulation elements into archive.
abstract  void writeEvents()
          Write simulation events into archive.
abstract  void writeFinish()
          Finish writing this archive to a file.
abstract  void writeInit(AbstractSimKernel sim, java.lang.String file)
          Initialization of writing this archive, when exported to a file.
abstract  void writeTables()
          Write condition tables into archive.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSimArchive

public AbstractSimArchive()
Method Detail

write

public final void write(java.lang.String file,
                        AbstractSimKernel sim)
Write this archive to a file.

Parameters:
file - The file name.
sim - The simulation instance.

writeInit

public abstract void writeInit(AbstractSimKernel sim,
                               java.lang.String file)
Initialization of writing this archive, when exported to a file.

Parameters:
sim - The simulation instance.
file - The file name.

writeTables

public abstract void writeTables()
Write condition tables into archive.


writeElements

public abstract void writeElements()
Write simulation elements into archive.


writeEvents

public abstract void writeEvents()
Write simulation events into archive.


writeFinish

public abstract void writeFinish()
Finish writing this archive to a file.


read

public final void read(java.lang.String file,
                       AbstractSimKernel sim)
Read this archive from a file.

Parameters:
file - The file name.
sim - The simulation instance.

readInit

public abstract void readInit(AbstractSimKernel sim,
                              java.lang.String file)
Initialization of reading this archive, when imported from a file.

Parameters:
sim - The simulation instance.
file - The file name.

readTables

public abstract void readTables()
Read condition tables from archive.


readElements

public abstract void readElements()
Read simulation elements from archive.


readEvents

public abstract void readEvents()
Read simulation events from archive.


readFinish

public abstract void readFinish()
Finish reading this archive from a file.


getExtension

public abstract java.lang.String getExtension()
Get the file extension of an archive.

Returns:
The archive file's extension.