29 #include <unordered_map> 49 class WS_PROXY_VIEW_ITEM;
55 #define drc_dbg(level, fmt, ...) \ 56 drcPrintDebugMessage(level, wxString::Format( fmt, __VA_ARGS__ ), __FUNCTION__, __LINE__ ); 133 void InitEngine(
const wxFileName& aRulePath );
138 void RunTests(
EDA_UNITS aUnits,
bool aReportAllTrackErrors,
bool aTestFootprints );
156 void ReportViolation(
const std::shared_ptr<DRC_ITEM>& aItem, wxPoint aPos );
180 void loadRules(
const wxFileName& aPath );
211 std::unordered_map<DRC_CONSTRAINT_T, std::vector<DRC_ENGINE_CONSTRAINT*>*>
m_constraintMap;
DRC_TEST_PROVIDER * GetTestProvider(const wxString &name) const
Design Rule Checker object that performs all the DRC tests.
void SetViolationHandler(DRC_VIOLATION_HANDLER aHandler)
Set an optional DRC violation handler (receives DRC_ITEMs and positions).
std::shared_ptr< KIGFX::VIEW_OVERLAY > m_debugOverlay
void loadRules(const wxFileName &aPath)
Loads and parses a rule set from an sexpr text file.
std::vector< int > m_errorLimits
bool ReportPhase(const wxString &aMessage)
std::function< void(const std::shared_ptr< DRC_ITEM > &aItem, wxPoint aPos)> DRC_VIOLATION_HANDLER
Class CAIRO_GAL is the cairo implementation of the graphics abstraction layer.
std::vector< DRC_TEST_PROVIDER * > m_testProviders
std::shared_ptr< KIGFX::VIEW_OVERLAY > GetDebugOverlay() const
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
A progress reporter for use in multi-threaded environments.
bool IsErrorLimitExceeded(int error_code)
void SetDesignSettings(BOARD_DESIGN_SETTINGS *aSettings)
NETLIST * m_schematicNetlist
DRC_CONSTRAINT constraint
DRC_CONSTRAINT EvalRulesForItems(DRC_CONSTRAINT_T ruleID, const BOARD_ITEM *a, const BOARD_ITEM *b=nullptr, PCB_LAYER_ID aLayer=UNDEFINED_LAYER, REPORTER *aReporter=nullptr)
static int IsNetADiffPair(BOARD *aBoard, NETINFO_ITEM *aNet, int &aNetP, int &aNetN)
void ClearViolationHandler()
A pure virtual class used to derive REPORTER objects from.
PROGRESS_REPORTER * GetProgressReporter() const
DRC_RULE_CONDITION * condition
KIGFX::WS_PROXY_VIEW_ITEM * GetWorksheet() const
BOARD_DESIGN_SETTINGS * m_designSettings
std::vector< DRC_TEST_PROVIDER * > GetTestProviders() const
void SetLogReporter(REPORTER *aReporter)
bool HasRulesForConstraintType(DRC_CONSTRAINT_T constraintID)
PCB_LAYER_ID
A quick note on layer IDs:
LSET is a set of PCB_LAYER_IDs.
KIGFX::WS_PROXY_VIEW_ITEM * m_worksheet
bool GetTestFootprints() const
bool QueryWorstConstraint(DRC_CONSTRAINT_T aRuleId, DRC_CONSTRAINT &aConstraint)
void addRule(DRC_RULE *rule)
void drcPrintDebugMessage(int level, const wxString &msg, const char *function, int line)
NETLIST stores all of information read from a netlist along with the flags used to update the NETLIST...
void SetWorksheet(KIGFX::WS_PROXY_VIEW_ITEM *aWorksheet)
std::vector< DRC_RULE * > m_rules
A collection of nets and the parameters used to route or test these nets.
bool GetReportAllTrackErrors() const
bool ReportProgress(double aProgress)
std::unordered_map< DRC_CONSTRAINT_T, std::vector< DRC_ENGINE_CONSTRAINT * > * > m_constraintMap
void SetProgressReporter(PROGRESS_REPORTER *aProgRep)
Set an optional reporter for user-level progress info.
PROGRESS_REPORTER * m_progressReporter
void SetDebugOverlay(std::shared_ptr< KIGFX::VIEW_OVERLAY > aOverlay)
BOARD_DESIGN_SETTINGS * GetDesignSettings() const
DRC_ENGINE(BOARD *aBoard=nullptr, BOARD_DESIGN_SETTINGS *aSettings=nullptr)
DRC_TEST_PROVIDER is a base class that represents a DRC "provider" which runs some DRC functions over...
DRC_RULE * createImplicitRule(const wxString &name)
NETINFO_ITEM handles the data for a net.
NETLIST * GetSchematicNetlist() const
Information pertinent to a Pcbnew printed circuit board.
void ReportAux(const wxString &aStr)
PCB_EDIT_FRAME is the main frame for Pcbnew.
void RunTests(EDA_UNITS aUnits, bool aReportAllTrackErrors, bool aTestFootprints)
Runs the DRC tests.
DRC_VIOLATION_HANDLER m_violationHandler
EDA_UNITS UserUnits() const
void SetBoard(BOARD *aBoard)
bool m_reportAllTrackErrors
void ReportViolation(const std::shared_ptr< DRC_ITEM > &aItem, wxPoint aPos)
void SetSchematicNetlist(NETLIST *aNetlist)
void InitEngine(const wxFileName &aRulePath)
Initializes the DRC engine.
Container for design settings for a BOARD object.