|
KiCad PCB EDA Suite
|
#include <topo_match.h>
Public Member Functions | |
| COMPONENT (const wxString &aRef, FOOTPRINT *aParentFp, std::optional< VECTOR2I > aRaOffset=std::optional< VECTOR2I >()) | |
| ~COMPONENT () | |
| bool | IsSameKind (const COMPONENT &b) const |
| void | AddPin (PIN *p) |
| int | GetPinCount () const |
| bool | MatchesWith (COMPONENT *b, TOPOLOGY_MISMATCH_REASON &aDetail) |
| std::vector< PIN * > & | Pins () |
| FOOTPRINT * | GetParent () const |
| bool | HasRAOffset () const |
| const VECTOR2I | GetRAOffset () const |
Private Member Functions | |
| void | sortPinsByName () |
Static Private Member Functions | |
| static bool | isChannelSuffix (const wxString &aSuffix) |
| Check if a suffix looks like a channel identifier. | |
| static bool | prefixesShareCommonBase (const wxString &aPrefixA, const wxString &aPrefixB) |
| Check if two prefixes share a common starting sequence. | |
Private Attributes | |
| std::optional< VECTOR2I > | m_raOffset |
| wxString | m_reference |
| wxString | m_prefix |
| FOOTPRINT * | m_parentFootprint = nullptr |
| std::vector< PIN * > | m_pins |
Friends | |
| class | PIN |
| class | CONNECTION_GRAPH |
Definition at line 52 of file topo_match.h.
| COMPONENT::COMPONENT | ( | const wxString & | aRef, |
| FOOTPRINT * | aParentFp, | ||
| std::optional< VECTOR2I > | aRaOffset = std::optional<VECTOR2I>() ) |
Definition at line 670 of file topo_match.cpp.
References UTIL::GetRefDesPrefix(), m_parentFootprint, m_prefix, m_raOffset, and m_reference.
Referenced by CONNECTION_GRAPH, IsSameKind(), and MatchesWith().
| COMPONENT::~COMPONENT | ( | ) |
Definition at line 846 of file topo_match.cpp.
| void COMPONENT::AddPin | ( | PIN * | p | ) |
Definition at line 725 of file topo_match.cpp.
References m_pins, PIN, and TMATCH::PIN::SetParent().
|
inline |
Definition at line 66 of file topo_match.h.
References m_parentFootprint.
Referenced by TMATCH::checkIfPadNetsMatch(), TMATCH::CONNECTION_GRAPH::findMatchingComponents(), TMATCH::PIN::IsIsomorphic(), and MatchesWith().
|
inline |
|
inline |
Definition at line 69 of file topo_match.h.
References m_raOffset.
|
inline |
Definition at line 68 of file topo_match.h.
References m_raOffset.
|
staticprivate |
Check if a suffix looks like a channel identifier.
Channel identifiers contain no letters, only digits and separator symbols (dots, underscores, hyphens, etc.).
Definition at line 679 of file topo_match.cpp.
Referenced by prefixesShareCommonBase().
| bool COMPONENT::IsSameKind | ( | const COMPONENT & | b | ) | const |
Definition at line 715 of file topo_match.cpp.
References COMPONENT(), empty(), LIB_ID::empty(), FOOTPRINT::GetFPID(), m_parentFootprint, m_prefix, and prefixesShareCommonBase().
Referenced by MatchesWith().
| bool COMPONENT::MatchesWith | ( | COMPONENT * | b, |
| TOPOLOGY_MISMATCH_REASON & | aDetail ) |
Definition at line 732 of file topo_match.cpp.
References _, COMPONENT(), FOOTPRINT::GetFPIDAsString(), GetParent(), GetPinCount(), FOOTPRINT::GetReferenceAsString(), IsSameKind(), TMATCH::TOPOLOGY_MISMATCH_REASON::m_candidate, m_pins, m_prefix, TMATCH::TOPOLOGY_MISMATCH_REASON::m_reason, TMATCH::TOPOLOGY_MISMATCH_REASON::m_reference, pin, and prefixesShareCommonBase().
Referenced by TMATCH::CONNECTION_GRAPH::findMatchingComponents().
|
inline |
Definition at line 65 of file topo_match.h.
References m_pins.
Referenced by TMATCH::checkIfPadNetsMatch().
|
staticprivate |
Check if two prefixes share a common starting sequence.
The remaining parts after the common prefix must be valid channel suffixes (no letters). This handles multi-channel designs where components have hierarchical reference designators like TRIM_1.1 and TRIM_2.1.
Definition at line 694 of file topo_match.cpp.
References isChannelSuffix().
Referenced by IsSameKind(), and MatchesWith().
|
private |
Definition at line 341 of file topo_match.cpp.
|
friend |
Definition at line 55 of file topo_match.h.
References COMPONENT(), CONNECTION_GRAPH, and PIN.
Referenced by CONNECTION_GRAPH.
|
friend |
Definition at line 54 of file topo_match.h.
References PIN.
Referenced by AddPin(), CONNECTION_GRAPH, PIN, sortPinsByName(), and ~COMPONENT().
|
private |
Definition at line 94 of file topo_match.h.
Referenced by COMPONENT(), GetParent(), and IsSameKind().
|
private |
Definition at line 95 of file topo_match.h.
Referenced by AddPin(), TMATCH::CONNECTION_GRAPH::findMatchingComponents(), GetPinCount(), MatchesWith(), Pins(), sortPinsByName(), and ~COMPONENT().
|
private |
Definition at line 93 of file topo_match.h.
Referenced by COMPONENT(), IsSameKind(), and MatchesWith().
|
private |
Definition at line 91 of file topo_match.h.
Referenced by COMPONENT(), GetRAOffset(), and HasRAOffset().
|
private |
Definition at line 92 of file topo_match.h.
Referenced by COMPONENT(), TMATCH::CONNECTION_GRAPH::findMatchingComponents(), and TMATCH::PIN::IsIsomorphic().