KiCad PCB EDA Suite
Loading...
Searching...
No Matches
ERC_SCH_PIN_CONTEXT Class Reference

A class used to associate a SCH_PIN with its owning SCH_SHEET_PATH, in order to handle ERC checks across connected common hierarchical schematics/. More...

#include <erc_sch_pin_context.h>

Public Member Functions

 ERC_SCH_PIN_CONTEXT ()
 
 ERC_SCH_PIN_CONTEXT (SCH_PIN *pin, SCH_SHEET_PATH sheet)
 
 ERC_SCH_PIN_CONTEXT (const ERC_SCH_PIN_CONTEXT &other)=default
 
ERC_SCH_PIN_CONTEXToperator= (const ERC_SCH_PIN_CONTEXT &other)=default
 
 ~ERC_SCH_PIN_CONTEXT ()=default
 
SCH_PINPin ()
 Get the SCH_PIN for this context.
 
SCH_SHEET_PATHSheet ()
 Get the SCH_SHEET_PATH context for the paired SCH_PIN.
 
bool operator== (const ERC_SCH_PIN_CONTEXT &other) const
 Test two pin contexts for equality based on the deterministic hash.
 
bool operator< (const ERC_SCH_PIN_CONTEXT &other) const
 Provide a deterministic ordering for item contexts based on hash value.
 

Protected Member Functions

void rehash ()
 Calculate the deterministic hash for this context.
 

Protected Attributes

SCH_PINm_pin
 
SCH_SHEET_PATH m_sheet
 
size_t m_hash
 

Detailed Description

A class used to associate a SCH_PIN with its owning SCH_SHEET_PATH, in order to handle ERC checks across connected common hierarchical schematics/.

Definition at line 40 of file erc_sch_pin_context.h.

Constructor & Destructor Documentation

◆ ERC_SCH_PIN_CONTEXT() [1/3]

ERC_SCH_PIN_CONTEXT::ERC_SCH_PIN_CONTEXT ( )
inline

Definition at line 43 of file erc_sch_pin_context.h.

◆ ERC_SCH_PIN_CONTEXT() [2/3]

ERC_SCH_PIN_CONTEXT::ERC_SCH_PIN_CONTEXT ( SCH_PIN pin,
SCH_SHEET_PATH  sheet 
)
inline

Definition at line 45 of file erc_sch_pin_context.h.

References rehash().

◆ ERC_SCH_PIN_CONTEXT() [3/3]

ERC_SCH_PIN_CONTEXT::ERC_SCH_PIN_CONTEXT ( const ERC_SCH_PIN_CONTEXT other)
default

◆ ~ERC_SCH_PIN_CONTEXT()

ERC_SCH_PIN_CONTEXT::~ERC_SCH_PIN_CONTEXT ( )
default

Member Function Documentation

◆ operator<()

bool ERC_SCH_PIN_CONTEXT::operator< ( const ERC_SCH_PIN_CONTEXT other) const

Provide a deterministic ordering for item contexts based on hash value.

Definition at line 51 of file erc_sch_pin_context.cpp.

References m_hash.

◆ operator=()

ERC_SCH_PIN_CONTEXT & ERC_SCH_PIN_CONTEXT::operator= ( const ERC_SCH_PIN_CONTEXT other)
default

◆ operator==()

bool ERC_SCH_PIN_CONTEXT::operator== ( const ERC_SCH_PIN_CONTEXT other) const

Test two pin contexts for equality based on the deterministic hash.

Definition at line 45 of file erc_sch_pin_context.cpp.

References m_hash.

◆ Pin()

SCH_PIN * ERC_SCH_PIN_CONTEXT::Pin ( )

Get the SCH_PIN for this context.

Definition at line 33 of file erc_sch_pin_context.cpp.

References m_pin.

Referenced by ERC_TESTER::TestPinToPin().

◆ rehash()

void ERC_SCH_PIN_CONTEXT::rehash ( )
protected

Calculate the deterministic hash for this context.

Definition at line 57 of file erc_sch_pin_context.cpp.

References SCH_SHEET_PATH::GetCurrentHash(), m_hash, m_pin, and m_sheet.

Referenced by ERC_SCH_PIN_CONTEXT().

◆ Sheet()

SCH_SHEET_PATH & ERC_SCH_PIN_CONTEXT::Sheet ( )

Get the SCH_SHEET_PATH context for the paired SCH_PIN.

Definition at line 39 of file erc_sch_pin_context.cpp.

References m_sheet.

Referenced by ERC_TESTER::TestPinToPin().

Member Data Documentation

◆ m_hash

size_t ERC_SCH_PIN_CONTEXT::m_hash
protected

Definition at line 84 of file erc_sch_pin_context.h.

Referenced by operator<(), operator==(), and rehash().

◆ m_pin

SCH_PIN* ERC_SCH_PIN_CONTEXT::m_pin
protected

Definition at line 82 of file erc_sch_pin_context.h.

Referenced by Pin(), and rehash().

◆ m_sheet

SCH_SHEET_PATH ERC_SCH_PIN_CONTEXT::m_sheet
protected

Definition at line 83 of file erc_sch_pin_context.h.

Referenced by rehash(), and Sheet().


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