degate  0.1.2
Public Member Functions | Static Public Member Functions | Private Attributes
degate::RCViolation Class Reference

#include <RCViolation.h>

List of all members.

Public Member Functions

 RCViolation (PlacedLogicModelObject_shptr obj, std::string const &problem_description, std::string const &rc_violation_class, RC_SEVERITY severity=RC_ERROR)
 Create a new Rule Check violation.
std::string get_problem_description () const
std::string get_rc_violation_class () const
RC_SEVERITY get_severity () const
std::string get_severity_as_string () const
bool matches_filter (std::string const &filter_pattern) const
PlacedLogicModelObject_shptr get_object () const
bool equals (RCViolation_shptr rcv) const
 Check if two rc violations are conceptually equal.

Static Public Member Functions

static RC_SEVERITY get_severity_from_string (std::string const &str)

Private Attributes

PlacedLogicModelObject_shptr _obj
std::string _problem_description
std::string _rc_violation_class
RC_SEVERITY _severity

Detailed Description

Definition at line 33 of file RCViolation.h.


Constructor & Destructor Documentation

degate::RCViolation::RCViolation ( PlacedLogicModelObject_shptr  obj,
std::string const &  problem_description,
std::string const &  rc_violation_class,
RC_SEVERITY  severity = RC_ERROR 
) [inline]

Create a new Rule Check violation.

Parameters:
objThe object, which is affected from the violation.
problem_descriptionA string, which contains a description of the violated contraint.
rc_violation_classThis is a unique technical name for a rc violation, that indicates the problem class.
severityIndicates the type of problem, actually if a rc violation is just a warning or a real error.

Definition at line 53 of file RCViolation.h.

                                                 :
      _obj(obj),
      _problem_description(problem_description),
      _rc_violation_class(rc_violation_class),
      _severity(severity) {
    }

Member Function Documentation

bool degate::RCViolation::equals ( RCViolation_shptr  rcv) const [inline]

Check if two rc violations are conceptually equal.

Definition at line 104 of file RCViolation.h.

References _obj, _problem_description, _rc_violation_class, and _severity.

                                             {
      return 
        _obj == rcv->_obj &&
        _problem_description == rcv->_problem_description &&
        _rc_violation_class == rcv->_rc_violation_class &&
        _severity == rcv->_severity;
    }

Definition at line 97 of file RCViolation.h.

References _obj.

                                                    {
      return _obj;
    }
std::string degate::RCViolation::get_problem_description ( ) const [inline]

Definition at line 63 of file RCViolation.h.

References _problem_description.

Referenced by matches_filter().

                                              {
      return _problem_description;
    }

Here is the caller graph for this function:

std::string degate::RCViolation::get_rc_violation_class ( ) const [inline]

Definition at line 67 of file RCViolation.h.

References _rc_violation_class.

Referenced by matches_filter().

                                             {
      return _rc_violation_class;
    }

Here is the caller graph for this function:

Definition at line 71 of file RCViolation.h.

References _severity.

                                     {
      return _severity;
    }
std::string degate::RCViolation::get_severity_as_string ( ) const [inline]

Definition at line 75 of file RCViolation.h.

References _severity, degate::RC_ERROR, degate::RC_UNDEFINED, and degate::RC_WARNING.

Referenced by matches_filter().

                                             {
      switch(_severity) {
      case RC_ERROR: return "error"; break;
      case RC_WARNING: return "warning"; break;      
      case RC_UNDEFINED: 
      default: return "undefined"; break;
      }
    }

Here is the caller graph for this function:

static RC_SEVERITY degate::RCViolation::get_severity_from_string ( std::string const &  str) [inline, static]

Definition at line 84 of file RCViolation.h.

References degate::RC_ERROR, degate::RC_UNDEFINED, and degate::RC_WARNING.

                                                                       {
      if(str == "error") return RC_ERROR;
      else if(str == "warning") return RC_WARNING;
      return RC_UNDEFINED;
    }
bool degate::RCViolation::matches_filter ( std::string const &  filter_pattern) const [inline]

Definition at line 90 of file RCViolation.h.

References get_problem_description(), get_rc_violation_class(), and get_severity_as_string().

                                                               {
      return filter_pattern.empty() ||
        get_rc_violation_class().find(filter_pattern) != std::string::npos ||
        get_severity_as_string().find(filter_pattern) != std::string::npos ||
        get_problem_description().find(filter_pattern) != std::string::npos;
    }

Here is the call graph for this function:


Member Data Documentation

Definition at line 36 of file RCViolation.h.

Referenced by equals(), and get_object().

Definition at line 37 of file RCViolation.h.

Referenced by equals(), and get_problem_description().

Definition at line 38 of file RCViolation.h.

Referenced by equals(), and get_rc_violation_class().

Definition at line 39 of file RCViolation.h.

Referenced by equals(), get_severity(), and get_severity_as_string().


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