|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.electric.database.hierarchy.HierarchyEnumerator.Visitor
public abstract static class HierarchyEnumerator.Visitor
Perform useful work while the HierarchyEnumerator enumerates the design. Whereas the HierarchyEnumerator is responsible for enumerating every Cell and NodeInst in the flattened design, the Visitor object is responsible for performing useful work during the enumeration.
The HierarchyEnumerator performs a recursive descent of the design hierarchy starting with the root Cell. When the HierarchyEnumerator enters a Cell instance it calls the Visitor's enterCell() method to let the Visitor know that it's just started working on a new Cell instance. Then the HierarchyEnumerator calls the Visitor's visitNodeInst() method for each NodeInst in that Cell. Finally, after all the NodeInsts have been visited, the HierarchyEnumerator calls the Visitor's exitCell() method to inform the Visitor that the HierarchyEnumerator is done with that Cell.
The Visitor's visitNodeInst() method controls whether the HierarchyEnumerator descends recursively into the Cell instantiated by that NodeInst. If the visitNodeInst() method returns true, then the HierarchyEnumerator enumerates the contents of that NodeInst's child Cell before it continues enumerating the NodeInsts of the current Cell.
Constructor Summary | |
---|---|
HierarchyEnumerator.Visitor()
|
Method Summary | |
---|---|
abstract boolean |
enterCell(HierarchyEnumerator.CellInfo info)
The HierarchyEnumerator is about to begin enumerating the contents of a new Cell instance. |
abstract void |
exitCell(HierarchyEnumerator.CellInfo info)
The HierarchyEnumerator has finished enumerating the contents of the current Cell instance. |
HierarchyEnumerator.CellInfo |
newCellInfo()
A hook to allow the user to add additional information to a CellInfo. |
abstract boolean |
visitNodeInst(Nodable ni,
HierarchyEnumerator.CellInfo info)
The HierarchyEnumerator is visiting Nodable ni. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HierarchyEnumerator.Visitor()
Method Detail |
---|
public HierarchyEnumerator.CellInfo newCellInfo()
public abstract boolean enterCell(HierarchyEnumerator.CellInfo info)
info
- information about the Cell instance being
enumerated
public abstract void exitCell(HierarchyEnumerator.CellInfo info)
info
- information about the Cell instance being
enumeratedpublic abstract boolean visitNodeInst(Nodable ni, HierarchyEnumerator.CellInfo info)
ni
- the Nodable that HierarchyEnumerator is visiting.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |