|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbyucc.jhdl.DRC.DesignRule
This class is to be the super class of Design Rule subclasses. This class offers an interface through which subclasses of the DesignRuleChecker class can perform individual design rule checks. This system will allow us to easily create unique design rules to be added to the DesignRuleChecker.
Field Summary | |
protected CellList |
cellList
|
protected DesignRuleChecker |
checker
A reference to the DesignRuleChecker in which this rule is used. |
protected boolean |
checkOk
Whether the most recent check of this instance of the rule was okay |
protected java.lang.String |
description
A full text description of this rule |
protected boolean |
enabled
Enabled flag |
protected java.lang.String |
failureReport
Contains a String description of the failure of this rule |
protected java.lang.String |
name
The name of this rule |
protected java.lang.String |
oneLineDescription
A one-line (80-character) text description of this rule |
protected java.util.Vector |
violatingCells
Contains a list of the cells involved in a violation. |
Constructor Summary | |
DesignRule()
Constructor for the DesignRule class. |
Method Summary | |
protected void |
addToCellList(Cell cl)
|
protected static void |
addToCellList(CellList list,
Cell cl)
I wasn't sure it would be a good idea to make the insert method of the CellList class public. |
protected void |
addViolatingCell(Cell vCell)
Adds a violating cell to the violatingCells Vector. |
boolean |
checkOk()
Indicates whether or not the most recent run for this rule passed. |
protected static boolean |
displayMsgHeader(boolean display)
|
protected abstract boolean |
doCheck()
Initiates the design rule check for this DesignRule. |
java.lang.String |
getDescription()
Returns the string description for this rule. |
DesignRuleChecker |
getDesignRuleChecker()
Utility method to return a reference to the DesignRuleChecker class that houses this rule. |
java.lang.String |
getName()
Returns the name of this rule. |
java.lang.String |
getOneLineDescription()
Returns the one-line (80-character) string description for this rule. |
java.lang.String |
getReport()
Returns a string containing a full failure report from the last check against this rule. |
java.util.Vector |
getViolatingCells()
A utility class for returning a reference to the Vector object containing references to all the violating cells from the last time this rule was checked. |
protected static void |
msg(JHDLException je)
Outputs the stack trace of je to the user based on the value of currentMessageType. |
protected static void |
msg(JHDLException je,
int type)
Outputs the stack trace of je to the user based on the value of type. |
protected static void |
msg(java.lang.String msg)
Outputs the message msg to the user based on the value of currentMessageType. |
protected static void |
msg(java.lang.String msg,
int type)
Outputs the message msg to the user based on the value of type. |
protected static void |
msgln(java.lang.String msg)
Outputs the message msg to the user based on the value of currentMessageType. |
protected static void |
msgln(java.lang.String msg,
int type)
Outputs the message msg to the user based on the value of type. |
void |
registerViolation()
Registers that the most recent run against this rule failed. |
void |
resetState()
Resets all flags to their default values in this instance of DesignRule |
protected static int |
setCurrentMsgType(int type)
Sets the current format of message output to that dictated by type |
void |
setDesignRuleCheckerReference(DesignRuleChecker checker)
Sets the local reference to the DesignRuleChecker object for this rule. |
void |
setName(java.lang.String name)
Sets the name of this rule. |
protected void |
setReport(java.lang.String report)
Sets the report. |
protected abstract void |
sortCell(Cell cl)
To be implemented by subclasses so they may sort cells into appropriate containers. |
java.lang.String |
toString()
Returns the name of the rule object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.util.Vector violatingCells
protected CellList cellList
protected java.lang.String oneLineDescription
protected java.lang.String description
protected java.lang.String name
protected boolean enabled
protected boolean checkOk
protected java.lang.String failureReport
protected DesignRuleChecker checker
Constructor Detail |
public DesignRule()
Method Detail |
public DesignRuleChecker getDesignRuleChecker()
protected abstract boolean doCheck()
protected abstract void sortCell(Cell cl)
cl
- A subcell of the top-level design. The sorting method
may look at its Class (or its attributes) to determine whether it will store a
reference to it. It may alternatively store the wires attached to it.protected static void addToCellList(CellList list, Cell cl)
list
- The CellList to which cl will be addedcl
- A Cell to add to listprotected void addToCellList(Cell cl)
public java.util.Vector getViolatingCells()
protected void addViolatingCell(Cell vCell)
vCell
- The violating cell to add to the violatingCells Vector.public java.lang.String getName()
public void setName(java.lang.String name)
public void setDesignRuleCheckerReference(DesignRuleChecker checker)
public boolean checkOk()
public void registerViolation()
public void resetState()
public java.lang.String getReport()
public java.lang.String getDescription()
public java.lang.String getOneLineDescription()
protected void setReport(java.lang.String report)
public java.lang.String toString()
protected static int setCurrentMsgType(int type)
type
- should be one of MSGTYPE_MUTE, MSGTYPE_WARN_ALL,
MSGTYPE_ERR_ALL, MSGTYPE_ERR_EXPERTWARN, MSGTYPE_WARN_NOEXPERT,
MSGTYPE_ERR_NOEXPERT, MSGTYPE_NOTICE, MSGTYPE_STATUS,
MSGTYPE_NOTICE_NOEXPERT, or MSGTYPE_STATUS_NOEXPERT.protected static boolean displayMsgHeader(boolean display)
display
- If true, the message header will be displayed,
otherwise, it won't.
protected static void msg(java.lang.String msg)
msg
- Message to be outputted to the user.protected static void msgln(java.lang.String msg)
msg
- Message to be outputted to the user.protected static void msg(java.lang.String msg, int type)
msg
- Message to be outputted to the user.type
- should be one of MSGTYPE_MUTE, MSGTYPE_WARN_ALL,
MSGTYPE_ERR_ALL, MSGTYPE_ERR_EXPERTWARN, MSGTYPE_WARN_NOEXPERT,
MSGTYPE_ERR_NOEXPERT, MSGTYPE_NOTICE, MSGTYPE_STATUS,
MSGTYPE_NOTICE_NOEXPERT, or MSGTYPE_STATUS_NOEXPERT.protected static void msgln(java.lang.String msg, int type)
msg
- Message to be outputted to the user.type
- should be one of MSGTYPE_MUTE, MSGTYPE_WARN_ALL,
MSGTYPE_ERR_ALL, MSGTYPE_ERR_EXPERTWARN, MSGTYPE_WARN_NOEXPERT,
MSGTYPE_ERR_NOEXPERT, MSGTYPE_NOTICE, MSGTYPE_STATUS,
MSGTYPE_NOTICE_NOEXPERT, or MSGTYPE_STATUS_NOEXPERT.protected static void msg(JHDLException je)
protected static void msg(JHDLException je, int type)
je
- JHDLException to be outputted to the user.type
- should be one of MSGTYPE_MUTE, MSGTYPE_WARN_ALL,
MSGTYPE_ERR_ALL, MSGTYPE_ERR_EXPERTWARN, MSGTYPE_WARN_NOEXPERT,
MSGTYPE_ERR_NOEXPERT, MSGTYPE_NOTICE, MSGTYPE_STATUS,
MSGTYPE_NOTICE_NOEXPERT, or MSGTYPE_STATUS_NOEXPERT.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |