degate  0.1.2
Public Types | Public Member Functions | Protected Member Functions | Private Attributes
degate::RCBase Class Reference

Base class for Rule Checks. More...

#include <RCBase.h>

Inheritance diagram for degate::RCBase:
Inheritance graph
[legend]

List of all members.

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

Detailed Description

Base class for Rule Checks.

Definition at line 47 of file RCBase.h.


Member Typedef Documentation

Definition at line 50 of file RCBase.h.


Constructor & Destructor Documentation

degate::RCBase::RCBase ( std::string const &  class_name,
std::string const &  description,
RC_SEVERITY  severity = RC_ERROR 
) [inline]

The constructor.

Parameters:
class_nameShort name for the RC class.
descriptionA decription of what the RC basically checks.
severityThis 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) {
    }
virtual degate::RCBase::~RCBase ( ) [inline, virtual]

Definition at line 78 of file RCBase.h.

{}

Member Function Documentation

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::ERCOpenPorts::run(), and degate::RuleChecker::run().

                                                       {
      rc_violations.push_back(violation);
    }

Here is the call graph for this function:

Here is the caller graph for this function:

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::ERCOpenPorts::run(), degate::RuleChecker::run(), and degate::ERCNet::run().

Here is the call graph for this function:

Here is the caller graph for this function:

std::string degate::RCBase::get_rc_class_name ( ) const [inline]

Get the class name of a RC violation.

Returns:
Returns the RC violation class name as a string.

Definition at line 101 of file RCBase.h.

References _class_name.

Referenced by degate::ERCOpenPorts::run().

                                        {
      return _class_name;
    }

Here is the caller graph for this function:

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;
    }

Here is the caller graph for this function:

Definition at line 105 of file RCBase.h.

References _severity.

                                     {
      return _severity;
    }
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::RuleChecker, and degate::ERCOpenPorts.


Member Data Documentation

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]

Definition at line 56 of file RCBase.h.

Definition at line 57 of file RCBase.h.

Referenced by get_severity().

Definition at line 59 of file RCBase.h.

Referenced by add_rc_violation(), clear_rc_violations(), and get_rc_violations().


The documentation for this class was generated from the following file: