public class Cell extends ElectricObject implements NodeProto, java.lang.Comparable<Cell>
It is possible to get all of the versions of the cell. A Cell knows about the most recent version of itself, which may be itself.
Cells also belong to CellGroup objects, which gather related cells together.
A Cell can have different views and versions, each of which is a cell. The library shown here has two cells (?gate? and ?twogate?), each of which has many views (layout, schematics, icon, vhdl) and versions:
Modifier and Type | Class and Description |
---|---|
static class |
Cell.CellGroup
A CellGroup contains a list of cells that are related.
|
static class |
Cell.FrameDescription
Class for creating a description of a frame around a schematic cell.
|
Modifier and Type | Field and Description |
---|---|
static Variable.Key |
CELL_TEXT_KEY
Variable key for text cell contents.
|
static Variable.Key |
CHARACTERISTIC_SPACING
Variable key for characteristic spacing for a cell.
|
static int |
INCELLLIBRARY
set if cell is part of a "cell library"
|
static Variable.Key |
MULTIPAGE_COUNT_KEY
Variable key for number of multipage pages.
|
static int |
NPILOCKED
set if instances in cell are locked
|
static int |
NPLOCKED
set if everything in cell is locked
|
static int |
TECEDITCELL
set if cell is from a technology-library
|
static Variable.Key |
TEXT_CELL_FONT_NAME
Variable key for font of text in textual cells.
|
static Variable.Key |
TEXT_CELL_FONT_SIZE
Variable key for size of text in textual cells.
|
static int |
WANTNEXPAND
set if instances should be expanded
|
Modifier and Type | Method and Description |
---|---|
Netlist |
acquireUserNetlist()
Returns the Netlist structure for this Cell, using current network options.
|
boolean |
addNode(NodeInst ni)
Method to add a new NodeInst to the cell.
|
void |
addNodeName(NodeInst ni)
Method to add a new NodeInst to the name index of this cell.
|
void |
addVar(Variable var)
Method to add a Variable on this Cell.
|
void |
adjustReferencePoint(double cX,
double cY)
Method adjust this cell when the reference point moves.
|
boolean |
alreadyCellCenter()
Method to determine whether this Cell has a cell center in it.
|
CellBackup |
backup() |
CellBackup |
backupUnsafe() |
boolean |
busNamesAllowed()
Method to return true if bus names are allowed in this Cell
|
protected void |
check()
Method to check invariants in this Cell.
|
int |
checkAndRepair(boolean repair,
ErrorLogger errorLogger)
Method to check and repair data structure errors in this Cell.
|
void |
checkCellDates()
Method to check the current cell to be sure that no subcells have a more recent date.
|
void |
clearAllLocked()
Method to set this Cell so that everything inside of it is not locked.
|
void |
clearInstancesLocked()
Method to set this Cell so that all instances inside of it are not locked.
|
void |
clearInTechnologyLibrary()
Method to set this Cell so that it is not part of a technology library.
|
void |
clearWantExpanded()
Method to set this Cell so that instances of it are "not expanded" by when created.
|
boolean |
compare(java.lang.Object obj,
java.lang.StringBuffer buffer)
Use to compare cells in Cross Library Check
|
int |
compareTo(Cell that)
Compares Cells by their Libraries and CellNames.
|
Cell |
contentsView()
Method to find the contents Cell associated with this Cell.
|
static Cell |
copyNodeProto(Cell fromCell,
Library toLib,
java.lang.String toName,
boolean useExisting)
Method to copy a Cell to any Library.
|
static Cell |
copyNodeProto(Cell fromCell,
Library toLib,
java.lang.String toName,
boolean useExisting,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> cellNamesToUse)
Method to copy a Cell to any Library.
|
static Cell |
copyNodeProtoUsingMapping(Cell fromCell,
Library toLib,
java.lang.String toName,
java.util.Map<NodeInst,NodeProto> nodePrototypes)
Method to copy a Cell to any Library, using a preset mapping of node prototypes.
|
void |
delVar(Variable.Key key)
Method to delete a Variable from this Cell.
|
java.lang.String |
describe(boolean withQuotes)
Method to describe this cell.
|
ArcInst |
findArc(java.lang.String name)
Method to find a named ArcInst on this Cell.
|
java.awt.geom.Rectangle2D |
findEssentialBounds()
Method to compute the "essential bounds" of this Cell.
|
Export |
findExport(Name name)
Method to find a named Export on this Cell.
|
Export |
findExport(java.lang.String name)
Method to find a named Export on this Cell.
|
NodeInst |
findNode(java.lang.String name)
Method to find a named NodeInst on this Cell.
|
static NodeProto |
findNodeProto(java.lang.String line)
Method to find the NodeProto with the given name.
|
PortProto |
findPortProto(Name name)
Method to find the PortProto that has a particular Name.
|
PortProto |
findPortProto(java.lang.String name)
Method to find the PortProto that has a particular name.
|
boolean |
findReferenceInCell(Library elib,
java.util.Set<Cell> set)
Method to fill a set with any nodes in this Cell that refer to an external library.
|
Poly[] |
getAllText(boolean hardToSelect,
EditWindow0 wnd)
Method to return a list of Polys that describes all text on this Cell.
|
ArcInst |
getArc(int arcIndex)
Method to return the ArcInst at specified position.
|
ArcInst |
getArcById(int arcId)
Method to return the ArcInst by its chronological index.
|
java.util.Iterator<ArcInst> |
getArcs()
Method to return an Iterator over all ArcInst objects in this Cell.
|
Name |
getBasename()
Method to return the basename for autonaming instances of this Cell.
|
ERectangle |
getBounds()
Method to return the bounds of this Cell.
|
Cell.CellGroup |
getCellGroup()
Method to get the CellGroup that this Cell is part of.
|
int |
getCellIndex()
Method to get the 0-based index of this Cell.
|
CellName |
getCellName()
Method to return the CellName object describing this Cell.
|
java.util.Date |
getCreationDate()
Method to get the creation date of this Cell.
|
ImmutableCell |
getD()
Returns persistent data of this Cell.
|
EDatabase |
getDatabase()
Returns database to which this Cell belongs.
|
double |
getDefHeight()
Method to the height of this Cell.
|
double |
getDefWidth()
Method to get the width of this Cell.
|
Cell |
getEquivalent()
Finds the Schematic Cell associated with this Icon Cell.
|
Export |
getExportChron(int chronIndex)
Method to return the Export at specified chronological index.
|
java.util.Iterator<Export> |
getExports()
Method to return an iterator over all Exports of this NodeProto.
|
PrimitiveNode.Function |
getFunction()
Method to return the function of this Cell.
|
CellId |
getId()
Method to return NodeProtoId of this NodeProto.
|
java.util.Iterator<NodeInst> |
getInstancesOf()
Method to return an iterator over all instances of this NodeProto.
|
Library |
getLibrary()
Method to get the library to which this Cell belongs.
|
CellBackup.Memoization |
getMemoization()
Returns data for size computation (connectivity etc).
|
java.lang.String |
getName()
Method to return the pure name of this Cell, without
any view or version information.
|
Netlist |
getNetlist()
Recompute the Netlist structure for this Cell whithout shortening resistors.
|
Netlist |
getNetlist(Netlist.ShortResistors shortResistors)
Recompute the Netlist structure for this Cell.
|
Cell |
getNewestVersion()
Method to return the most recent version of this Cell.
|
java.util.Iterator<Nodable> |
getNodables()
Method to return an Iterator over all NodeInst objects in this Cell.
|
NodeInst |
getNode(int nodeIndex)
Method to return the NodeInst at specified position.
|
Name |
getNodeAutoname(Name basename)
Method to return unique autoname for NodeInst in this cell.
|
NodeInst |
getNodeById(int nodeId)
Method to return the NodeInst by its chronological index.
|
java.util.Iterator<NodeInst> |
getNodes()
Method to return an Iterator over all NodeInst objects in this Cell.
|
int |
getNumArcs()
Method to return the number of ArcInst objects in this Cell.
|
int |
getNumMultiPages()
Method to return the number of pages in this multi-page Cell.
|
int |
getNumNodes()
Method to return the number of NodeInst objects in this Cell.
|
int |
getNumParameters()
Method to return the number of Parameters on this Cell.
|
int |
getNumPorts()
Method to return the number of PortProtos on this NodeProto.
|
int |
getNumUsagesIn()
Method to return the number of NodeUsage objects in this Cell.
|
int |
getNumVersions()
Method to return the number of different versions of this Cell.
|
Variable |
getParameter(int paramIndex)
Method to return the Parameter by its paramIndex.
|
Variable |
getParameter(Variable.Key key)
Method to return the Variable on this Cell with the given key
that is a parameter.
|
Variable |
getParameterOrVariable(Variable.Key key)
Method to return the Parameter or Variable on this Cell with a given key.
|
java.util.Iterator<Variable> |
getParameters()
Method to return an Iterator over all Variables marked as parameters on this Cell.
|
java.util.Iterator<Variable> |
getParametersAndVariables()
Method to return an Iterator over all Parameters and Variables on this Cell.
|
Export |
getPort(int portIndex)
Method to return the PortProto at specified position.
|
Export |
getPort(PortProtoId portProtoId)
Method to return the PortProto by thread-independent PortProtoId.
|
PortInst |
getPortInst(int nodeId,
PortProtoId portProtoId)
Method to return the PortInst by nodeId and PortProtoId.
|
java.util.Iterator<PortProto> |
getPorts()
Method to return an iterator over all PortProtos of this NodeProto.
|
SizeOffset |
getProtoSizeOffset()
Method to get the size offset of this Cell.
|
java.awt.geom.Rectangle2D |
getRelativeTextBounds(EditWindow0 wnd)
Method to return the bounds of all relative text in this Cell.
|
java.util.Date |
getRevisionDate()
Method to return the revision date of this Cell.
|
AbstractShapeBuilder.Shrinkage |
getShrinkage()
Returns data for arc shrinkage computation.
|
Technology |
getTechnology()
Method to return the Technology of this Cell.
|
int |
getTempInt()
Method to get the temporary integer on this Cell.
|
java.lang.String[] |
getTextViewContents()
Method to get the strings in this Cell.
|
Topology |
getTopology() |
int |
getUniqueNameIndex(java.lang.String prefix,
java.lang.Class cls,
int startingIndex)
Method to determine the index value which, when appended to a given string,
will generate a unique name in this Cell.
|
java.util.Iterator<CellUsage> |
getUsagesIn()
Method to return an Iterator over all CellUsage objects in this Cell.
|
java.util.Iterator<CellUsage> |
getUsagesOf()
Method to return an iterator over all usages of this NodeProto.
|
Netlist |
getUserNetlist()
Returns the Netlist structure for this Cell, using current network options.
|
int |
getVersion()
Method to return the version number of this Cell.
|
java.util.Iterator<Cell> |
getVersions()
Method to return an Iterator over the different versions of this Cell.
|
View |
getView()
Method to get this Cell's View.
|
void |
getZValues(double[] array)
Method to get MinZ and MaxZ of the cell calculated based on nodes.
|
boolean |
hasParameters()
Tells if this Cell has parameters.
|
Cell |
iconView()
Method to find the icon Cell associated with this Cell.
|
static Cell |
inCurrentThread(CellId cellId)
Returns a Cell by CellId.
|
boolean |
isAChildOf(Cell parent)
Method to determine whether this Cell is a child of a given parent Cell.
|
boolean |
isAllLocked()
Method to tell if the contents of this Cell are locked.
|
boolean |
isDeprecatedVariable(Variable.Key key)
Method to determine whether a variable key on Cell is deprecated.
|
boolean |
isExpanded(int nodeId)
Tells expanded status of NodeInst with specified nodeId.
|
boolean |
isIcon()
Method to determine whether this Cell is an icon Cell.
|
boolean |
isIconOf(Cell cell)
Method to determine whether this Cell is an icon of another Cell.
|
boolean |
isInstancesLocked()
Method to tell if the sub-instances in this Cell are locked.
|
static boolean |
isInstantiationRecursive(Cell toInstantiate,
Cell parent)
Determines whether an instantiation of cell
toInstantiate
into parent would be a rescursive operation. |
boolean |
isInTechnologyLibrary()
Method to tell if this Cell is part of a Technology Library.
|
boolean |
isInUse(java.lang.String action,
boolean quiet,
boolean sameCellGroupAlso)
Method to determine whether this Cell is in use anywhere.
|
boolean |
isLayout()
Method to return true if this Cell is a layout Cell.
|
boolean |
isLinked()
Returns true if this Cell is linked into database.
|
boolean |
isModified()
Method to tell if this Cell has been modified since last save to disk.
|
boolean |
isMultiPage()
Method to tell if this Cell is a multi-page drawing.
|
boolean |
isParam(Variable.Key varKey)
Method to return true if the Variable on this ElectricObject with given key is a parameter.
|
boolean |
isSchematic()
Method to return true if this Cell is a schematic Cell.
|
boolean |
isUniqueName(Name name,
java.lang.Class cls,
ElectricObject exclude)
Method to determine whether a name is unique in this Cell.
|
boolean |
isUniqueName(java.lang.String name,
java.lang.Class cls,
ElectricObject exclude)
Method to determine whether a name is unique in this Cell.
|
boolean |
isWantExpanded()
Method to tell if instances of it are "expanded" by when created.
|
void |
joinGroup(Cell otherCell)
Method to move this Cell together with all its versions and views
to the group of another Cell.
|
void |
kill()
Method to remove this node from all lists.
|
void |
killArcs(java.util.Set<ArcInst> killedArcs)
Method to unlink a set of these ArcInsts from this Cell.
|
void |
killExports(java.util.Set<Export> killedExports)
Method to unlink a set of these Export from this Cell.
|
void |
killNodes(java.util.Set<NodeInst> killedNodes)
Method to unlink a set of these NodeInsts from this Cell.
|
java.lang.String |
libDescribe()
Method to describe this cell.
|
void |
loadExpandStatus()
Method to load isExpanded status of subcell instances from Preferences.
|
int |
lowLevelGetUserbits()
Low-level method to get the user bits.
|
void |
lowLevelMadeRevision(long revisionDate,
java.lang.String userName,
CellRevision oldRevision)
Method to set this Cell's revision date and user name.
|
void |
lowLevelSetCreationDate(java.util.Date creationDate)
Method to set this Cell's creation date.
|
void |
lowLevelSetRevisionDate(java.util.Date revisionDate)
Method to set this Cell's last revision date.
|
void |
lowLevelSetUserbits(int userBits)
Low-level method to set the user bits.
|
static Cell |
makeInstance(Library lib,
java.lang.String name)
Factory method to create a new Cell.
|
Cell |
makeNewVersion()
Method to create a new version of this Cell.
|
static Cell |
newInstance(Library lib,
java.lang.String name)
Factory method to create a new Cell.
|
java.awt.geom.Point2D |
newVarOffset()
Method to compute the location of a new Variable on this Cell.
|
java.lang.String |
noLibDescribe()
Method to describe this cell.
|
boolean |
objInCell(ElectricObject eObj)
Method to tell whether an ElectricObject exists in this Cell.
|
Cell |
otherView(View view)
Method to find the Cell of a given View that is in the same group as this Cell.
|
void |
removeNodeName(NodeInst ni)
Method to remove an NodeInst from the name index of this cell.
|
IdMapper |
rename(java.lang.String newName,
java.lang.String newGroupName)
Method to rename this Cell.
|
void |
replaceSubcellsByExisting()
Method to replace subcells of a Cell by cells with similar name in Cell's
|
java.util.Iterator<RTBounds> |
searchIterator(java.awt.geom.Rectangle2D bounds)
Method to return an interator over all RTBounds objects in a given area of this Cell.
|
java.util.Iterator<RTBounds> |
searchIterator(java.awt.geom.Rectangle2D bounds,
boolean includeEdges)
Method to return an interator over all RTBounds objects in a given area of this Cell that allows
to ignore elements touching the area.
|
void |
setAllLocked()
Method to set this Cell so that everything inside of it is locked.
|
static void |
setAllowCircularLibraryDependences(boolean val)
Method to allow temporarily circular library dependences
(for example to read legacy libraries).
|
void |
setCellGroup(Cell.CellGroup cellGroup)
Method to put this Cell together with all its versions and views into the given CellGroup.
|
void |
setContentsModified()
Method to set if cell has been modified in the batch job.
|
void |
setDirty()
Method to indicate that the bounds of this Cell are incorrect because
a node or arc has been created, deleted, or modified.
|
void |
setExpanded(int nodeId,
boolean value)
Method to set expanded status of specified NodeInst.
|
void |
setGeomDirty()
Method to indicate that the bounds of this Cell are incorrect because
a node or arc may have been modified.
|
void |
setInCellLibrary()
Method to set this Cell so that it is part of a cell library.
|
void |
setInstancesLocked()
Method to set this Cell so that all instances inside of it are locked.
|
void |
setInTechnologyLibrary()
Method to set this Cell so that it is part of a technology library.
|
void |
setMultiPage(boolean multi)
Method to set the multi-page capability of this Cell.
|
void |
setTechnology(Technology tech)
Method to set the Technology to which this NodeProto belongs
It can only be called for Cells because PrimitiveNodes have fixed Technology membership.
|
void |
setTempInt(int tempInt)
Method to set an arbitrary integer in a temporary location on this Cell.
|
void |
setTextDescriptor(Variable.Key varKey,
TextDescriptor td)
Updates the TextDescriptor on this Cell selected by varKey.
|
void |
setTextViewContents(java.lang.String[] strings)
Method to set the strings in this Cell.
|
void |
setTopologyModified() |
IdMapper |
setView(View newView)
Method to change the view of this Cell.
|
void |
setWantExpanded()
Method to set this Cell so that instances of it are "expanded" by when created.
|
java.lang.String |
toString()
Returns a printable version of this Cell.
|
void |
updatePortInsts(int[] pattern)
Update PortInsts of all instances of this Cell accoding to pattern.
|
Cell |
whichCell()
Method to determine the appropriate Cell associated with this ElectricObject.
|
addDisplayableVariables, checkChanging, checkExamine, checkUndoing, computeTextPoly, copyTextDescriptorFrom, copyVarsFrom, getArtwork, getCode, getDisplayableVariables, getEditingPreferences, getGeneric, getInfo, getMutableTextDescriptor, getNumVariables, getParameterOrVariable, getPolyList, getSchematics, getTech, getTechPool, getTextBounds, getTextDescriptor, getVar, getVar, getVariables, getVarValue, getVarValue, isDatabaseObject, newDisplayVar, newVar, newVar, newVar, newVar, numDisplayableVariables, renameVar, renameVar, setOff, uniqueObjectName, uniqueObjectName, updateVar, updateVarCode, updateVarText
public static final Variable.Key CHARACTERISTIC_SPACING
public static final Variable.Key CELL_TEXT_KEY
public static final Variable.Key MULTIPAGE_COUNT_KEY
public static final Variable.Key TEXT_CELL_FONT_NAME
public static final Variable.Key TEXT_CELL_FONT_SIZE
public static final int WANTNEXPAND
public static final int NPLOCKED
public static final int NPILOCKED
public static final int INCELLLIBRARY
public static final int TECEDITCELL
public static Cell makeInstance(Library lib, java.lang.String name)
lib
- the Library in which to place this cell.name
- the name of this cell.
Cell names may not contain unprintable characters, spaces, tabs, a colon (:), semicolon (;) or curly braces ({}).
However, the name can be fully qualified with version and view information.
For example, "foo;2{sch}".public static Cell newInstance(Library lib, java.lang.String name)
lib
- the Library in which to place this cell.name
- the name of this cell.
Cell names may not contain unprintable characters, spaces, tabs, a colon (:), semicolon (;) or curly braces ({}).
However, the name can be fully qualified with version and view information.
For example, "foo;2{sch}".public void kill()
public static Cell copyNodeProto(Cell fromCell, Library toLib, java.lang.String toName, boolean useExisting)
fromCell
- the Cell to copy.toLib
- the Library to copy it to.toName
- the name of the Cell in the destination Library.
If the destination library is the same as the original Cell's library and the new name is the same
as the old name, a new version is made.useExisting
- true to use existing subcell instances if they exist in the destination Library.public static Cell copyNodeProto(Cell fromCell, Library toLib, java.lang.String toName, boolean useExisting, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> cellNamesToUse)
fromCell
- the Cell to copy.toLib
- the Library to copy it to.toName
- the name of the Cell in the destination Library.
If the destination library is the same as the original Cell's library and the new name is the same
as the old name, a new version is made.useExisting
- true to use existing subcell instances if they exist in the destination Library.cellNamesToUse
- a map that disambiguates cell names when they clash in different original libraries.
The main key is an old cell name, and the value for that key is a map of library names to new cell names.
So, for example, if libraries "A" and "B" both have a cell called "X", then existing.get("X").get("A") is "X" but
existing.get(X").get("B") is "X_1" which disambiguates the cell names in the destination library. The map may be null.public static Cell copyNodeProtoUsingMapping(Cell fromCell, Library toLib, java.lang.String toName, java.util.Map<NodeInst,NodeProto> nodePrototypes)
fromCell
- the Cell to copy.toLib
- the Library to copy it to.
If the destination library is the same as the original Cell's library, a new version is made.toName
- the name of the Cell in the destination Library.nodePrototypes
- a HashMap from NodeInsts in the source Cell to proper NodeProtos to use in the new Cell.public void replaceSubcellsByExisting()
public IdMapper rename(java.lang.String newName, java.lang.String newGroupName)
newName
- the new name of this cell.newGroupName
- the name of cell in a group to put the rename cell to.public int lowLevelGetUserbits()
public void lowLevelSetUserbits(int userBits)
userBits
- the new "user bits".public CellBackup backup()
public CellBackup backupUnsafe()
public CellBackup.Memoization getMemoization()
public AbstractShapeBuilder.Shrinkage getShrinkage()
public Topology getTopology()
public double getDefWidth()
getDefWidth
in interface NodeProto
public double getDefHeight()
getDefHeight
in interface NodeProto
public SizeOffset getProtoSizeOffset()
getProtoSizeOffset
in interface NodeProto
public void setDirty()
public void setGeomDirty()
public java.util.Iterator<RTBounds> searchIterator(java.awt.geom.Rectangle2D bounds)
bounds
- the specified area to search.public java.util.Iterator<RTBounds> searchIterator(java.awt.geom.Rectangle2D bounds, boolean includeEdges)
bounds
- the specified area to search.includeEdges
- true if RTBounds objects along edges are considered in.public ERectangle getBounds()
public java.awt.geom.Rectangle2D findEssentialBounds()
public boolean alreadyCellCenter()
public void adjustReferencePoint(double cX, double cY)
cX
- coordinate X of new center.cY
- coordinate Y of new center.public java.util.Iterator<NodeInst> getNodes()
public java.util.Iterator<Nodable> getNodables()
public int getNumNodes()
public final NodeInst getNode(int nodeIndex)
nodeIndex
- specified position of NodeInst.public NodeInst getNodeById(int nodeId)
nodeId
- chronological index of NodeInst.public boolean isExpanded(int nodeId)
public void setExpanded(int nodeId, boolean value)
nodeId
- specified nodeIdvalue
- true if NodeInst is expanded.public PortInst getPortInst(int nodeId, PortProtoId portProtoId)
nodeId
- specified NodeId.portProtoId
- public java.util.Iterator<CellUsage> getUsagesIn()
public int getNumUsagesIn()
public NodeInst findNode(java.lang.String name)
name
- the name of the NodeInst.public void killNodes(java.util.Set<NodeInst> killedNodes)
killedNodes
- a set of NodeInsts to kill.public static void setAllowCircularLibraryDependences(boolean val)
val
- true allows circular dependencies.public boolean addNode(NodeInst ni)
ni
- the NodeInst to be included in the cell.public void addNodeName(NodeInst ni)
ni
- the NodeInst to be included tp the name index in the cell.public Name getNodeAutoname(Name basename)
basename
- base name of autonamepublic void removeNodeName(NodeInst ni)
ni
- the NodeInst to be removed from the cell.public java.util.Iterator<ArcInst> getArcs()
public int getNumArcs()
public final ArcInst getArc(int arcIndex)
arcIndex
- specified position of ArcInst.public ArcInst getArcById(int arcId)
arcId
- chronological index of ArcInst.public ArcInst findArc(java.lang.String name)
name
- the name of the ArcInst.public void killArcs(java.util.Set<ArcInst> killedArcs)
killedArcs
- a set of ArcInsts to kill.public void updatePortInsts(int[] pattern)
pattern
- array with elements describing new PortInsts.public void killExports(java.util.Set<Export> killedExports)
killedExports
- a set of Exports to kill.public PortProto findPortProto(java.lang.String name)
findPortProto
in interface NodeProto
public PortProto findPortProto(Name name)
findPortProto
in interface NodeProto
public java.util.Iterator<PortProto> getPorts()
public java.util.Iterator<Export> getExports()
public int getNumPorts()
getNumPorts
in interface NodeProto
public Export getPort(int portIndex)
public Export getPort(PortProtoId portProtoId)
public Export getExportChron(int chronIndex)
chronIndex
- specified chronological index of Export.public Export findExport(java.lang.String name)
name
- the name of the export.public Export findExport(Name name)
name
- the Name of the export.public CellName getCellName()
public java.lang.String getName()
public java.lang.String describe(boolean withQuotes)
public java.lang.String libDescribe()
public java.lang.String noLibDescribe()
public static NodeProto findNodeProto(java.lang.String line)
line
- the name of the NodeProto.public java.lang.String[] getTextViewContents()
public void setTextViewContents(java.lang.String[] strings)
strings
- an array of Strings that define this Cell.public Variable getParameter(Variable.Key key)
key
- the key of the variablepublic java.util.Iterator<Variable> getParameters()
public boolean hasParameters()
public int getNumParameters()
public Variable getParameter(int paramIndex)
paramIndex
- index of Parameter.ArrayIndexOutOfBoundesException
- if paramIndex out of bounds.public boolean isParam(Variable.Key varKey)
isParam
in class ElectricObject
varKey
- key to testpublic Poly[] getAllText(boolean hardToSelect, EditWindow0 wnd)
hardToSelect
- is true if considering hard-to-select text.wnd
- the window in which the text will be drawn.public java.awt.geom.Rectangle2D getRelativeTextBounds(EditWindow0 wnd)
wnd
- the EditWindow0 in which this Cell is being displayed.public Name getBasename()
public int getUniqueNameIndex(java.lang.String prefix, java.lang.Class cls, int startingIndex)
prefix
- the start of the string.cls
- the type of object being examined.startingIndex
- the starting value to append to the string.public boolean isUniqueName(java.lang.String name, java.lang.Class cls, ElectricObject exclude)
name
- the Name being tested to see if it is unique.cls
- the type of object being examined.
The only classes that can be examined are PortProto, NodeInst, and ArcInst.exclude
- an object that should not be considered in this test (null to ignore the exclusion).public boolean isUniqueName(Name name, java.lang.Class cls, ElectricObject exclude)
name
- the Name being tested to see if it is unique.cls
- the type of object being examined.
The only classes that can be examined are PortProto, NodeInst, and ArcInst.exclude
- an object that should not be considered in this test (null to ignore the exclusion).public boolean isDeprecatedVariable(Variable.Key key)
isDeprecatedVariable
in class ElectricObject
key
- the key of the variable.public java.awt.geom.Point2D newVarOffset()
public java.lang.String toString()
toString
in class ElectricObject
public ImmutableCell getD()
getD
in class ElectricObject
public void addVar(Variable var)
addVar
in class ElectricObject
var
- Variable to add.public void delVar(Variable.Key key)
delVar
in class ElectricObject
key
- the key of the Variable to delete.public Variable getParameterOrVariable(Variable.Key key)
getParameterOrVariable
in class ElectricObject
key
- the key of the Parameter or Variable.java.lang.NullPointerException
- if key is nullpublic java.util.Iterator<Variable> getParametersAndVariables()
getParametersAndVariables
in class ElectricObject
public void setTextDescriptor(Variable.Key varKey, TextDescriptor td)
setTextDescriptor
in class ElectricObject
varKey
- key of variable or special key.td
- new value TextDescriptorpublic CellId getId()
public static Cell inCurrentThread(CellId cellId)
cellId
- CellId to find.public java.util.Iterator<CellUsage> getUsagesOf()
public java.util.Iterator<NodeInst> getInstancesOf()
public static boolean isInstantiationRecursive(Cell toInstantiate, Cell parent)
toInstantiate
into parent
would be a rescursive operation.toInstantiate
- the cell to instantiateparent
- the cell in which to create the instancepublic boolean isAChildOf(Cell parent)
isInstantiationRecursive
instead. This method *only* does what is it says it does: it checks if this cell
is currently instantiated as a child of 'parent' cell.parent
- the parent cell being examined.public boolean isInUse(java.lang.String action, boolean quiet, boolean sameCellGroupAlso)
action
- a description of the intended action (i.e. "delete").quiet
- true not to warn the user of the cell being used.sameCellGroupAlso
- public Cell makeNewVersion()
public int getVersion()
public int getNumVersions()
public java.util.Iterator<Cell> getVersions()
public Cell getNewestVersion()
public Cell.CellGroup getCellGroup()
public void joinGroup(Cell otherCell)
otherCell
- the other cell whose group this Cell should join.public void setCellGroup(Cell.CellGroup cellGroup)
cellGroup
- the CellGroup that this cell belongs to or null to put int own cell grouppublic View getView()
public IdMapper setView(View newView)
newView
- the new View.public boolean isIcon()
public boolean isIconOf(Cell cell)
cell
- the other cell which this may be an icon of.public boolean isSchematic()
public boolean busNamesAllowed()
public boolean isLayout()
public int getNumMultiPages()
public Cell contentsView()
public Cell iconView()
public Cell otherView(View view)
view
- the View of the other Cell.public Netlist getNetlist()
NetworkTool.NetlistNotReady
- if called from GUI thread and change Job hasn't prepared Netlist yetpublic Netlist getNetlist(Netlist.ShortResistors shortResistors)
shortResistors
- short resistors mode of Netlist.NetworkTool.NetlistNotReady
- if called from GUI thread and change Job hasn't prepared Netlist yetpublic Netlist getUserNetlist()
public Netlist acquireUserNetlist()
public java.util.Date getCreationDate()
public void lowLevelSetCreationDate(java.util.Date creationDate)
creationDate
- the date of this Cell's creation.public java.util.Date getRevisionDate()
public void lowLevelSetRevisionDate(java.util.Date revisionDate)
revisionDate
- the date of this Cell's last revision.public void lowLevelMadeRevision(long revisionDate, java.lang.String userName, CellRevision oldRevision)
public void checkCellDates()
public void setWantExpanded()
public void clearWantExpanded()
public boolean isWantExpanded()
public PrimitiveNode.Function getFunction()
getFunction
in interface NodeProto
public void setAllLocked()
public void clearAllLocked()
public boolean isAllLocked()
public void setInstancesLocked()
public void clearInstancesLocked()
public boolean isInstancesLocked()
public void setInCellLibrary()
public void setInTechnologyLibrary()
public void clearInTechnologyLibrary()
public boolean isInTechnologyLibrary()
public boolean isModified()
public void setTopologyModified()
public void setContentsModified()
public void loadExpandStatus()
public void setMultiPage(boolean multi)
multi
- true to make this cell multi-page.public boolean isMultiPage()
public boolean isLinked()
isLinked
in class ElectricObject
public EDatabase getDatabase()
getDatabase
in class ElectricObject
public int checkAndRepair(boolean repair, ErrorLogger errorLogger)
protected void check()
check
in class ElectricObject
java.lang.AssertionError
- if invariants are not validpublic boolean objInCell(ElectricObject eObj)
eObj
- the ElectricObject in questionpublic final int getCellIndex()
public void setTempInt(int tempInt)
tempInt
- the integer to be set on this Cell.public int getTempInt()
public Cell whichCell()
whichCell
in class ElectricObject
public Library getLibrary()
public Technology getTechnology()
getTechnology
in interface NodeProto
public void setTechnology(Technology tech)
tech
- the new technology for this NodeProto (Cell).public Cell getEquivalent()
public boolean compare(java.lang.Object obj, java.lang.StringBuffer buffer)
obj
- Object to compare tobuffer
- To store comparison messages in case of failurepublic int compareTo(Cell that)
compareTo
in interface java.lang.Comparable<Cell>
that
- the other Cell.public void getZValues(double[] array)
array
- array[0] is minZ and array[1] is maxpublic boolean findReferenceInCell(Library elib, java.util.Set<Cell> set)
elib
- the external library being considered.set
- the set being filled.