|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbyucc.jhdl.base.Nameable
Class for providing name capability for Wires and Nodes in the JHDL circuit graph. Methods provided by this class support the generation of default names which are guaranteed to be unique, or assignment of user-specified names, which are checked to be unique and which are modified to be unique if a name clash is detected at runtime. Objects with names must have parents. If there is no parent, the object becomes orphan (without name). The orphan capability can be disabled in the derived class if desired. Note that the parent must provide the following methods at a minimum: int generateLocalInstanceNo() which must provide a new integer that is guaranteed not to be used in the current context, and Node getParent() which gets a parent. Also note that Nodes must be Nameable so that hierarchical names can be generated.
Nameable also controls whether JHDL is case sensitive or not. By default, JHDL is case sensitive, allowing a larger namespace; but there are times when it is useful to turn case sensitivity off (as when parsing EDIF).
Method Summary | |
static boolean |
caseSensitivity()
Returns the current value of JHDL case sensitivity. |
static boolean |
caseSensitivity(boolean flag)
Sets the current value of JHDL case sensitivity. |
static void |
disableNameClashChecking()
Deprecated. JHDL now uniquifies names automatically, so this is unneeded. |
java.lang.String |
getFullName()
The full name that globally identifies this node. |
java.lang.String |
getFullNameNoTestBench()
The full name that globally identifies this node. |
java.lang.String |
getHierNameNoTestBench()
getHierName recursively traverses the circuit hierarchy building the hierarchical name without the testbench name. |
int |
getInstanceNo()
Deprecated. use getInstanceNumber() |
int |
getInstanceNumber()
Returns the uniquifying instance number of this object |
java.lang.String |
getLeafName()
Returns the leaf name of the Node or Wire. |
java.lang.String |
getLeafName(boolean lower_case)
Returns the leaf name of the Node or Wire. |
java.lang.String |
getRelativeName(Node ancestor)
The relative name uniquely identifies this nameable with respect to an ancestor node. |
java.lang.String |
getUserName()
Returns the user name, or a default name if the user did not provide one, with no uniquification (see hasUserSpecifiedName() ). |
java.lang.String |
getUserName(boolean lower_case)
Returns the user name, or a default name if the user did not provide one, with no uniquification (see hasUserSpecifiedName() ). |
boolean |
hasUserSpecifiedName()
Used to determine if the user-specified the name for this Node. |
boolean |
isDescendantOf(Node ancestor)
Convenience method that returns whether this is a descendant of the indicated node. |
void |
setInstanceNumber(int number)
Sets the uniquifying instance number of this object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static void disableNameClashChecking()
public static boolean caseSensitivity()
public static boolean caseSensitivity(boolean flag)
flag
- the new value of JHDL case sensitivity.
public final java.lang.String getUserName()
hasUserSpecifiedName()
). This is not to be used to
get the actual leaf name. Use getLeafName()
for that purpose.
public final java.lang.String getUserName(boolean lower_case)
hasUserSpecifiedName()
). This version can preserve
or change the user's case.
lower_case
- true to return the name as a lower case.
public java.lang.String getLeafName()
public final java.lang.String getLeafName(boolean lower_case)
lower_case
- true to return the name as a lower case.
public java.lang.String getHierNameNoTestBench()
public java.lang.String getFullName()
public java.lang.String getFullNameNoTestBench()
public java.lang.String getRelativeName(Node ancestor)
ancestor
- the target ancestor for the relative name
public boolean hasUserSpecifiedName()
public boolean isDescendantOf(Node ancestor)
ancestor
- the node we want to check against.
public final int getInstanceNo()
getInstanceNumber()
public final int getInstanceNumber()
public final void setInstanceNumber(int number)
number
- the new instance number
BuildException
- if the new instance number cannot be used because it
would cause a clash
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |