|
degate 0.1.1
|
#include <RCViolation.h>
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 |
Definition at line 33 of file RCViolation.h.
| 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.
| obj | The object, which is affected from the violation. |
| problem_description | A string, which contains a description of the violated contraint. |
| rc_violation_class | This is a unique technical name for a rc violation, that indicates the problem class. |
| severity | Indicates 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) {
}
| 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;
}
| PlacedLogicModelObject_shptr degate::RCViolation::get_object | ( | ) | const [inline] |
| 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;
}

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

| RC_SEVERITY degate::RCViolation::get_severity | ( | ) | const [inline] |
| 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;
}
}

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

Definition at line 36 of file RCViolation.h.
Referenced by equals(), and get_object().
std::string degate::RCViolation::_problem_description [private] |
Definition at line 37 of file RCViolation.h.
Referenced by equals(), and get_problem_description().
std::string degate::RCViolation::_rc_violation_class [private] |
Definition at line 38 of file RCViolation.h.
Referenced by equals(), and get_rc_violation_class().
RC_SEVERITY degate::RCViolation::_severity [private] |
Definition at line 39 of file RCViolation.h.
Referenced by equals(), get_severity(), and get_severity_as_string().
1.7.4