KiCad PCB EDA Suite
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
COMPONENT_CLASS_ASSIGNMENT_RULE Class Reference

Class which represents a component class assignment rule. More...

#include <component_class_assignment_rule.h>

Public Member Functions

 COMPONENT_CLASS_ASSIGNMENT_RULE (const wxString &aComponentClass, std::shared_ptr< DRC_RULE_CONDITION > &&aCondition)
 Construct a component class assignment rule.
 
wxString GetComponentClass () const
 The component class to assign to matching footprints.
 
void SetComponentClass (const wxString &aComponentClass)
 
bool Matches (const FOOTPRINT *aFootprint) const
 Tests whether this rules matches the given footprint.
 

Protected Attributes

wxString m_componentClass
 The component class to assign to matching footprints.
 
std::shared_ptr< DRC_RULE_CONDITIONm_condition
 The DRC condition which specifies footprint matches for this component class.
 

Detailed Description

Class which represents a component class assignment rule.

These are used to dynamically assign component classes based on FOOTPRINT parameters which are exposed through the DRC language.

Definition at line 35 of file component_class_assignment_rule.h.

Constructor & Destructor Documentation

◆ COMPONENT_CLASS_ASSIGNMENT_RULE()

COMPONENT_CLASS_ASSIGNMENT_RULE::COMPONENT_CLASS_ASSIGNMENT_RULE ( const wxString &  aComponentClass,
std::shared_ptr< DRC_RULE_CONDITION > &&  aCondition 
)
explicit

Construct a component class assignment rule.

Definition at line 25 of file component_class_assignment_rule.cpp.

Member Function Documentation

◆ GetComponentClass()

wxString COMPONENT_CLASS_ASSIGNMENT_RULE::GetComponentClass ( ) const
inline

The component class to assign to matching footprints.

Definition at line 43 of file component_class_assignment_rule.h.

References m_componentClass.

◆ Matches()

bool COMPONENT_CLASS_ASSIGNMENT_RULE::Matches ( const FOOTPRINT aFootprint) const

Tests whether this rules matches the given footprint.

Definition at line 32 of file component_class_assignment_rule.cpp.

References FOOTPRINT::GetSide(), and m_condition.

◆ SetComponentClass()

void COMPONENT_CLASS_ASSIGNMENT_RULE::SetComponentClass ( const wxString &  aComponentClass)
inline

Definition at line 44 of file component_class_assignment_rule.h.

References m_componentClass.

Member Data Documentation

◆ m_componentClass

wxString COMPONENT_CLASS_ASSIGNMENT_RULE::m_componentClass
protected

The component class to assign to matching footprints.

Definition at line 54 of file component_class_assignment_rule.h.

Referenced by GetComponentClass(), and SetComponentClass().

◆ m_condition

std::shared_ptr<DRC_RULE_CONDITION> COMPONENT_CLASS_ASSIGNMENT_RULE::m_condition
protected

The DRC condition which specifies footprint matches for this component class.

Definition at line 57 of file component_class_assignment_rule.h.

Referenced by Matches().


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