com.sun.electric.database.constraint
Class Constraints

java.lang.Object
  extended by com.sun.electric.database.constraint.Constraints
Direct Known Subclasses:
Layout

public abstract class Constraints
extends java.lang.Object

Top-level class to handle constraints. The methods here are overridden by the actual constraint solver. At this time, there is only one solver: Layout.


Constructor Summary
Constraints()
           
 
Method Summary
abstract  void endBatch(java.lang.String userName)
          Method to handle the end of a batch of changes.
 void eraseLibrary(Library lib)
          Method to announce that a Library is about to be erased.
 void examineCell(Cell cell)
          Method to examine a cell because it has changed.
static Constraints getCurrent()
          Method to return the current constraint system.
 void init()
          Method to initialize a constraint system.
 void killObject(ElectricObject obj)
          Method to handle the deletion of an ElectricObject.
 void modifyArcInst(ArcInst ai, ImmutableArcInst oD)
          Method to handle a change to an ArcInst.
 void modifyCell(Cell cell, ImmutableCell oD)
          Method to announce a change to a Cell.
 void modifyCellGroup(Cell cell, Cell.CellGroup oCellGroup)
          Method to announce a move of a Cell int CellGroup.
 void modifyExport(Export pp, ImmutableExport oD)
          Method to handle a change to an Export.
 void modifyLibrary(Library lib, ImmutableLibrary oldD)
          Method to announce a change to a Library.
 void modifyNodeInst(NodeInst ni, ImmutableNodeInst oD)
          Method to announce a change to a NodeInst.
 void newObject(ElectricObject obj)
          Method to handle the creation of a new ElectricObject.
 void readLibrary(Library lib)
          Method to announce that a Library has been read.
 void redrawObject(ElectricObject obj)
          Method to request that an object be redrawn.
 void renameIds(IdMapper idMapper)
          Method to announce than Ids were renamed.
 void renameObject(ElectricObject obj, java.lang.Object oldName)
          Method to handle the renaming of an ElectricObject.
 void request(java.lang.String cmd)
          Method to make a request of a constraint system (not used).
 void slice()
          Method to give a constraint system a chance to run.
 void startBatch(Snapshot initialSnapshot)
          Method to handle the start of a batch of changes.
 void writeLibrary(Library lib)
          Method to announce that a Library is about to be written to disk.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Constraints

public Constraints()
Method Detail

getCurrent

public static Constraints getCurrent()
Method to return the current constraint system. return the current constraint system.


init

public void init()
Method to initialize a constraint system.


request

public void request(java.lang.String cmd)
Method to make a request of a constraint system (not used).

Parameters:
cmd - the command request.

examineCell

public void examineCell(Cell cell)
Method to examine a cell because it has changed.

Parameters:
cell - the Cell to examine.

slice

public void slice()
Method to give a constraint system a chance to run.


startBatch

public void startBatch(Snapshot initialSnapshot)
Method to handle the start of a batch of changes.

Parameters:
initialSnapshot - snapshot before job changes.

endBatch

public abstract void endBatch(java.lang.String userName)
Method to handle the end of a batch of changes.


modifyNodeInst

public void modifyNodeInst(NodeInst ni,
                           ImmutableNodeInst oD)
Method to announce a change to a NodeInst.

Parameters:
ni - the NodeInst that was changed.
oD - the old contents of the NodeInst.

modifyArcInst

public void modifyArcInst(ArcInst ai,
                          ImmutableArcInst oD)
Method to handle a change to an ArcInst.

Parameters:
ai - the ArcInst that changed.
oD - the old contents of the ArcInst.

modifyExport

public void modifyExport(Export pp,
                         ImmutableExport oD)
Method to handle a change to an Export.

Parameters:
pp - the Export that moved.
oD - the old contents of the Export.

modifyCell

public void modifyCell(Cell cell,
                       ImmutableCell oD)
Method to announce a change to a Cell.

Parameters:
cell - the Cell that was changed.
oD - the old contents of the Cell.

modifyCellGroup

public void modifyCellGroup(Cell cell,
                            Cell.CellGroup oCellGroup)
Method to announce a move of a Cell int CellGroup.

Parameters:
cell - the cell that was moved.
oCellGroup - the old CellGroup of the Cell.

modifyLibrary

public void modifyLibrary(Library lib,
                          ImmutableLibrary oldD)
Method to announce a change to a Library.

Parameters:
lib - the Library that was changed.
oldD - the old contents of the Library.

newObject

public void newObject(ElectricObject obj)
Method to handle the creation of a new ElectricObject.

Parameters:
obj - the ElectricObject that was just created.

killObject

public void killObject(ElectricObject obj)
Method to handle the deletion of an ElectricObject.

Parameters:
obj - the ElectricObject that was just deleted.

renameObject

public void renameObject(ElectricObject obj,
                         java.lang.Object oldName)
Method to handle the renaming of an ElectricObject.

Parameters:
obj - the ElectricObject that was renamed.
oldName - the former name of that ElectricObject.

redrawObject

public void redrawObject(ElectricObject obj)
Method to request that an object be redrawn.

Parameters:
obj - the ElectricObject to be redrawn.

readLibrary

public void readLibrary(Library lib)
Method to announce that a Library has been read.

Parameters:
lib - the Library that was read.

eraseLibrary

public void eraseLibrary(Library lib)
Method to announce that a Library is about to be erased.

Parameters:
lib - the Library that will be erased.

writeLibrary

public void writeLibrary(Library lib)
Method to announce that a Library is about to be written to disk.

Parameters:
lib - the Library that will be saved.

renameIds

public void renameIds(IdMapper idMapper)
Method to announce than Ids were renamed.

Parameters:
idMapper - mapper from old Ids to new Ids.