|
|||||||||
| 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
public class 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)
Construct an EdifPrintWriter Object using the passed-in OutputStream as its output. |
|
EdifPrintWriter(java.lang.String outputFilename)
Construct an EdifPrintWriter Object that will write to the passed in String filename. |
|
| Method Summary | |
|---|---|
void |
decrIndent()
Decrement the amount of indenture. |
void |
incrIndent()
Increment the amount of indenture. |
static void |
printEdifEnvironment(java.lang.String filename,
EdifCell cell)
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)
Print the passed-in String object with the right amount of preceding indentation. |
void |
println()
Print the end of line character to the PrintWriter. |
void |
println(java.lang.String str)
Print out the passed-in string followed by the end of line character. |
void |
printlnIndent(java.lang.String str)
Print 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)
Print quotes around the passed in String object. |
| Methods inherited from class java.io.PrintWriter |
|---|
append, append, append, checkError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, 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 static final java.lang.String _endOfLineChar
private static final java.lang.String _indentString
private int _indenture
| 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
java.io.IOException| Method Detail |
|---|
public void decrIndent()
public void incrIndent()
public static void printEdifEnvironment(java.lang.String filename,
EdifCell cell)
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.IOExceptionpublic void printIndent(java.lang.String str)
str - The String object that will be printed preceded by
indentationpublic void println()
println in class java.io.PrintWriterpublic void println(java.lang.String str)
println in class java.io.PrintWriterstr - The String that will be written to the PrintWriter
followed by the end of line characterpublic void printlnIndent(java.lang.String str)
str - The String object that will be printed preceded by
indentation, and followed by the end of line characterpublic void printQuote(java.lang.String str)
str - The String object that will have quotes printed
around it
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||