at.dms.kjc.slicegraph
Class FileInputContent

java.lang.Object
  extended by at.dms.kjc.slicegraph.FilterContent
      extended by at.dms.kjc.slicegraph.PredefinedContent
          extended by at.dms.kjc.slicegraph.InputContent
              extended by at.dms.kjc.slicegraph.FileInputContent
All Implemented Interfaces:
SIRCodeUnit

public class FileInputContent
extends InputContent

Predefined FilterContent for file input, expands to implement a FileReader.

Author:
jasperln

Field Summary
 
Fields inherited from class at.dms.kjc.slicegraph.FilterContent
initFunction, inputType, my_unique_ID, outputType, prework, steady
 
Constructor Summary
FileInputContent(FileInputContent content)
          Copy constructor for FileInputContent.
FileInputContent(SIRFileReader filter)
          Construct FileInputContent from SIRFileReader.
FileInputContent(UnflatFilter unflat)
          Construct FileInputContent from UnflatFilter.
 
Method Summary
 void createContent()
          Create kopi code that when translated to C will manipulate the file.
 String getFileName()
          Returns filename of FileInputContent.
 CType getType()
          Return the type of the file reader
 boolean isFP()
          Returns if output format of file is floating point.
 
Methods inherited from class at.dms.kjc.slicegraph.FilterContent
addAField, addAMethod, addField, addFields, addMethod, addMethods, getArray, getBegin, getConstant, getEnd, getFields, getInit, getInitMult, getInitWork, getInputType, getMethods, getName, getOutputType, getPeek, getPeekInt, getPopCount, getPopInt, getPos, getPrework, getPreworkPeek, getPreworkPop, getPreworkPush, getPushInt, getSteadyList, getSteadyMult, getTotal, getWork, initItemsNeeded, initItemsPushed, isLinear, isTwoStage, multSteadyMult, setArray, setBegin, setEnd, setFields, setInitMult, setMethods, setPos, setPrework, setSteadyMult, setTheMethods, setTotal, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileInputContent

public FileInputContent(FileInputContent content)
Copy constructor for FileInputContent.

Parameters:
content - The FileInputContent to copy.

FileInputContent

public FileInputContent(SIRFileReader filter)
Construct FileInputContent from SIRFileReader.

Parameters:
filter - The SIRFileReader used to contruct the FileInputContent.

FileInputContent

public FileInputContent(UnflatFilter unflat)
Construct FileInputContent from UnflatFilter.

Parameters:
unflat - The UnflatFilter used to contruct the FileInputContent.
Method Detail

getFileName

public String getFileName()
Returns filename of FileInputContent.


isFP

public boolean isFP()
Returns if output format of file is floating point.


getType

public CType getType()
Return the type of the file reader

Returns:
The type.

createContent

public void createContent()
Create kopi code that when translated to C will manipulate the file. The C file will need to include current version handles int and floating point only. Should be expanded to handle structs and arrays.

Specified by:
createContent in class InputContent