com.sun.electric.tool.io.output
Class Geometry

java.lang.Object
  extended by com.sun.electric.tool.io.output.Output
      extended by com.sun.electric.tool.io.output.Geometry
Direct Known Subclasses:
CIF, GDS

public abstract class Geometry
extends Output

Base class for writing geometry to a file


Nested Class Summary
protected  class Geometry.CellGeom
          Class to store polygon geometry of a cell
protected static class Geometry.PolyWithGeom
          Class for managing polygons that are associated with geometry.
 class Geometry.Visitor
           
 
Nested classes/interfaces inherited from class com.sun.electric.tool.io.output.Output
Output.OutputPreferences, Output.WriteJELIB
 
Field Summary
protected  java.util.HashMap<Cell,Geometry.CellGeom> cellGeoms
          HashMap of all CellGeoms
protected  int numCells
          number of unique cells to process
protected  int numVisited
          number of unique cells processed
protected  Cell topCell
          top-level cell being processed
 
Fields inherited from class com.sun.electric.tool.io.output.Output
dataOutputStream, errorLogger, filePath, printWriter, quiet, stringWriter
 
Method Summary
protected abstract  void done()
          Abstract method called after traversal
static int getMaxHierDepth(Cell cell)
          get the max hierarchical depth of the hierarchy
protected  boolean includeGeometric()
          Overridable method to determine whether or not to include the original Geometric with a Poly
protected  boolean mergeGeom(int hierLevelsFromBottom)
          Overridable method to determine whether or not to merge geometry
protected abstract  void start()
          Abstract method called before hierarchy traversal
 boolean writeCell(Cell cell, VarContext context)
          Write cell to file
 boolean writeCell(Cell cell, VarContext context, Geometry.Visitor visitor)
          Write cell to file
protected abstract  void writeCellGeom(Geometry.CellGeom cellGeom)
          Abstract method to write CellGeom to disk
 
Methods inherited from class com.sun.electric.tool.io.output.Output
closeBinaryOutputStream, closeStringsOutputStream, closeTextOutputStream, emitCopyright, exportCellCommand, finishWrite, getAreaToPrint, getNumErrors, getNumWarnings, getOutputPreferences, openBinaryOutputStream, openStringsOutputStream, openTextOutputStream, reportError, reportWarning, saveJelib, setContinuationString, setOutputWidth, writeLibrary, writeLibrary, writePanicSnapshot, writeWidthLimited
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

numVisited

protected int numVisited
number of unique cells processed


numCells

protected int numCells
number of unique cells to process


topCell

protected Cell topCell
top-level cell being processed


cellGeoms

protected java.util.HashMap<Cell,Geometry.CellGeom> cellGeoms
HashMap of all CellGeoms

Method Detail

writeCell

public boolean writeCell(Cell cell,
                         VarContext context)
Write cell to file

Overrides:
writeCell in class Output
Parameters:
cell - the Cell to be written.
context - the VarContext of the cell (for parameter evaluation)
Returns:
true on error

writeCell

public boolean writeCell(Cell cell,
                         VarContext context,
                         Geometry.Visitor visitor)
Write cell to file

Returns:
true on error

start

protected abstract void start()
Abstract method called before hierarchy traversal


done

protected abstract void done()
Abstract method called after traversal


writeCellGeom

protected abstract void writeCellGeom(Geometry.CellGeom cellGeom)
Abstract method to write CellGeom to disk


mergeGeom

protected boolean mergeGeom(int hierLevelsFromBottom)
Overridable method to determine whether or not to merge geometry


includeGeometric

protected boolean includeGeometric()
Overridable method to determine whether or not to include the original Geometric with a Poly


getMaxHierDepth

public static int getMaxHierDepth(Cell cell)
get the max hierarchical depth of the hierarchy