|
degate 0.1.1
|
Base class for Rule Checks. More...
#include <RCBase.h>

Public Types | |
| typedef RCVContainer | container_type |
Public Member Functions | |
| RCBase (std::string const &class_name, std::string const &description, RC_SEVERITY severity=RC_ERROR) | |
| The constructor. | |
| virtual | ~RCBase () |
| virtual void | run (LogicModel_shptr lmodel)=0 |
| The run method is abstract and must be implemented in derived classes. | |
| container_type | get_rc_violations () const |
| Get the list of RC violations. | |
| std::string | get_rc_class_name () const |
| Get the class name of a RC violation. | |
| RC_SEVERITY | get_severity () const |
Protected Member Functions | |
| void | add_rc_violation (RCViolation_shptr violation) |
| Add a RC violation to the list of already detected violations. | |
| void | clear_rc_violations () |
| Clear list of detected violations. | |
Private Attributes | |
| std::string | _class_name |
| std::string | _description |
| RC_SEVERITY | _severity |
| container_type | rc_violations |
| degate::RCBase::RCBase | ( | std::string const & | class_name, |
| std::string const & | description, | ||
| RC_SEVERITY | severity = RC_ERROR |
||
| ) | [inline] |
The constructor.
| class_name | Short name for the RC class. |
| description | A decription of what the RC basically checks. |
| severity | This parameter indicates wheather this RC violation container is for an error or just for a warning. |
Definition at line 70 of file RCBase.h.
:
_class_name(class_name),
_description(description),
_severity(severity) {
}
| void degate::RCBase::add_rc_violation | ( | RCViolation_shptr | violation | ) | [inline, protected] |
Add a RC violation to the list of already detected violations.
Definition at line 114 of file RCBase.h.
References degate::RCVContainer::push_back(), and rc_violations.
Referenced by degate::ERCNet::check_net(), degate::RuleChecker::run(), and degate::ERCOpenPorts::run().
{
rc_violations.push_back(violation);
}


| void degate::RCBase::clear_rc_violations | ( | ) | [inline, protected] |
Clear list of detected violations.
Definition at line 121 of file RCBase.h.
References degate::RCVContainer::clear(), and rc_violations.
Referenced by degate::RuleChecker::run(), degate::ERCOpenPorts::run(), and degate::ERCNet::run().
{
rc_violations.clear();
}


| std::string degate::RCBase::get_rc_class_name | ( | ) | const [inline] |
Get the class name of a RC violation.
Definition at line 101 of file RCBase.h.
References _class_name.
Referenced by degate::ERCOpenPorts::run().
{
return _class_name;
}

| container_type degate::RCBase::get_rc_violations | ( | ) | const [inline] |
Get the list of RC violations.
Definition at line 93 of file RCBase.h.
References rc_violations.
Referenced by degate::RuleChecker::run().
{
return rc_violations;
}

| RC_SEVERITY degate::RCBase::get_severity | ( | ) | const [inline] |
| virtual void degate::RCBase::run | ( | LogicModel_shptr | lmodel | ) | [pure virtual] |
The run method is abstract and must be implemented in derived classes.
The implementation should check for design rule violations. Each RC violation must be stored via method add_rc_violation(). Note: Because run() can be called multiple times, at the beginning of run() you must clear the list of detected violations.
Implemented in degate::ERCNet, degate::ERCOpenPorts, and degate::RuleChecker.
std::string degate::RCBase::_class_name [private] |
Definition at line 55 of file RCBase.h.
Referenced by get_rc_class_name().
std::string degate::RCBase::_description [private] |
RC_SEVERITY degate::RCBase::_severity [private] |
Definition at line 57 of file RCBase.h.
Referenced by get_severity().
container_type degate::RCBase::rc_violations [private] |
Definition at line 59 of file RCBase.h.
Referenced by add_rc_violation(), clear_rc_violations(), and get_rc_violations().
1.7.4