|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.Writer
java.io.PrintWriter
byucc.edif.EdifPrintWriter
Used for generating valid Edif text output. This class extends PrintWriter but also contains a number of convenience methods for properly formatting Edif output.
This class keeps track of the indentation during formatted
printing. An integer value (_indenture)
keeps track of the indentation level and the _indentString is used as the String printed for
each level of indentation.
To Do:
Algorithm for determining the minimum set of library cells required for a given top-level cell:
| Field Summary | |
private static java.lang.String |
_endOfLineChar
Contains the endOfLineChar. |
private static java.lang.String |
_indentString
Contains the indent String. |
private int |
_indenture
Contains the amount of indenture. |
| Fields inherited from class java.io.PrintWriter |
out |
| Fields inherited from class java.io.Writer |
lock |
| Constructor Summary | |
EdifPrintWriter(java.io.OutputStream out)
Constructs an EdifPrintWriter Object using the passed-in OutputStream as its output. |
|
EdifPrintWriter(java.lang.String outputFilename)
Constructs an EdifPrintWriter Object that will write to the passed in String filename. |
|
| Method Summary | |
void |
decrIndent()
Decrements the amount of indenture. |
void |
incrIndent()
Increments the amount of indenture. |
static void |
printEdifEnvironment(java.lang.String filename,
EdifCell cell,
EdifEnvironment subFile)
This method will create a new Edif file for a given EdifCell object, and print it to the passed-in filename. |
void |
printIndent(java.lang.String str)
Prints the passed-in String object with the right amount of preceding indentation. |
void |
println()
Prints the end of line character to the PrintWriter. |
void |
println(java.lang.String str)
Prints out the passed-in string followed by the end of line character. |
void |
printlnIndent(java.lang.String str)
Prints the passed-in String object with the right amount of preceding indentation, followed by the end of line characther. |
void |
printQuote(java.lang.String str)
Prints quotes around the passed in String object. |
| Methods inherited from class java.io.PrintWriter |
checkError, close, flush, print, print, print, print, print, print, print, print, print, println, println, println, println, println, println, println, println, setError, write, write, write, write, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private int _indenture
private static final java.lang.String _indentString
private static final java.lang.String _endOfLineChar
| Constructor Detail |
public EdifPrintWriter(java.io.OutputStream out)
out - The OutputStream Object that this EdifPrintWriter
Object will write to
public EdifPrintWriter(java.lang.String outputFilename)
throws java.io.IOException
outputFilename - The file that this EdifPrintWriter Object
will write to| Method Detail |
public void decrIndent()
public void incrIndent()
public void printQuote(java.lang.String str)
str - The String object that will have quotes printed
around itpublic void println(java.lang.String str)
str - The String that will be written to the PrintWriter
followed by the end of line characterpublic void println()
public void printIndent(java.lang.String str)
str - The String object that will be printed preceded by
indentationpublic void printlnIndent(java.lang.String str)
str - The String object that will be printed preceded by
indentation, and followed by the end of line character
public static void printEdifEnvironment(java.lang.String filename,
EdifCell cell,
EdifEnvironment subFile)
throws java.io.IOException
filename - The name of the file to generatecell - The EdifCell object that is to be put into the
top-level of the generated Edif file.subFile - The EdifEnvironment object that owns the cell.
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||