KiCad PCB EDA Suite
|
#include <drc_rule_parser.h>
Public Member Functions | |
DRC_RULES_PARSER (const wxString &aSource, const wxString &aSourceDescr) | |
DRC_RULES_PARSER (FILE *aFile, const wxString &aFilename) | |
void | Parse (std::vector< std::shared_ptr< DRC_RULE > > &aRules, REPORTER *aReporter) |
Private Member Functions | |
std::shared_ptr< DRC_RULE > | parseDRC_RULE () |
void | parseConstraint (DRC_RULE *aRule) |
void | parseValueWithUnits (const wxString &aExpr, int &aResult, bool aUnitless=false) |
LSET | parseLayer () |
SEVERITY | parseSeverity () |
void | parseUnknown () |
void | reportError (const wxString &aMessage) |
void | reportDeprecation (const wxString &oldToken, const wxString newToken) |
Private Attributes | |
int | m_requiredVersion |
bool | m_tooRecent |
REPORTER * | m_reporter |
Definition at line 40 of file drc_rule_parser.h.
DRC_RULES_PARSER::DRC_RULES_PARSER | ( | const wxString & | aSource, |
const wxString & | aSourceDescr | ||
) |
Definition at line 36 of file drc_rule_parser.cpp.
DRC_RULES_PARSER::DRC_RULES_PARSER | ( | FILE * | aFile, |
const wxString & | aFilename | ||
) |
Definition at line 45 of file drc_rule_parser.cpp.
void DRC_RULES_PARSER::Parse | ( | std::vector< std::shared_ptr< DRC_RULE > > & | aRules, |
REPORTER * | aReporter | ||
) |
Definition at line 107 of file drc_rule_parser.cpp.
References _, DRC_RULE_FILE_VERSION, DSN_NUMBER, DSN_RIGHT, REPORTER::HasMessage(), m_reporter, m_requiredVersion, m_tooRecent, parseDRC_RULE(), parseUnknown(), REPORTER::Report(), reportError(), and RPT_SEVERITY_INFO.
Referenced by DRC_ENGINE::loadRules(), and PANEL_SETUP_RULES::OnCompile().
|
private |
Definition at line 269 of file drc_rule_parser.cpp.
References _, DRC_RULE::AddConstraint(), ANNULAR_WIDTH_CONSTRAINT, ASSERTION_CONSTRAINT, CLEARANCE_CONSTRAINT, DRC_RULE_CONDITION::Compile(), CONNECTION_WIDTH_CONSTRAINT, COURTYARD_CLEARANCE_CONSTRAINT, CREEPAGE_CONSTRAINT, DIFF_PAIR_GAP_CONSTRAINT, DISALLOW_CONSTRAINT, DRC_DISALLOW_BB_VIAS, DRC_DISALLOW_FOOTPRINTS, DRC_DISALLOW_GRAPHICS, DRC_DISALLOW_HOLES, DRC_DISALLOW_MICRO_VIAS, DRC_DISALLOW_PADS, DRC_DISALLOW_TEXTS, DRC_DISALLOW_TRACKS, DRC_DISALLOW_VIAS, DRC_DISALLOW_ZONES, DSN_NUMBER, DSN_RIGHT, DSN_STRING, EDGE_CLEARANCE_CONSTRAINT, DRC_RULE::FindConstraint(), HOLE_CLEARANCE_CONSTRAINT, HOLE_SIZE_CONSTRAINT, HOLE_TO_HOLE_CONSTRAINT, LENGTH_CONSTRAINT, DRC_CONSTRAINT::m_DisallowFlags, m_reporter, DRC_CONSTRAINT::m_Test, DRC_CONSTRAINT::m_Type, DRC_CONSTRAINT::m_Value, DRC_CONSTRAINT::m_ZoneConnection, MAX_UNCOUPLED_CONSTRAINT, MIN_RESOLVED_SPOKES_CONSTRAINT, parseUnknown(), parseValueWithUnits(), PHYSICAL_CLEARANCE_CONSTRAINT, PHYSICAL_HOLE_CLEARANCE_CONSTRAINT, reportDeprecation(), reportError(), MINOPTMAX< T >::SetMax(), MINOPTMAX< T >::SetMin(), MINOPTMAX< T >::SetOpt(), DRC_CONSTRAINT::SetOption(), SILK_CLEARANCE_CONSTRAINT, SKEW_CONSTRAINT, DRC_CONSTRAINT::SKEW_WITHIN_DIFF_PAIRS, TEXT_HEIGHT_CONSTRAINT, TEXT_THICKNESS_CONSTRAINT, THERMAL_RELIEF_GAP_CONSTRAINT, THERMAL_SPOKE_WIDTH_CONSTRAINT, TRACK_ANGLE_CONSTRAINT, TRACK_SEGMENT_LENGTH_CONSTRAINT, TRACK_WIDTH_CONSTRAINT, VIA_COUNT_CONSTRAINT, VIA_DIAMETER_CONSTRAINT, and ZONE_CONNECTION_CONSTRAINT.
Referenced by parseDRC_RULE().
|
private |
Definition at line 185 of file drc_rule_parser.cpp.
References _, LSET::AllLayersMask(), DSN_RIGHT, m_reporter, parseConstraint(), parseLayer(), parseSeverity(), parseUnknown(), and reportError().
Referenced by Parse().
|
private |
Definition at line 618 of file drc_rule_parser.cpp.
References _, LSET::AllCuMask(), DSN_RIGHT, LSET::ExternalCuMask(), ENUM_MAP< T >::Instance(), LSET::InternalCuMask(), parseUnknown(), reportError(), Rescue, BASE_SET::set(), and ToLAYER_ID().
Referenced by parseDRC_RULE().
|
private |
Definition at line 666 of file drc_rule_parser.cpp.
References _, DSN_RIGHT, parseUnknown(), reportError(), RPT_SEVERITY_ERROR, RPT_SEVERITY_EXCLUSION, RPT_SEVERITY_IGNORE, RPT_SEVERITY_UNDEFINED, and RPT_SEVERITY_WARNING.
Referenced by parseDRC_RULE().
|
private |
Definition at line 89 of file drc_rule_parser.cpp.
Referenced by Parse(), parseConstraint(), parseDRC_RULE(), parseLayer(), and parseSeverity().
|
private |
Definition at line 586 of file drc_rule_parser.cpp.
References _, PCBEXPR_EVALUATOR::Evaluate(), m_reporter, REPORTER::Report(), PCBEXPR_EVALUATOR::Result(), RPT_SEVERITY_ERROR, PCBEXPR_EVALUATOR::SetErrorCallback(), and THROW_PARSE_ERROR.
Referenced by parseConstraint().
|
private |
Definition at line 75 of file drc_rule_parser.cpp.
References _, m_reporter, REPORTER::Report(), and RPT_SEVERITY_WARNING.
Referenced by parseConstraint().
|
private |
Definition at line 54 of file drc_rule_parser.cpp.
References _, m_reporter, REPORTER::Report(), RPT_SEVERITY_ERROR, and THROW_PARSE_ERROR.
Referenced by Parse(), parseConstraint(), parseDRC_RULE(), parseLayer(), and parseSeverity().
|
private |
Definition at line 63 of file drc_rule_parser.h.
Referenced by Parse(), parseConstraint(), parseDRC_RULE(), parseValueWithUnits(), reportDeprecation(), and reportError().
|
private |
Definition at line 61 of file drc_rule_parser.h.
Referenced by Parse().
|
private |
Definition at line 62 of file drc_rule_parser.h.
Referenced by Parse().