com.sun.electric.database
Class CellBackup

java.lang.Object
  extended by com.sun.electric.database.CellBackup

public class CellBackup
extends java.lang.Object

CellBackup is a pair of CellRevision and TechPool. It caches data that can be calculated when Technology is already known, but subcells are unknown.


Nested Class Summary
 class CellBackup.Memoization
          Class which memoizes data for size computation (connectivity etc).
 
Field Summary
 CellRevision cellRevision
          Cell data.
static ImmutableArrayList<CellBackup> EMPTY_LIST
           
 boolean modified
          "Modified" flag of the Cell.
static CellBackup[] NULL_ARRAY
           
 TechPool techPool
          Technologies mapping
 
Constructor Summary
CellBackup(ImmutableCell d, TechPool techPool)
          Creates a new instance of CellBackup
 
Method Summary
 void check()
          Checks invariant of this CellBackup.
 ERectangle computePrimitiveBounds()
           
 CellBackup.Memoization getMemoization()
          Returns data for size computation (connectivity etc).
 ERectangle getPrimitiveBounds()
          Returns bounds of all primitive arcs in this Cell or null if there are not primitives.
 AbstractShapeBuilder.Shrinkage getShrinkage()
          Returns data for arc shrinkage computation.
 java.lang.String toString()
           
 CellBackup with(ImmutableCell d, ImmutableNodeInst[] nodesArray, ImmutableArcInst[] arcsArray, ImmutableExport[] exportsArray)
          Creates a new instance of CellBackup which differs from this CellBackup.
 CellBackup withoutModified()
          Creates a new instance of CellBackup with modified flag off.
 CellBackup withRevisionDate(long revisionDate)
          Creates a new instance of CellBackup which differs from this CellBackup by revision date.
 CellBackup withTechPool(TechPool techPool)
          Returns CellBackup which differs from this CellBackup by TechPool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NULL_ARRAY

public static final CellBackup[] NULL_ARRAY

EMPTY_LIST

public static final ImmutableArrayList<CellBackup> EMPTY_LIST

cellRevision

public final CellRevision cellRevision
Cell data.


techPool

public final TechPool techPool
Technologies mapping


modified

public final boolean modified
"Modified" flag of the Cell.

Constructor Detail

CellBackup

public CellBackup(ImmutableCell d,
                  TechPool techPool)
Creates a new instance of CellBackup

Method Detail

with

public CellBackup with(ImmutableCell d,
                       ImmutableNodeInst[] nodesArray,
                       ImmutableArcInst[] arcsArray,
                       ImmutableExport[] exportsArray)
Creates a new instance of CellBackup which differs from this CellBackup. Four array parameters are supplied. Each parameter may be null if its contents is the same as in this Snapshot.

Parameters:
d - new persistent data of a cell.
nodesArray - new array of nodes
arcsArray - new array of arcs
exportsArray - new array of exports
Returns:
new snapshot which differs froms this Snapshot or this Snapshot.
Throws:
java.lang.IllegalArgumentException - on invariant violation.
ArrayOutOfBoundsException - on some invariant violations.

withRevisionDate

public CellBackup withRevisionDate(long revisionDate)
Creates a new instance of CellBackup which differs from this CellBackup by revision date.

Parameters:
revisionDate - new revision date.
Returns:
new CellBackup which differs from this CellBackup by revision date.

withoutModified

public CellBackup withoutModified()
Creates a new instance of CellBackup with modified flag off.

Returns:
new snapshot which differs froms this Snapshot or this Snapshot.

withTechPool

public CellBackup withTechPool(TechPool techPool)
Returns CellBackup which differs from this CellBackup by TechPool.

Parameters:
techPool - technology map.
Returns:
CellBackup with new TechPool.

check

public void check()
Checks invariant of this CellBackup.

Throws:
java.lang.AssertionError - if invariant is broken.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getMemoization

public CellBackup.Memoization getMemoization()
Returns data for size computation (connectivity etc).

Returns:
data for size computation.

getShrinkage

public AbstractShapeBuilder.Shrinkage getShrinkage()
Returns data for arc shrinkage computation.

Returns:
data for arc shrinkage computation.

getPrimitiveBounds

public ERectangle getPrimitiveBounds()
Returns bounds of all primitive arcs in this Cell or null if there are not primitives.

Returns:
bounds of all primitive arcs or null.

computePrimitiveBounds

public ERectangle computePrimitiveBounds()