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

java.lang.Object
  extended by com.sun.electric.tool.io.output.Output
      extended by com.sun.electric.tool.io.output.Geometry
          extended by com.sun.electric.tool.io.output.GDS

public class GDS
extends Geometry

This class writes files in GDS format.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.electric.tool.io.output.Geometry
Geometry.CellGeom, Geometry.PolyWithGeom, Geometry.Visitor
 
Nested classes/interfaces inherited from class com.sun.electric.tool.io.output.Output
Output.OutputCellInfo, Output.WriteJELIB
 
Field Summary
static java.lang.String concatStr
          separator string for lib + cell concatanated cell names
 
Fields inherited from class com.sun.electric.tool.io.output.Geometry
cellGeoms, numCells, numVisited, topCell
 
Fields inherited from class com.sun.electric.tool.io.output.Output
dataOutputStream, filePath, printWriter, quiet
 
Method Summary
static void buildUniqueNames(Cell cell, java.util.HashMap<Cell,java.lang.String> cellNames)
          Recursive method to add all cells in the hierarchy to the hashMap with unique names.
protected  void done()
          Abstract method called after traversal
 java.util.HashMap<Cell,java.lang.String> getCellNames()
          Get the name map.
protected  boolean includeGeometric()
          Method to determine whether or not to include the original Geometric with a Poly
static java.lang.String makeUniqueName(Cell cell, java.util.HashMap<Cell,java.lang.String> cellNames)
           
protected  boolean mergeGeom(int hierLevelsFromBottom)
          Method to determine whether or not to merge geometry.
 void outputDouble(double data)
          Method to write a GDSII representation of a double.
protected  void start()
          Abstract method called before hierarchy traversal
protected  void writeCellGeom(Geometry.CellGeom cellGeom)
          Method to write cellGeom
static GDS writeGDSFile(Cell cell, VarContext context, java.lang.String filePath)
          Main entry point for GDS output.
protected  void writeNodable(Nodable no)
           
protected  void writePoly(PolyBase poly, int layerNumber, int layerType)
           
 
Methods inherited from class com.sun.electric.tool.io.output.Geometry
getMaxHierDepth, writeCell, writeCell
 
Methods inherited from class com.sun.electric.tool.io.output.Output
closeBinaryOutputStream, closeTextOutputStream, emitCopyright, exportCellCommand, getAreaToPrint, openBinaryOutputStream, openTextOutputStream, saveJelib, setContinuationString, setOutputWidth, writeCell, writeLibrary, writePanicSnapshot, writeWidthLimited
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

concatStr

public static final java.lang.String concatStr
separator string for lib + cell concatanated cell names

See Also:
Constant Field Values
Method Detail

writeGDSFile

public static GDS writeGDSFile(Cell cell,
                               VarContext context,
                               java.lang.String filePath)
Main entry point for GDS output.

Parameters:
cell - the top-level cell to write.
context - the hierarchical context to the cell.
filePath - the disk file to create.

start

protected void start()
Description copied from class: Geometry
Abstract method called before hierarchy traversal

Specified by:
start in class Geometry

done

protected void done()
Description copied from class: Geometry
Abstract method called after traversal

Specified by:
done in class Geometry

writeCellGeom

protected void writeCellGeom(Geometry.CellGeom cellGeom)
Method to write cellGeom

Specified by:
writeCellGeom in class Geometry

mergeGeom

protected boolean mergeGeom(int hierLevelsFromBottom)
Method to determine whether or not to merge geometry.

Overrides:
mergeGeom in class Geometry

includeGeometric

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

Overrides:
includeGeometric in class Geometry

writePoly

protected void writePoly(PolyBase poly,
                         int layerNumber,
                         int layerType)

writeNodable

protected void writeNodable(Nodable no)

buildUniqueNames

public static void buildUniqueNames(Cell cell,
                                    java.util.HashMap<Cell,java.lang.String> cellNames)
Recursive method to add all cells in the hierarchy to the hashMap with unique names.

Parameters:
cell - the cell whose nodes and subnode cells will be given unique names.
cellNames - a hashmap, key: cell, value: unique name (String).

makeUniqueName

public static java.lang.String makeUniqueName(Cell cell,
                                              java.util.HashMap<Cell,java.lang.String> cellNames)

getCellNames

public java.util.HashMap<Cell,java.lang.String> getCellNames()
Get the name map. GDS output may mangle cell names because of all cells occupy the same name space (no libraries).


outputDouble

public void outputDouble(double data)
Method to write a GDSII representation of a double. New conversion code contributed by Tom Valine .

Parameters:
data - the double to process.