edu.colorado.cs.ns2.sys
Class GeneratorFileIO

java.lang.Object
  extended by edu.colorado.cs.ns2.sys.GeneratorFileIO
All Implemented Interfaces:
java.io.Serializable

public class GeneratorFileIO
extends java.lang.Object
implements java.io.Serializable

This class encapsulates all essential data structures such that it may be saved or opened via file I/O.

Author:
Kevin Bauer, Pushkar Sambhoos.
See Also:
Serialized Form

Field Summary
private  java.util.Vector<Drawable> myListDrawable
          The list of graphical shapes on the GUI.
private  int nextAgentId
          The next available agent identifier.
private static long serialVersionUID
          Default serial version UID.
private  SimulationData simData
          The simulation data internal representation.
 
Constructor Summary
GeneratorFileIO(java.util.Vector<Drawable> myListDrawable, SimulationData simData, int nextAgentId)
          Three-argument constructor.
 
Method Summary
 java.util.Vector<Drawable> getMyListDrawable()
          Returns a list of graphical shapes that can be displayed on the GUI.
 int getNextAgentId()
          Returns the next avaiable agent identifier.
 SimulationData getSimData()
          Returns the main simulation data structure.
 void setMyListDrawable(java.util.Vector<Drawable> myListDrawable)
          Sets the list of graphical shapes.
 void setNextAgentId(int nextAgentId)
          Sets the next available agent identifier.
 void setSimData(SimulationData simData)
          Sets the simulation data structure.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Default serial version UID.

See Also:
Constant Field Values

myListDrawable

private java.util.Vector<Drawable> myListDrawable
The list of graphical shapes on the GUI.


simData

private SimulationData simData
The simulation data internal representation.


nextAgentId

private int nextAgentId
The next available agent identifier.

Constructor Detail

GeneratorFileIO

public GeneratorFileIO(java.util.Vector<Drawable> myListDrawable,
                       SimulationData simData,
                       int nextAgentId)
Three-argument constructor.

Parameters:
myListDrawable - The list of graphical shapes to be displayed on the GUI.
simData - The main simulation data structure.
nextAgentId - The next available agent identifier to assign.
Method Detail

getMyListDrawable

public java.util.Vector<Drawable> getMyListDrawable()
Returns a list of graphical shapes that can be displayed on the GUI.

Returns:
A list of graphical shapes that can be displayed on the GUI.

setMyListDrawable

public void setMyListDrawable(java.util.Vector<Drawable> myListDrawable)
Sets the list of graphical shapes.

Parameters:
myListDrawable - A list of graphical shapes.

getSimData

public SimulationData getSimData()
Returns the main simulation data structure.

Returns:
The main simulation data structure.

setSimData

public void setSimData(SimulationData simData)
Sets the simulation data structure.

Parameters:
simData - A new simulation data structure.

getNextAgentId

public int getNextAgentId()
Returns the next avaiable agent identifier.

Returns:
The next avaiable agent identifier.

setNextAgentId

public void setNextAgentId(int nextAgentId)
Sets the next available agent identifier.

Parameters:
nextAgentId - The next available agent identifier.