at.dms.kjc.spacedynamic
Class FileState

java.lang.Object
  extended by at.dms.kjc.spacedynamic.FileState
All Implemented Interfaces:
FlatVisitor, StreamGraphVisitor

public class FileState
extends Object
implements StreamGraphVisitor, FlatVisitor

Set up in the backend the various file readers or writers by creating the necessary devices and connecting them to the chip.

Author:
mgordon

Field Summary
 HashSet<Object> fileNodes
           
 boolean foundReader
           
 boolean foundWriter
           
 
Constructor Summary
FileState(SpdStreamGraph streamGraph)
           
 
Method Summary
 Collection<FileReaderDevice> getFileReaderDevs()
           
 FileWriterDevice getFileWriterDevice(FlatNode fw)
          get the FileWriterDevice that implements this SIRFileWriter.
 Collection<FileWriterDevice> getFileWriterDevs()
           
 boolean isConnectedToFileReader(RawTile tile)
           
 void visitNode(FlatNode node)
          If we have a file reader or writer, create the device and connect it to the raw chip
 void visitStaticStreamGraph(SpdStaticStreamGraph ssg)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

foundReader

public boolean foundReader

foundWriter

public boolean foundWriter

fileNodes

public HashSet<Object> fileNodes
Constructor Detail

FileState

public FileState(SpdStreamGraph streamGraph)
Method Detail

visitStaticStreamGraph

public void visitStaticStreamGraph(SpdStaticStreamGraph ssg)
Specified by:
visitStaticStreamGraph in interface StreamGraphVisitor

visitNode

public void visitNode(FlatNode node)
If we have a file reader or writer, create the device and connect it to the raw chip

Specified by:
visitNode in interface FlatVisitor
Parameters:
node - the node that is being currently visited.

getFileWriterDevice

public FileWriterDevice getFileWriterDevice(FlatNode fw)
get the FileWriterDevice that implements this SIRFileWriter.

Parameters:
fw -
Returns:
The FileWriterDevice

getFileWriterDevs

public Collection<FileWriterDevice> getFileWriterDevs()

getFileReaderDevs

public Collection<FileReaderDevice> getFileReaderDevs()

isConnectedToFileReader

public boolean isConnectedToFileReader(RawTile tile)