25#ifndef DRC_TEST_PROVIDER__H
26#define DRC_TEST_PROVIDER__H
98 virtual bool Run() = 0;
100 virtual const wxString
GetName()
const;
108 const std::function<
bool(
BOARD_ITEM*)>& aFunc );
113 virtual void reportAux(
const wxChar* fmt, ... );
117 virtual bool reportProgress(
size_t aCount,
size_t aSize,
size_t aDelta = 1 );
118 virtual bool reportPhase(
const wxString& aStageName );
126 wxString
formatMsg(
const wxString& aFormatString,
const wxString& aSource,
double aConstraint,
128 wxString
formatMsg(
const wxString& aFormatString,
const wxString& aSource,
139 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)
BOARD_COMMIT * GetCommit() const
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
void SetCommit(BOARD_COMMIT *aCommit)
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)