KiCad PCB EDA Suite
Loading...
Searching...
No Matches
DRC_RULES_PARSER Class Reference

#include <drc_rule_parser.h>

Inheritance diagram for DRC_RULES_PARSER:

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_RULEparseDRC_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
 
REPORTERm_reporter
 

Detailed Description

Definition at line 40 of file drc_rule_parser.h.

Constructor & Destructor Documentation

◆ DRC_RULES_PARSER() [1/2]

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() [2/2]

DRC_RULES_PARSER::DRC_RULES_PARSER ( FILE *  aFile,
const wxString &  aFilename 
)

Definition at line 45 of file drc_rule_parser.cpp.

Member Function Documentation

◆ Parse()

void DRC_RULES_PARSER::Parse ( std::vector< std::shared_ptr< DRC_RULE > > &  aRules,
REPORTER aReporter 
)

◆ parseConstraint()

void DRC_RULES_PARSER::parseConstraint ( DRC_RULE aRule)
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().

◆ parseDRC_RULE()

std::shared_ptr< DRC_RULE > DRC_RULES_PARSER::parseDRC_RULE ( )
private

◆ parseLayer()

◆ parseSeverity()

SEVERITY DRC_RULES_PARSER::parseSeverity ( )
private

◆ parseUnknown()

void DRC_RULES_PARSER::parseUnknown ( )
private

Definition at line 89 of file drc_rule_parser.cpp.

Referenced by Parse(), parseConstraint(), parseDRC_RULE(), parseLayer(), and parseSeverity().

◆ parseValueWithUnits()

void DRC_RULES_PARSER::parseValueWithUnits ( const wxString &  aExpr,
int &  aResult,
bool  aUnitless = false 
)
private

◆ reportDeprecation()

void DRC_RULES_PARSER::reportDeprecation ( const wxString &  oldToken,
const wxString  newToken 
)
private

Definition at line 75 of file drc_rule_parser.cpp.

References _, m_reporter, REPORTER::Report(), and RPT_SEVERITY_WARNING.

Referenced by parseConstraint().

◆ reportError()

void DRC_RULES_PARSER::reportError ( const wxString &  aMessage)
private

Member Data Documentation

◆ m_reporter

REPORTER* DRC_RULES_PARSER::m_reporter
private

◆ m_requiredVersion

int DRC_RULES_PARSER::m_requiredVersion
private

Definition at line 61 of file drc_rule_parser.h.

Referenced by Parse().

◆ m_tooRecent

bool DRC_RULES_PARSER::m_tooRecent
private

Definition at line 62 of file drc_rule_parser.h.

Referenced by Parse().


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