KiCad PCB EDA Suite
DRC_CONSTRAINT Class Reference

#include <drc_rule.h>

Public Member Functions

 DRC_CONSTRAINT (DRC_CONSTRAINT_T aType=NULL_CONSTRAINT, const wxString &aName=wxEmptyString)
 
bool IsNull () const
 
const MINOPTMAX< int > & GetValue () const
 
MINOPTMAX< int > & Value ()
 
void SetParentRule (DRC_RULE *aParentRule)
 
DRC_RULEGetParentRule () const
 
void SetName (const wxString &aName)
 
wxString GetName () const
 
SEVERITY GetSeverity () const
 

Public Attributes

DRC_CONSTRAINT_T m_Type
 
MINOPTMAX< int > m_Value
 
int m_DisallowFlags
 
ZONE_CONNECTION m_ZoneConnection
 
DRC_RULE_CONDITIONm_Test
 

Private Attributes

wxString m_name
 
DRC_RULEm_parentRule
 

Detailed Description

Definition at line 121 of file drc_rule.h.

Constructor & Destructor Documentation

◆ DRC_CONSTRAINT()

DRC_CONSTRAINT::DRC_CONSTRAINT ( DRC_CONSTRAINT_T  aType = NULL_CONSTRAINT,
const wxString &  aName = wxEmptyString 
)
inline

Definition at line 124 of file drc_rule.h.

125 :
126 m_Type( aType ),
127 m_Value(),
128 m_DisallowFlags( 0 ),
130 m_Test( nullptr ),
131 m_name( aName ),
132 m_parentRule( nullptr )
133 {
134 }
DRC_RULE_CONDITION * m_Test
Definition: drc_rule.h:175
int m_DisallowFlags
Definition: drc_rule.h:173
DRC_RULE * m_parentRule
Definition: drc_rule.h:179
ZONE_CONNECTION m_ZoneConnection
Definition: drc_rule.h:174
MINOPTMAX< int > m_Value
Definition: drc_rule.h:172
DRC_CONSTRAINT_T m_Type
Definition: drc_rule.h:171
wxString m_name
Definition: drc_rule.h:178

Member Function Documentation

◆ GetName()

wxString DRC_CONSTRAINT::GetName ( void  ) const
inline

Definition at line 149 of file drc_rule.h.

150 {
151 if( m_parentRule )
152 {
154 return m_parentRule->m_Name;
155 else
156 return wxString::Format( _( "rule %s" ), m_parentRule->m_Name );
157 }
158
159 return m_name;
160 }
bool m_Implicit
Definition: drc_rule.h:110
wxString m_Name
Definition: drc_rule.h:112
#define _(s)
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200

References _, Format(), DRC_RULE::m_Implicit, DRC_RULE::m_Name, m_name, and m_parentRule.

Referenced by DRC_TEST_PROVIDER_MATCHED_LENGTH::checkLengths(), DRC_TEST_PROVIDER_MATCHED_LENGTH::checkSkews(), DRC_TEST_PROVIDER_MATCHED_LENGTH::checkViaCounts(), PCB_VIA::GetMinAnnulus(), BOARD_CONNECTED_ITEM::GetOwnClearance(), PAD::GetOwnClearance(), PCB_TRACK::GetWidthConstraint(), BOARD_INSPECTION_TOOL::InspectClearance(), PNS_PCBNEW_RULE_RESOLVER::QueryConstraint(), DRC_TEST_PROVIDER_CONNECTION_WIDTH::Run(), test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run(), DRC_TEST_PROVIDER_DISALLOW::Run(), DRC_TEST_PROVIDER_TEXT_DIMS::Run(), DRC_TEST_PROVIDER_MISC::testAssertions(), DRC_TEST_PROVIDER_COURTYARD_CLEARANCE::testCourtyardClearances(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testItemAgainstItem(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testItemAgainstZone(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testItemAgainstZones(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testPadAgainstItem(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testShapeLineChain(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testTrackAgainstItem(), DRC_TEST_PROVIDER_ZONE_CONNECTIONS::testZoneLayer(), DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testZoneLayer(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testZonesToZones(), and ROUTER_TOOL::updateSizesAfterLayerSwitch().

◆ GetParentRule()

◆ GetSeverity()

◆ GetValue()

◆ IsNull()

◆ SetName()

void DRC_CONSTRAINT::SetName ( const wxString &  aName)
inline

Definition at line 147 of file drc_rule.h.

147{ m_name = aName; }

References m_name.

Referenced by DRC_ENGINE::EvalRules().

◆ SetParentRule()

void DRC_CONSTRAINT::SetParentRule ( DRC_RULE aParentRule)
inline

Definition at line 144 of file drc_rule.h.

144{ m_parentRule = aParentRule; }

References m_parentRule.

Referenced by DRC_RULE::AddConstraint(), and DRC_ENGINE::EvalRules().

◆ Value()

Member Data Documentation

◆ m_DisallowFlags

◆ m_name

wxString DRC_CONSTRAINT::m_name
private

Definition at line 178 of file drc_rule.h.

Referenced by GetName(), and SetName().

◆ m_parentRule

DRC_RULE* DRC_CONSTRAINT::m_parentRule
private

Definition at line 179 of file drc_rule.h.

Referenced by GetName(), GetParentRule(), GetSeverity(), and SetParentRule().

◆ m_Test

DRC_RULE_CONDITION* DRC_CONSTRAINT::m_Test

Definition at line 175 of file drc_rule.h.

Referenced by DRC_RULES_PARSER::parseConstraint().

◆ m_Type

DRC_CONSTRAINT_T DRC_CONSTRAINT::m_Type

◆ m_Value

◆ m_ZoneConnection


The documentation for this class was generated from the following file: