52 aReporter->
Report(
_(
"ERROR in expression." ) );
62 [&](
const wxString& aMessage,
int aOffset )
64 aReporter->
Report(
_(
"ERROR:" ) + wxS(
" " ) + aMessage );
80 if(
m_ucode->Run( &ctx )->AsDouble() != 0.0 )
88 if(
m_ucode->Run( &ctx )->AsDouble() != 0.0 )
103 [&](
const wxString& aMessage,
int aOffset )
106 wxString first = aMessage.BeforeFirst(
'|', &rest );
107 wxString msg = wxString::Format(
_(
"ERROR: <a href='%d:%d'>%s</a>%s" ),
109 aSourceOffset + aOffset,
117 m_ucode = std::make_unique<PCBEXPR_UCODE>();
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
std::unique_ptr< PCBEXPR_UCODE > m_ucode
DRC_RULE_CONDITION(const wxString &aExpression="")
bool Compile(REPORTER *aReporter, int aSourceLine=0, int aSourceOffset=0)
bool HasGeometryDependentFunctions() const
wxString GetExpression() const
bool EvaluateFor(const BOARD_ITEM *aItemA, const BOARD_ITEM *aItemB, int aConstraint, PCB_LAYER_ID aLayer, REPORTER *aReporter=nullptr)
KICAD_T Type() const
Returns the type of object.
void SetErrorCallback(std::function< void(const wxString &aMessage, int aOffset)> aCallback)
bool Compile(const wxString &aString, UCODE *aCode, CONTEXT *aPreflightContext)
void SetErrorCallback(std::function< void(const wxString &aMessage, int aOffset)> aCallback)
void SetItems(BOARD_ITEM *a, BOARD_ITEM *b=nullptr)
void SetTypeOverride(const BOARD_ITEM *aItem, KICAD_T aType)
A pure virtual class used to derive REPORTER objects from.
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)
Report a string with a given severity.
Handle a list of polygons defining a copper zone.
bool IsTeardropArea() const
PCB_LAYER_ID
A quick note on layer IDs:
@ PCB_ZONE_T
class ZONE, a copper pour area
@ PCB_TRACE_T
class PCB_TRACK, a track segment (segment on a copper layer)