KiCad PCB EDA Suite
DRC_CONSTRAINT Class Reference

#include <drc_rule.h>

Public Member Functions

 DRC_CONSTRAINT (DRC_CONSTRAINT_TYPE_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
 
wxString GetName () const
 

Public Attributes

DRC_CONSTRAINT_TYPE_T m_Type
 
MINOPTMAX< int > m_Value
 
int m_DisallowFlags
 

Private Attributes

wxString m_name
 
DRC_RULEm_parentRule
 

Detailed Description

Definition at line 104 of file drc_rule.h.

Constructor & Destructor Documentation

◆ DRC_CONSTRAINT()

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

Definition at line 107 of file drc_rule.h.

108  :
109  m_Type( aType ),
110  m_DisallowFlags( 0 ),
111  m_name( aName ),
112  m_parentRule( nullptr )
113  {
114  }
DRC_RULE * m_parentRule
Definition: drc_rule.h:147
wxString m_name
Definition: drc_rule.h:146
DRC_CONSTRAINT_TYPE_T m_Type
Definition: drc_rule.h:141
int m_DisallowFlags
Definition: drc_rule.h:143

Member Function Documentation

◆ GetName()

wxString DRC_CONSTRAINT::GetName ( void  ) const
inline

Definition at line 127 of file drc_rule.h.

128  {
129  if( m_parentRule )
130  {
131  if( m_parentRule->m_Implicit )
132  return m_parentRule->m_Name;
133  else
134  return wxString::Format( _( "rule %s" ), m_parentRule->m_Name );
135  }
136 
137  return m_name;
138  }
DRC_RULE * m_parentRule
Definition: drc_rule.h:147
bool m_Implicit
Definition: drc_rule.h:95
wxString m_Name
Definition: drc_rule.h:96
wxString m_name
Definition: drc_rule.h:146
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200
#define _(s)
Definition: 3d_actions.cpp:33

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

Referenced by DRC_TEST_PROVIDER_MATCHED_LENGTH::checkLengthViolations(), DRC_TEST_PROVIDER_MATCHED_LENGTH::checkSkewViolations(), DRC_TEST_PROVIDER_MATCHED_LENGTH::checkViaCountViolations(), VIA::GetMinAnnulus(), BOARD_CONNECTED_ITEM::GetOwnClearance(), TRACK::GetWidthConstraints(), PNS_PCBNEW_RULE_RESOLVER::QueryConstraint(), and DRC_TEST_PROVIDER_COPPER_CLEARANCE::testPadAgainstItem().

◆ GetParentRule()

◆ GetValue()

◆ IsNull()

bool DRC_CONSTRAINT::IsNull ( ) const
inline

Definition at line 116 of file drc_rule.h.

117  {
118  return m_Type == NULL_CONSTRAINT;
119  }
DRC_CONSTRAINT_TYPE_T m_Type
Definition: drc_rule.h:141

References m_Type, and NULL_CONSTRAINT.

Referenced by ROUTER_TOOL::onViaCommand(), and PNS_PCBNEW_RULE_RESOLVER::QueryConstraint().

◆ SetParentRule()

void DRC_CONSTRAINT::SetParentRule ( DRC_RULE aParentRule)
inline

Definition at line 124 of file drc_rule.h.

124 { m_parentRule = aParentRule; }
DRC_RULE * m_parentRule
Definition: drc_rule.h:147

References m_parentRule.

Referenced by DRC_RULE::AddConstraint().

◆ Value()

Member Data Documentation

◆ m_DisallowFlags

int DRC_CONSTRAINT::m_DisallowFlags

◆ m_name

wxString DRC_CONSTRAINT::m_name
private

Definition at line 146 of file drc_rule.h.

Referenced by GetName().

◆ m_parentRule

DRC_RULE* DRC_CONSTRAINT::m_parentRule
private

Definition at line 147 of file drc_rule.h.

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

◆ m_Type

DRC_CONSTRAINT_TYPE_T DRC_CONSTRAINT::m_Type

◆ m_Value


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