edu.byu.ece.edif.tools.flatten
Class BasicHierarchyNaming

java.lang.Object
  extended by edu.byu.ece.edif.tools.flatten.BasicHierarchyNaming
All Implemented Interfaces:
HierarchyNaming, java.io.Serializable

public class BasicHierarchyNaming
extends java.lang.Object
implements HierarchyNaming

A basic implementation of the HierarchyNaming interface

See Also:
Serialized Form

Field Summary
private  boolean _includeRootName
          A boolean indicating whether the top level instance name should be included in complete hierarchical names
private  java.lang.String _separator
          A string to be used as a hierarchical separator (i.e.
static HierarchyNaming DEFAULT_BACKSLASH_NAMING
           
 
Constructor Summary
BasicHierarchyNaming(java.lang.String separator, boolean includeRootName)
           
 
Method Summary
 HierarchicalInstance getHierarchicalInstance(HierarchicalInstance head, java.lang.String name)
          Given the head node of a HierarchicalInstance hierarchy and a complete hierarchical instance name, get the corresponding HierarchicalInstance node.
 java.lang.String getHierarchicalInstanceName(HierarchicalInstance node)
          Given a HierarchicalInstance node, get it's complete hierarchical name.
 HierarchicalNet getHierarchicalNet(HierarchicalInstance head, java.lang.String name)
          Given the head node of a HierarchicalInstance hierachy and a complete hierarchical net name, get the corresponding HierarchicalNet.
 java.lang.String getHierarchicalNetName(HierarchicalNet hierarchicalNet)
          Given a HierarchicalNet, get it's complete hierarchical name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_BACKSLASH_NAMING

public static final HierarchyNaming DEFAULT_BACKSLASH_NAMING

_includeRootName

private boolean _includeRootName
A boolean indicating whether the top level instance name should be included in complete hierarchical names


_separator

private java.lang.String _separator
A string to be used as a hierarchical separator (i.e. "/")

Constructor Detail

BasicHierarchyNaming

public BasicHierarchyNaming(java.lang.String separator,
                            boolean includeRootName)
Method Detail

getHierarchicalInstance

public HierarchicalInstance getHierarchicalInstance(HierarchicalInstance head,
                                                    java.lang.String name)
Description copied from interface: HierarchyNaming
Given the head node of a HierarchicalInstance hierarchy and a complete hierarchical instance name, get the corresponding HierarchicalInstance node.

Specified by:
getHierarchicalInstance in interface HierarchyNaming
Parameters:
head - the head node of the HierarchicalInstance hierarchy
name - the complete hierarchical name of the desired HierarchicalInstance node
Returns:
the HierarchicalInstance node corresponding to the given name

getHierarchicalInstanceName

public java.lang.String getHierarchicalInstanceName(HierarchicalInstance node)
Description copied from interface: HierarchyNaming
Given a HierarchicalInstance node, get it's complete hierarchical name.

Specified by:
getHierarchicalInstanceName in interface HierarchyNaming
Parameters:
node - the HierarchicalInstance node whose name is desired
Returns:
the complete hierarchical name of the HierarchicalInstance node

getHierarchicalNet

public HierarchicalNet getHierarchicalNet(HierarchicalInstance head,
                                          java.lang.String name)
Description copied from interface: HierarchyNaming
Given the head node of a HierarchicalInstance hierachy and a complete hierarchical net name, get the corresponding HierarchicalNet.

Specified by:
getHierarchicalNet in interface HierarchyNaming
Parameters:
head - the head node of the HierarchicalInstance hierarchy
name - the complete hierarchical name of the desired HierarchicalNet
Returns:
the HierarchicalNet corresponding to the given name

getHierarchicalNetName

public java.lang.String getHierarchicalNetName(HierarchicalNet hierarchicalNet)
Description copied from interface: HierarchyNaming
Given a HierarchicalNet, get it's complete hierarchical name.

Specified by:
getHierarchicalNetName in interface HierarchyNaming
Parameters:
hierarchicalNet - the HierarchicalNet whose name is desired
Returns:
the complete hierarchical name of the HierarchicalNet