byucc.edif.tools.merge
Interface EdifBusNamingPolicy

All Known Implementing Classes:
BasicEdifBusNamingPolicy

public interface EdifBusNamingPolicy

Defines an interface for different naming policies for multi-bit bus names. These names are used for ports as ports are the only object that support multiple bits. This interface defines a set of methods required for implementing a "policy" for naming busses.

Author:
Michael J Wirthlin

Method Summary
 java.lang.String getBusBaseName(java.lang.String name)
          Return the basename of the bus name without all of the bus range information.
 int getLeftBusLimit(java.lang.String name)
          Returns the integer value of the "left" bus limit within the bus string name (i.e. will return a "4" for the following naming example "(4:8)").
 int getRightBusLimit(java.lang.String name)
          Returns the integer value of the "right" bus limit within the bus string name (i.e. will return a "8" for the following naming example "(4:8)").
 boolean isValidBusName(java.lang.String name)
          Indicates whether the given String is a valid Bus name using the implemented bus naming policy.
 

Method Detail

isValidBusName

boolean isValidBusName(java.lang.String name)
Indicates whether the given String is a valid Bus name using the implemented bus naming policy.


getLeftBusLimit

int getLeftBusLimit(java.lang.String name)
Returns the integer value of the "left" bus limit within the bus string name (i.e. will return a "4" for the following naming example "(4:8)"). Will return a non-negative value if the string is valid. Otherwise, it returns -1.


getRightBusLimit

int getRightBusLimit(java.lang.String name)
Returns the integer value of the "right" bus limit within the bus string name (i.e. will return a "8" for the following naming example "(4:8)"). Will return a non-negative value if the string is valid. Otherwise, it returns -1.


getBusBaseName

java.lang.String getBusBaseName(java.lang.String name)
Return the basename of the bus name without all of the bus range information. This method will should return a null if the name does not match the bus naming policy.