public abstract class CellRevision
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static boolean |
ALLOW_SUBCELLS_IN_ICON |
ImmutableArcInst.Iterable |
arcs
A list of ArcInsts in this Cell.
|
ImmutableCell |
d
Cell persistent data.
|
protected static java.util.BitSet |
EMPTY_BITSET |
static ImmutableArrayList<CellRevision> |
EMPTY_LIST |
ImmutableExport.Iterable |
exports
An array of Exports on the Cell by chronological index.
|
ImmutableNodeInst.Iterable |
nodes
A list of NodeInsts in this Cell.
|
static CellRevision[] |
NULL_ARRAY |
protected static int[] |
NULL_INT_ARRAY |
Modifier and Type | Method and Description |
---|---|
void |
check()
Checks invariant of this CellRevision.
|
void |
checkConnectivity() |
ImmutableArcInst |
getArcById(int arcId)
Returns ImmutableArcInst by its arcId.
|
int |
getArcIndexByArcId(int arcId)
Returns sort order index of ImmutableArcInst by its arcId.
|
abstract java.util.List<ImmutableArcInst> |
getConnectionsOnNode(java.util.BitSet headEnds,
ImmutableNodeInst n)
Method to return a list of arcs connected to specified ImmutableNodeInst.
|
abstract java.util.List<ImmutableArcInst> |
getConnectionsOnPort(java.util.BitSet headEnds,
ImmutableNodeInst n,
PortProtoId portId)
Method to return a list of arcs connected to specified port of specified
ImmutableNodeInst.
|
abstract long |
getConnectivityMemorySize(ObjSize objSize,
boolean restore)
Compute memory consumption
|
ImmutableExport |
getExport(ExportId exportId)
Returns ImmutableExport by its export id.
|
int |
getExportIndexByExportId(ExportId exportId)
Returns sort order index of ImmutableExport by its export id.
|
abstract java.util.Iterator<ImmutableExport> |
getExportsOnNode(ImmutableNodeInst originalNode)
Method to return an Iterator over all ImmutableExports on specified
NodeInst.
|
abstract java.util.Iterator<ImmutableExport> |
getExportsOnPort(ImmutableNodeInst originalNode,
PortProtoId portId)
Method to return an Iterator over all ImmutableExports on specified port
of specified ImmutableNodeInst.
|
int |
getInstCount(CellUsage u)
For given CellUsage in this cell returns count of subcell instances.
|
int[] |
getInstCounts()
Returns subcell instance counts, indexed by CellUsage.indexInParent.
|
int |
getMaxArcId()
Returns maximum arcId used by arcs of this CellReversion.
|
int |
getMaxExportChronIndex()
Returns maximum chronIndex used by exports of this CellReversion.
|
int |
getMaxNodeId()
Returns maximum nodeId used by nodes of this CellReversion.
|
ImmutableNodeInst |
getNodeById(int nodeId)
Returns ImmutableNodeInst by its nodeId.
|
int |
getNodeIndexByNodeId(int nodeId)
Returns sort order index of ImmutableNodeInst by its nodeId.
|
abstract int |
getNumConnectionsOnNode(ImmutableNodeInst n)
Method to return the number of Connections on specified
ImmutableNodeInst.
|
abstract int |
getNumConnectionsOnPort(ImmutableNodeInst n,
PortProtoId portId)
Method to return the number of Connections on specified port of specified
ImmutableNodeInst.
|
abstract int |
getNumExportsOnNode(ImmutableNodeInst originalNode)
Method to return the number of Exports on specified NodeInst.
|
abstract int |
getNumExportsOnPort(ImmutableNodeInst originalNode,
PortProtoId portId)
Method to return the number of Exports on specified port of specified
ImmutableNodeInst.
|
long |
getOldConnectivityMemorySize(ObjSize objSize)
Compute memory consumption of old connectivity structurs.
|
static CellRevisionProvider |
getProvider() |
java.util.Set<TechId> |
getTechUsages()
Returns Set of Technologies used in this CellRevision
|
abstract boolean |
hasConnectionsOnNode(ImmutableNodeInst n)
Returns true of there are Connections on specified ImmutableNodeInst
|
abstract boolean |
hasConnectionsOnPort(ImmutableNodeInst n,
PortProtoId portId)
Returns true of there are Connections on specified port of specified
ImmutableNodeInst
|
abstract boolean |
hasExportsOnNode(ImmutableNodeInst originalNode)
Returns true of there are Exports on specified NodeInst.
|
abstract boolean |
hasExportsOnPort(ImmutableNodeInst originalNode,
PortProtoId portId)
Returns true of there are Exports on specified port of specified
ImmutableNodeInst.
|
boolean |
hasNodeWithId(int nodeId)
Returns true an ImmutableNodeInst with specified nodeId is contained in
this CellRevision.
|
protected static java.util.BitSet |
makeTechUsages(TechId techId) |
static CellRevision |
newInstance(ImmutableCell d)
Creates a new instance of CellRevision
|
boolean |
pinUseCount(ImmutableNodeInst pin)
Method to determine whether the display of specified pin NodeInst should
be supressed.
|
boolean |
sameExports(CellRevision thatRevision) |
java.lang.String |
toString() |
CellRevision |
with(ImmutableCell d,
ImmutableNodeInst[] nodesArray,
ImmutableArcInst[] arcsArray,
ImmutableExport[] exportsArray)
Creates a new instance of CellRevision which differs from this
CellRevision.
|
CellRevision |
withRevisionDate(long revisionDate)
Creates a new instance of CellRevision which differs from this
CellRevision by revision date.
|
public static boolean ALLOW_SUBCELLS_IN_ICON
public static final CellRevision[] NULL_ARRAY
public static final ImmutableArrayList<CellRevision> EMPTY_LIST
protected static final java.util.BitSet EMPTY_BITSET
protected static final int[] NULL_INT_ARRAY
public final ImmutableCell d
public final ImmutableNodeInst.Iterable nodes
public final ImmutableArcInst.Iterable arcs
public final ImmutableExport.Iterable exports
protected static java.util.BitSet makeTechUsages(TechId techId)
public static CellRevisionProvider getProvider()
public static CellRevision newInstance(ImmutableCell d)
public CellRevision withRevisionDate(long revisionDate)
revisionDate
- new revision date.public CellRevision with(ImmutableCell d, ImmutableNodeInst[] nodesArray, ImmutableArcInst[] arcsArray, ImmutableExport[] exportsArray)
d
- new persistent data of a cell.nodesArray
- new array of nodesarcsArray
- new array of arcsexportsArray
- new array of exportsjava.lang.IllegalArgumentException
- on invariant violation.ArrayOutOfBoundsException
- on some invariant violations.public ImmutableNodeInst getNodeById(int nodeId)
nodeId
- of ImmutableNodeInst.java.lang.IndexOutOfBoundsException
- if nodeId is negativepublic int getNodeIndexByNodeId(int nodeId)
nodeId
- of ImmutableNodeInst.public boolean hasNodeWithId(int nodeId)
nodeId
- specified nodeId.java.lang.IllegalArgumentException
- if nodeId is negativepublic int getMaxNodeId()
public ImmutableArcInst getArcById(int arcId)
arcId
- of ImmutableArcInst.java.lang.IndexOutOfBoundsException
- if arcId is negativepublic int getArcIndexByArcId(int arcId)
arcId
- of ImmutableArcInst.public int getMaxArcId()
public ImmutableExport getExport(ExportId exportId)
exportId
- id of export.public int getExportIndexByExportId(ExportId exportId)
exportId
- id of export.public int getMaxExportChronIndex()
public int[] getInstCounts()
public int getInstCount(CellUsage u)
u
- CellUsage.java.lang.IllegalArgumentException
- if CellUsage's parent is not this cell.public java.util.Set<TechId> getTechUsages()
public abstract boolean hasConnectionsOnNode(ImmutableNodeInst n)
n
- specified ImmutableNodeInstIllegalArgumetException
- if node inst is not linked to this
CellRevisionpublic abstract int getNumConnectionsOnNode(ImmutableNodeInst n)
n
- specified ImmutableNodeInstIllegalArgumetException
- if node inst is not linked to this
CellRevisionpublic abstract java.util.List<ImmutableArcInst> getConnectionsOnNode(java.util.BitSet headEnds, ImmutableNodeInst n)
headEnds
- true if i-th arc connects by head endn
- specified ImmutableNodeInstIllegalArgumetException
- if node inst is not linked to this
CellRevisionpublic abstract boolean hasConnectionsOnPort(ImmutableNodeInst n, PortProtoId portId)
n
- specified ImmutableNodeInstportId
- specified port or nulljava.lang.NullPointerException
- if n or portId is nullIllegalArgumetException
- if node inst is not linked to this
CellRevisionpublic abstract int getNumConnectionsOnPort(ImmutableNodeInst n, PortProtoId portId)
n
- specified ImmutableNodeInstportId
- specified port or nulljava.lang.NullPointerException
- if n or portId is nullIllegalArgumetException
- if node inst is not linked to this
CellRevisionpublic abstract java.util.List<ImmutableArcInst> getConnectionsOnPort(java.util.BitSet headEnds, ImmutableNodeInst n, PortProtoId portId)
headEnds
- true if i-th arc connects by head endn
- specified ImmutableNodeInstportId
- specified portjava.lang.NullPointerException
- if n or portId is nullIllegalArgumetException
- if node inst is not linked to this
CellRevisionpublic abstract boolean hasExportsOnNode(ImmutableNodeInst originalNode)
originalNode
- specified ImmutableNodeInst.IllegalArgumetException
- if node inst is not linked to this
CellRevisionpublic abstract int getNumExportsOnNode(ImmutableNodeInst originalNode)
originalNode
- specified ImmutableNodeInst.IllegalArgumetException
- if node inst is not linked to this
CellRevisionpublic abstract java.util.Iterator<ImmutableExport> getExportsOnNode(ImmutableNodeInst originalNode)
originalNode
- specified ImmutableNodeInst.IllegalArgumetException
- if node inst is not linked to this
CellRevisionpublic abstract boolean hasExportsOnPort(ImmutableNodeInst originalNode, PortProtoId portId)
originalNode
- specified ImmutableNodeInst.portId
- specified portjava.lang.NullPointerException
- if n or portId is nullIllegalArgumetException
- if node inst is not linked to this
CellRevisionpublic abstract int getNumExportsOnPort(ImmutableNodeInst originalNode, PortProtoId portId)
originalNode
- specified ImmutableNodeInst.portId
- specified portjava.lang.NullPointerException
- if n or portId is nullIllegalArgumetException
- if node inst is not linked to this
CellRevisionpublic abstract java.util.Iterator<ImmutableExport> getExportsOnPort(ImmutableNodeInst originalNode, PortProtoId portId)
originalNode
- specified ImmutableNodeInst.portId
- specified portjava.lang.NullPointerException
- if n or portId is nullIllegalArgumetException
- if node inst is not linked to this
CellRevisionpublic abstract long getConnectivityMemorySize(ObjSize objSize, boolean restore)
objSize
- ObjSize in this JVM.restore
- restore connectivity data i fnecessary.public long getOldConnectivityMemorySize(ObjSize objSize)
objSize
- ObjSize in this JVMpublic boolean pinUseCount(ImmutableNodeInst pin)
pin
- specified pin ImmutableNodeInstpublic void check()
java.lang.AssertionError
- if invariant is broken.public void checkConnectivity()
public boolean sameExports(CellRevision thatRevision)
public java.lang.String toString()
toString
in class java.lang.Object