|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.electric.tool.io.output.Output
public class Output
This class manages writing files in different formats. The class is subclassed by the different file writers.
Nested Class Summary | |
---|---|
static class |
Output.OutputCellInfo
Class to define cell information during output. |
static class |
Output.WriteJELIB
Class to write a library in a CHANGE Job. |
Field Summary | |
---|---|
protected java.io.DataOutputStream |
dataOutputStream
for writing binary files |
protected java.lang.String |
filePath
file path |
protected java.io.PrintWriter |
printWriter
for writing text files |
protected boolean |
quiet
True to write with less information displayed |
protected java.io.StringWriter |
stringWriter
for writing text arrays |
Constructor Summary | |
---|---|
Output()
|
Method Summary | |
---|---|
protected boolean |
closeBinaryOutputStream()
Close output for writing binary to a file. |
protected java.util.List<java.lang.String> |
closeStringsOutputStream()
Close output for collecting a list of strings. |
protected boolean |
closeTextOutputStream()
Close output for writing text to a file. |
protected void |
emitCopyright(java.lang.String prefix,
java.lang.String postfix)
Method to write copyright header information to the output. |
static void |
exportCellCommand(Cell cell,
VarContext context,
java.lang.String filePath,
FileType type,
java.util.List<PolyBase> override)
This is the non-interactive version of exportCellCommand |
static java.awt.geom.Rectangle2D |
getAreaToPrint(Cell cell,
boolean reduce,
EditWindow_ wnd)
Method to determine the area of a cell that is to be printed. |
protected boolean |
openBinaryOutputStream(java.lang.String filePath)
Opens output for writing binary files. |
protected void |
openStringsOutputStream()
Open output for collecting a list of strings. |
protected boolean |
openTextOutputStream(java.lang.String filePath)
Open output for writing text to a file. |
static boolean |
saveJelib(java.lang.String newName,
Library lib)
Method to write an entire Library in JELIB format. |
protected void |
setContinuationString(java.lang.String str)
Method to set the string that will be emitted at the start of a "continuation line". |
protected void |
setOutputWidth(int width,
boolean strict)
Method to set the size of a line of output. |
protected boolean |
writeCell(Cell cell,
VarContext context)
Method to write a cell. |
static void |
writeCell(Cell cell,
VarContext context,
java.lang.String filePath,
FileType type,
java.util.List<PolyBase> override)
Method to write a Cell to a file with a particular format. |
static boolean |
writeLibrary(Library lib,
FileType type,
boolean compatibleWith6,
boolean quiet,
boolean delibHeaderOnly)
Method to write an entire Library with a particular format. |
static boolean |
writePanicSnapshot(Snapshot panicSnapshot,
java.io.File panicDir,
boolean oldRevision)
Method to write all Libraries in Snapsht into a panic directory. |
protected void |
writeWidthLimited(java.lang.String str)
Method to add a string to the output, limited by the maximum width of an output line. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String filePath
protected java.io.PrintWriter printWriter
protected java.io.StringWriter stringWriter
protected java.io.DataOutputStream dataOutputStream
protected boolean quiet
Constructor Detail |
---|
public Output()
Method Detail |
---|
public static void exportCellCommand(Cell cell, VarContext context, java.lang.String filePath, FileType type, java.util.List<PolyBase> override)
cell
- the Cell to be written.context
- the VarContext of the Cell (its position in the hierarchy above it).filePath
- the path to the disk file to be written.type
- the format of the output file.override
- a list of Polys to draw instead of the cell contents.protected boolean writeCell(Cell cell, VarContext context)
cell
- the Cell to be written.context
- the VarContext of the cell (for parameter evaluation)
public static boolean writePanicSnapshot(Snapshot panicSnapshot, java.io.File panicDir, boolean oldRevision)
panicSnapshot
- Snapshot to save.panicDir
- panic directory to save.
public static boolean saveJelib(java.lang.String newName, Library lib)
newName
- name which is used to prepare file name of the library.lib
- library to savepublic static boolean writeLibrary(Library lib, FileType type, boolean compatibleWith6, boolean quiet, boolean delibHeaderOnly)
lib
- the Library to be written.type
- the format of the output file.compatibleWith6
- true to write a library that is compatible with version 6 Electric.quiet
- true to save with less information displayed.delibHeaderOnly
- true to write only the header for a DELIB type library
public static void writeCell(Cell cell, VarContext context, java.lang.String filePath, FileType type, java.util.List<PolyBase> override)
cell
- the Cell to be written.context
- the VarContext of the Cell (its position in the hierarchy above it).filePath
- the path to the disk file to be written.type
- the format of the output file.override
- a list of overriding polygons to write.
NOTE: Keep public for regressionsprotected boolean openBinaryOutputStream(java.lang.String filePath)
filePath
- the name of the file.
protected boolean closeBinaryOutputStream()
protected boolean openTextOutputStream(java.lang.String filePath)
filePath
- the name of the file.
protected boolean closeTextOutputStream()
protected void openStringsOutputStream()
protected java.util.List<java.lang.String> closeStringsOutputStream()
protected void emitCopyright(java.lang.String prefix, java.lang.String postfix)
prefix
- the characters that start a line of commented output.postfix
- the characters that end a line of commented output.protected void setOutputWidth(int width, boolean strict)
width
- the maximum number of characters on a line of output (default is 80).strict
- true to strictly enforce the line-width limit, even if it means breaking
a symbol in the middle. When false, very long names may exceed the width limit.protected void setContinuationString(java.lang.String str)
str
- the string that will be emitted at the start of a "continuation line".protected void writeWidthLimited(java.lang.String str)
str
- the string to add to the output.public static java.awt.geom.Rectangle2D getAreaToPrint(Cell cell, boolean reduce, EditWindow_ wnd)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |