|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.electric.database.hierarchy.HierarchyEnumerator
public final class HierarchyEnumerator
The HierarchyEnumerator can help programs that need to "flatten" the design hierarchy. Examples of such programs include the logical effort engine and routers.
The HierarchyEnumerator performs a recursive descent of the "completely expanded" design hierarchy. The HierarchyEnumerator brings the Visitor along with it during the excursion. The HierarchyEnumerator doesn't build a flattened data structure, that's the prerogative of the Visitor. The HierarchyEnumerator simply invokes Visitor methods for each Cell instance and NodeInst.
The following example illustrates the notion of "completely expanded". Suppose the root Cell instantiates Cell A twice, and Cell A instantiates Cell B twice. Then the HierarchyEnumerator visits two instances of Cell A and four instances of Cell B.
Nested Class Summary | |
---|---|
static class |
HierarchyEnumerator.CellInfo
The CellInfo object is used to pass information to the Visitor during the enumeration. |
static class |
HierarchyEnumerator.NameProxy
Stores the information necessary to generate an instance name for a Part It is sometimes important not to store the instance name as a String. |
static class |
HierarchyEnumerator.NetDescription
The NetDescription object provides a Network and the level of hierarchy in which the Network occurs. |
static class |
HierarchyEnumerator.NetNameProxy
|
static class |
HierarchyEnumerator.NodableNameProxy
|
static class |
HierarchyEnumerator.Visitor
Perform useful work while the HierarchyEnumerator enumerates the design. |
Method Summary | |
---|---|
static void |
enumerateCell(Cell root,
VarContext context,
HierarchyEnumerator.Visitor visitor)
Begin enumeration of the contents of the Cell root. |
static void |
enumerateCell(Cell root,
VarContext context,
HierarchyEnumerator.Visitor visitor,
Netlist.ShortResistors shortResistors)
|
static void |
enumerateCell(Netlist rootNetlist,
VarContext context,
HierarchyEnumerator.Visitor visitor)
|
static void |
enumerateCell(Netlist rootNetlist,
VarContext context,
HierarchyEnumerator.Visitor visitor,
boolean caching)
Experimental. |
static Network |
getNetworkInChild(Network parentNet,
Nodable childNodable)
Get the Network in the childNodable that corresponds to the Network in the childNodable's parent cell. |
static int |
getNumUniqueChildCells(Cell cell)
Method to count number of unique cells in hierarchy. |
static boolean |
searchInExportNetwork(Network net,
HierarchyEnumerator.CellInfo info,
Network visitorNet)
|
static boolean |
searchNetworkInParent(Network net,
HierarchyEnumerator.CellInfo info,
Network visitorNet)
Method to search if child network is connected to visitor network (visitorNet). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void enumerateCell(Cell root, VarContext context, HierarchyEnumerator.Visitor visitor)
root
- the starting point of the enumeration.context
- the VarContext for evaluating parameters in Cell
root. If context is null then VarContext.globalContext is used.visitor
- the object responsible for doing something useful
during the enumertion of the design hierarchy.public static void enumerateCell(Cell root, VarContext context, HierarchyEnumerator.Visitor visitor, Netlist.ShortResistors shortResistors)
public static void enumerateCell(Netlist rootNetlist, VarContext context, HierarchyEnumerator.Visitor visitor)
public static void enumerateCell(Netlist rootNetlist, VarContext context, HierarchyEnumerator.Visitor visitor, boolean caching)
public static int getNumUniqueChildCells(Cell cell)
public static Network getNetworkInChild(Network parentNet, Nodable childNodable)
parentNet
- the network in the parentchildNodable
- the child nodable.
public static boolean searchNetworkInParent(Network net, HierarchyEnumerator.CellInfo info, Network visitorNet)
public static boolean searchInExportNetwork(Network net, HierarchyEnumerator.CellInfo info, Network visitorNet)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |