25#ifndef DRC_TEST_PROVIDER__H
26#define DRC_TEST_PROVIDER__H
97 virtual bool Run() = 0;
99 virtual const wxString
GetName()
const;
104 const std::function<
bool(
BOARD_ITEM*)>& aFunc );
109 virtual void reportAux(
const wxChar* fmt, ... );
113 virtual bool reportProgress(
size_t aCount,
size_t aSize,
size_t aDelta = 1 );
114 virtual bool reportPhase(
const wxString& aStageName );
122 wxString
formatMsg(
const wxString& aFormatString,
const wxString& aSource,
double aConstraint,
133 std::unordered_map<const DRC_RULE*, int>
m_stats;
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Design Rule Checker object that performs all the DRC tests.
DRC_REGISTER_TEST_PROVIDER()
std::vector< DRC_TEST_PROVIDER * > GetTestProviders() const
static DRC_TEST_PROVIDER_REGISTRY & Instance()
void RegisterTestProvider(DRC_TEST_PROVIDER *provider)
std::vector< DRC_TEST_PROVIDER * > m_providers
DRC_TEST_PROVIDER_REGISTRY()
~DRC_TEST_PROVIDER_REGISTRY()
Represent a DRC "provider" which runs some DRC functions over a BOARD and spits out DRC_ITEM and posi...
wxString formatMsg(const wxString &aFormatString, const wxString &aSource, double aConstraint, double aActual)
static std::vector< KICAD_T > s_allBasicItemsButZones
virtual bool reportPhase(const wxString &aStageName)
int forEachGeometryItem(const std::vector< KICAD_T > &aTypes, LSET aLayers, const std::function< bool(BOARD_ITEM *)> &aFunc)
virtual void reportViolation(std::shared_ptr< DRC_ITEM > &item, const VECTOR2I &aMarkerPos, int aMarkerLayer)
bool RunTests(EDA_UNITS aUnits)
static std::vector< KICAD_T > s_allBasicItems
virtual const wxString GetDescription() const
EDA_UNITS userUnits() const
bool isInvisibleText(const BOARD_ITEM *aItem) const
std::unordered_map< const DRC_RULE *, int > m_stats
virtual ~DRC_TEST_PROVIDER()=default
void reportAux(const wxString &aMsg)
virtual void accountCheck(const DRC_RULE *ruleToTest)
virtual bool Run()=0
Run this provider against the given PCB with configured options (if any).
void SetDRCEngine(DRC_ENGINE *engine)
virtual const wxString GetName() const
virtual void reportRuleStatistics()
virtual bool reportProgress(size_t aCount, size_t aSize, size_t aDelta=1)
LSET is a set of PCB_LAYER_IDs.
void SetUserUnits(EDA_UNITS aUnits)