|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbyucc.jhdl.base.Nameable
byucc.jhdl.base.Node
Abstract class that implements a Node in a circuit graph that consists of Nodes and Wires. Provides basic functionality for connecting Wires and Nodes and general graph maintenance. Anything that serves as a connection between Nodes must subclass Node.
Field Summary |
Constructor Summary | |
Node(Node parent)
Constructor that only allows the parent as an argument. |
|
Node(Node parent,
java.lang.String user_name)
Base constructor. |
Method Summary | |
void |
addObservable(Observable o)
This method will add the specified Observable to the Observable list for the current HWSystem. |
void |
addSimulatorCallback(SimulatorCallback sc)
This method will add the specified SimulatorCallback to the HWSystem. |
boolean |
checkAll()
General routine for depth-first traversing the circuit graph and checking it for various problems. |
void |
delete()
Deletes a node from the circuit. |
static boolean |
getBuildingFlag()
Returns the current status of whether JHDL is building or simulating |
NodeList |
getChildren()
Returns the children of this node |
java.util.Enumeration |
getChildrenEnumeration()
Returns an enumerator for the children |
Wire |
getDefaultClock()
This returns the default clock of this level of hierarchy. |
java.lang.String |
getInstanceName()
Deprecated. Use Nameable.getFullName() . |
Node |
getParent()
Returns the parent of this Node |
Cell |
getParentCell()
Returns the parent of this Node, cast as a Cell if possible |
TreeList |
getRelatives()
Returns the relatives (the children and the next sibling) |
HWSystem |
getSystem()
Returns the system. |
WireList |
getWires()
Returns the wires created by this node |
protected void |
optimize()
Redefine in derived classes to improve the circuit. |
boolean |
orphanAllowed()
Orphan nodes are never allowed. |
protected boolean |
postorderCheck()
Redefine in derived class for any checks to be performed after recursing to children. |
protected boolean |
preorderCheck()
Redefine in derived class for any checks to be performed before recursing to children. |
void |
printAllChildren(java.io.OutputStream os,
int spacing)
For use in debugging - prints the tree |
java.lang.String |
printTree()
for debugging, returns the subtree of this node |
void |
removeSimulatorCallback(SimulatorCallback sc)
|
Wire |
setDefaultClock(Wire clock)
This sets the default clock to be used by this level of hierarchy and below |
protected void |
subClassDelete()
Does nothing here. |
java.lang.String |
toString()
Prints the name of this node. |
Methods inherited from class byucc.jhdl.base.Nameable |
caseSensitivity, caseSensitivity, disableNameClashChecking, getFullName, getFullNameNoTestBench, getHierNameNoTestBench, getInstanceNo, getInstanceNumber, getLeafName, getLeafName, getRelativeName, getUserName, getUserName, hasUserSpecifiedName, isDescendantOf, setInstanceNumber |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Node(Node parent)
parent
- the parent of this Node.public Node(Node parent, java.lang.String user_name)
parent
- the parent of this node.user_name
- the name of this node.Method Detail |
public java.lang.String getInstanceName()
Nameable.getFullName()
.
public java.lang.String toString()
public java.lang.String printTree()
protected void subClassDelete()
public final void delete()
public void addObservable(Observable o)
o
- The Observable that is going to observe this cell.public void addSimulatorCallback(SimulatorCallback sc)
public void removeSimulatorCallback(SimulatorCallback sc)
public final Node getParent()
public final Cell getParentCell()
java.lang.ClassCastException
- if the parent of this Node is not a cellpublic static boolean getBuildingFlag()
public final HWSystem getSystem()
public Wire setDefaultClock(Wire clock)
public Wire getDefaultClock()
public final NodeList getChildren()
public final TreeList getRelatives()
getRelatives
in interface TreeListable
public final java.util.Enumeration getChildrenEnumeration()
public final WireList getWires()
public final boolean checkAll()
JHDLOutput
error stream,
but execution continues so that all errors in the tree can be detected.
protected boolean preorderCheck()
protected boolean postorderCheck()
protected void optimize()
public final boolean orphanAllowed()
public void printAllChildren(java.io.OutputStream os, int spacing)
os
- where to printspacing
- how far to indent levels
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |