byucc.edif
Class BasicEdifNameClashPolicy

java.lang.Object
  extended by byucc.edif.BasicEdifNameClashPolicy
All Implemented Interfaces:
EdifNameClashPolicy

public class BasicEdifNameClashPolicy
extends java.lang.Object
implements EdifNameClashPolicy

Defines standard name clashing policies for EDIF name spaces. Clashing rules (according to ngdbuild) for each EDIF name space: EdifCellInstances in an EdifCell single-single - error single-new - error single-old - warning, auto-rename new-new - error old-old - warning, auto-rename old-new - none EdifNets in an EdifCell single-single - warning, auto-rename single-new - none single-old - warning, auto-rename new-new - none old-old - warning, auto-rename old-new - none EdifLibraries in an EdifLibraryManager single-single - error single-new - error single-old - none new-new - error old-old - none old-new - none EdifCells in an EdifLibrary single-single - error single-new - error single-old - none new-new - error old-old - none old-new - none EdifPorts in an EdifCellInterface single-single - error single-new - error single-old - error new-new - error old-old - error old-new - none This class is designed to provide a set of policies that can be used for each EDIF namespace. Because of the map implementation of cell instance and net collections, new-new, new-single, and single-single combinations should never be allowed even though ngdbuild allows new-new and single-new duplications for nets. With this taken into account, there are really only two basic policies that need to be used by the EDIF name spaces. They are the anyButOldWithNewClashPolicy (to be used by EdifNets in an EdifCell, EdifCellInstances in an EdifCell, EdifPorts in an EdifCellInterface) and the singleAndNewClashPolicy (to be used by: EdifLibraries in an EdifLibraryManager, EdifCells in an EdifLibrary)


Field Summary
private  boolean _newClashesNew
           
private  boolean _oldClashesNew
           
private  boolean _oldClashesOld
           
private  boolean _singleClashesNew
           
private  boolean _singleClashesOld
           
private  boolean _singleClashesSingle
           
static EdifNameClashPolicy anyButOldWithNewClashPolicy
          A name clashing policy which causes a clash between any combination of equal names except for a new name with an old name.
static EdifNameClashPolicy singleAndNewClashPolicy
          A name clashing policy which causes a clash between any combination of single and new names but not with any combination that includes an old name.
 
Constructor Summary
BasicEdifNameClashPolicy(boolean singleClashesSingle, boolean singleClashesNew, boolean singleClashesOld, boolean newClashesNew, boolean oldClashesOld, boolean oldClashesNew)
           
 
Method Summary
 boolean newClashesNew()
           
 boolean oldClashesNew()
           
 boolean oldClashesOld()
           
 boolean singleClashesNew()
           
 boolean singleClashesOld()
           
 boolean singleClashesSingle()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

anyButOldWithNewClashPolicy

public static final EdifNameClashPolicy anyButOldWithNewClashPolicy
A name clashing policy which causes a clash between any combination of equal names except for a new name with an old name.


singleAndNewClashPolicy

public static final EdifNameClashPolicy singleAndNewClashPolicy
A name clashing policy which causes a clash between any combination of single and new names but not with any combination that includes an old name.


_singleClashesSingle

private boolean _singleClashesSingle

_singleClashesNew

private boolean _singleClashesNew

_singleClashesOld

private boolean _singleClashesOld

_newClashesNew

private boolean _newClashesNew

_oldClashesOld

private boolean _oldClashesOld

_oldClashesNew

private boolean _oldClashesNew
Constructor Detail

BasicEdifNameClashPolicy

public BasicEdifNameClashPolicy(boolean singleClashesSingle,
                                boolean singleClashesNew,
                                boolean singleClashesOld,
                                boolean newClashesNew,
                                boolean oldClashesOld,
                                boolean oldClashesNew)
Method Detail

singleClashesSingle

public boolean singleClashesSingle()
Specified by:
singleClashesSingle in interface EdifNameClashPolicy
Returns:
a boolean representing whether a single name equal to another single name should produce a clash

singleClashesNew

public boolean singleClashesNew()
Specified by:
singleClashesNew in interface EdifNameClashPolicy
Returns:
a boolean representing whether a single name equal to another new name should produce a clash

singleClashesOld

public boolean singleClashesOld()
Specified by:
singleClashesOld in interface EdifNameClashPolicy
Returns:
a boolean representing whether a single name equal to another old name should produce a clash

newClashesNew

public boolean newClashesNew()
Specified by:
newClashesNew in interface EdifNameClashPolicy
Returns:
a boolean representing whether a new name equal to another new name should produce a clash

oldClashesOld

public boolean oldClashesOld()
Specified by:
oldClashesOld in interface EdifNameClashPolicy
Returns:
a boolean representing whether an old name equal to another old name should produce a clash

oldClashesNew

public boolean oldClashesNew()
Specified by:
oldClashesNew in interface EdifNameClashPolicy
Returns:
a boolean representing whether an old name equal to another new name should produce a clash