degate  0.1.2
Public Member Functions | Private Attributes
degate::RuleChecker Class Reference

#include <RuleChecker.h>

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

List of all members.

Public Member Functions

 RuleChecker ()
void run (LogicModel_shptr lmodel)
 The run method is abstract and must be implemented in derived classes.

Private Attributes

std::list< RCBase_shptrchecks

Detailed Description

Definition at line 31 of file RuleChecker.h.


Constructor & Destructor Documentation

Definition at line 39 of file RuleChecker.h.

References checks.

                  : RCBase("rc-all", "A collection of all RCs.") {
      checks.push_back(RCBase_shptr(new ERCOpenPorts()));
      checks.push_back(RCBase_shptr(new ERCNet()));
    }

Member Function Documentation

void degate::RuleChecker::run ( LogicModel_shptr  lmodel) [inline, 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.

Implements degate::RCBase.

Definition at line 44 of file RuleChecker.h.

References degate::RCBase::add_rc_violation(), checks, degate::RCBase::clear_rc_violations(), debug(), degate::RCBase::get_rc_violations(), and TM.

                                      {

      debug(TM, "run RC");

      clear_rc_violations();

      BOOST_FOREACH(RCBase_shptr check, checks) {
        std::cout << "RC: " << check->get_rc_class_name() << std::endl;
        check->run(lmodel);
        BOOST_FOREACH(RCViolation_shptr violation, check->get_rc_violations()) {
          add_rc_violation(violation);
        }
      }

      debug(TM, "found %d rc violations.", get_rc_violations().size());
    }

Here is the call graph for this function:


Member Data Documentation

Definition at line 35 of file RuleChecker.h.

Referenced by RuleChecker(), and run().


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