47 class CustomRuleConstraint;
68 wxString* aErrorText =
nullptr );
97 const wxString& aName = wxEmptyString ) :
175 return wxString::Format(
_(
"rule '%s'" ), aRule->
m_Name );
195 return m_options.test(
static_cast<std::size_t
>( option ) );
200 void ToProto( kiapi::board::CustomRuleConstraint& aProto )
const;
233 wxString* aRuleName =
nullptr );
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
DRC_RULE_CONDITION * m_Test
DRC_RULE * GetOptRule() const
void ToProto(kiapi::board::CustomRuleConstraint &aProto) const
SEVERITY GetSeverity() const
void SetOption(OPTIONS option)
DRC_RULE * GetMinRule() const
void SetParentRule(DRC_RULE *aParentRule)
Attribute the constraint, including each min, opt and max value it has, to aParentRule.
MINOPTMAX< int > & Value()
const MINOPTMAX< int > & GetValue() const
ZONE_CONNECTION m_ZoneConnection
void SetName(const wxString &aName)
wxString GetRuleName(const DRC_RULE *aRule) const
wxString m_ReferenceLayer
void SetOptionsFromOther(const DRC_CONSTRAINT &aOther)
DRC_RULE * GetMaxRule() const
bool GetOption(OPTIONS option) const
void SetValueRules(DRC_RULE *aMinRule, DRC_RULE *aOptRule, DRC_RULE *aMaxRule)
DRC_RULE * GetParentRule() const
void ClearOption(OPTIONS option)
DRC_CONSTRAINT(DRC_CONSTRAINT_T aType=NULL_CONSTRAINT, const wxString &aName=wxEmptyString)
std::bitset< static_cast< int >(OPTIONS::NUM_OPTIONS)> m_options
DRC_RULE_CONDITION * m_Condition
static wxString FormatRuleFromProto(const kiapi::board::CustomRule &aRule, wxString *aErrorText=nullptr)
virtual bool AppliesTo(const BOARD_ITEM *a, const BOARD_ITEM *b=nullptr) const
std::vector< DRC_CONSTRAINT > m_Constraints
BOARD_ITEM * m_ImplicitItem
void AddConstraint(DRC_CONSTRAINT &aConstraint)
wxString m_ImplicitNetclass
Netclass named by an implicit netclass rule's condition.
void SetImplicitSource(const DRC_IMPLICIT_SOURCE aImplicitSource)
DRC_IMPLICIT_SOURCE GetImplicitSource() const
std::optional< DRC_CONSTRAINT > FindConstraint(DRC_CONSTRAINT_T aType)
DRC_IMPLICIT_SOURCE m_implicitSource
LSET is a set of PCB_LAYER_IDs.
const DRC_CONSTRAINT * GetConstraint(const BOARD_ITEM *aItem, const BOARD_ITEM *bItem, int aConstraint, PCB_LAYER_ID aLayer, wxString *aRuleName=nullptr)
bool IsComponentClassSelector(const wxString &aToken)
${Class:X} inside a DRC rule is a component-class selector consumed by testFootprintSelector(),...
PCB_LAYER_ID
A quick note on layer IDs:
ZONE_CONNECTION
How pads are covered by copper in zone.