24#ifndef DRC_RE_NUMERIC_INPUT_CONSTRAINT_DATA_H_
25#define DRC_RE_NUMERIC_INPUT_CONSTRAINT_DATA_H_
41 double aNumericInputValue,
const wxString& aRuleName ) :
61 if( code ==
"via_count" || code ==
"min_resolved_spokes" )
66 if( code ==
"via_count" )
68 return { wxString::Format(
"(constraint %s (max %s))", code, valueStr ) };
70 else if( code ==
"min_resolved_spokes" )
72 return { wxString::Format(
"(constraint %s %s)", code, valueStr ) };
74 else if( code ==
"track_angle" )
76 return { wxString::Format(
"(constraint %s (min %sdeg))", code, valueStr ) };
80 return { wxString::Format(
"(constraint %s (min %smm))", code, valueStr ) };
100 result.AddError(
_(
"Numeric input value must be greater than 0" ));
BITMAPS
A list of all bitmap identifiers.
@ constraint_minimum_track_width
wxString GetConstraintCode() const
static wxString formatDouble(double aValue, int aPrecision=6)
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
Abstract interface class to enable polymorphic copying between objects.
constexpr int DRC_RE_OVERLAY_XO
constexpr int DRC_RE_OVERLAY_YO
Result of a validation operation.
wxString result
Test unit parsing edge cases and error handling.