24#ifndef DRC_RE_VIAS_UNDER_SMD_CONSTRAINT_DATA_H_
25#define DRC_RE_VIAS_UNDER_SMD_CONSTRAINT_DATA_H_
42 bool aDisallowThroughVias =
false,
bool aDisallowMicroVias =
false,
43 bool aDisallowBlindVias =
false,
44 bool aDisallowBuriedVias =
false ) :
73 result.AddError(
_(
"At least one via type must be selected" ) );
86 return { wxS(
"(constraint disallow via)" ) };
92 items += wxS(
" through_via" );
94 items += wxS(
" micro_via" );
96 items += wxS(
" blind_via" );
98 items += wxS(
" buried_via" );
101 return { wxString::Format( wxS(
"(constraint disallow %s)" ), items ) };
108 wxString padTypeCondition = wxS(
"A.Pad_Type == 'SMD'" );
BITMAPS
A list of all bitmap identifiers.
@ constraint_vias_under_smd
wxString buildRule(const RULE_GENERATION_CONTEXT &aContext, const std::vector< wxString > &aConstraintClauses) const
void CopyFrom(const ICopyable &aSource) override
DRC_RE_BASE_CONSTRAINT_DATA()=default
void CopyFrom(const ICopyable &aSource) override
virtual ~DRC_RE_VIAS_UNDER_SMD_CONSTRAINT_DATA()=default
VALIDATION_RESULT Validate() const override
Validates the constraint data.
bool GetDisallowBlindVias() const
void SetDisallowBuriedVias(bool aValue)
DRC_RE_VIAS_UNDER_SMD_CONSTRAINT_DATA(int aId, int aParentId, const wxString &aRuleName, bool aDisallowThroughVias=false, bool aDisallowMicroVias=false, bool aDisallowBlindVias=false, bool aDisallowBuriedVias=false)
BITMAPS GetOverlayBitmap() const override
Returns the bitmap to use for the overlay panel background.
DRC_RE_VIAS_UNDER_SMD_CONSTRAINT_DATA()=default
void SetDisallowBlindVias(bool aValue)
bool m_disallowThroughVias
bool GetDisallowThroughVias() const
std::vector< wxString > GetConstraintClauses(const RULE_GENERATION_CONTEXT &aContext) const override
Returns just the constraint clauses without the rule wrapper.
wxString GenerateRule(const RULE_GENERATION_CONTEXT &aContext) override
DRC_RE_VIAS_UNDER_SMD_CONSTRAINT_DATA(const DRC_RE_BASE_CONSTRAINT_DATA &aBaseData)
bool m_disallowBuriedVias
bool GetDisallowMicroVias() const
void SetDisallowMicroVias(bool aValue)
bool GetDisallowBuriedVias() const
void SetDisallowThroughVias(bool aValue)
std::vector< DRC_RE_FIELD_POSITION > GetFieldPositions() const override
Returns the field positions for controls overlaid on the constraint bitmap.
Abstract interface class to enable polymorphic copying between objects.
constexpr int DRC_RE_OVERLAY_XO
constexpr int DRC_RE_OVERLAY_YO
@ RIGHT
Label to the right of the field.
wxString conditionExpression
Result of a validation operation.
wxString result
Test unit parsing edge cases and error handling.