|
KiCad PCB EDA Suite
|
#include <functional>#include <vector>#include <wx/string.h>Go to the source code of this file.
Classes | |
| struct | VARIANT_COMPAT_RESULT |
Namespaces | |
| namespace | SCH_CONNECTIVITY |
| Value keys and the key session of the schematic connectivity engine. | |
Typedefs | |
| using | SYMBOL_COMPAT_FUNC = std::function<std::vector<VARIANT_COMPAT_RESULT>( const LIB_ID& )> |
| Callback that evaluates variant symbol compatibility for a given candidate LIB_ID. | |
Enumerations | |
| enum class | VARIANT_COMPAT_ERROR { NONE , MISSING_PIN_NUMBER , EXTRA_PIN_NUMBER , PIN_POSITION_MISMATCH , PIN_TYPE_MISMATCH , INSUFFICIENT_UNITS , MISSING_BODY_STYLE } |
| Describes a single pin compatibility problem found when comparing a candidate symbol against a base symbol for use as a variant symbol override. More... | |
Functions | |
| bool | VariantSymbolPinsMatch (const SCH_PIN &aBase, const SCH_PIN &aCandidate) |
| Check whether two graphical pins occupy the same variant-symbol connection slot. | |
| std::vector< VARIANT_COMPAT_RESULT > | ValidateVariantSymbolCompatibility (const LIB_SYMBOL &aBase, const LIB_SYMBOL &aCandidate) |
| Check whether aCandidate can be used as a variant symbol override for aBase. | |
| std::vector< VARIANT_COMPAT_RESULT > | ValidateVariantSymbolCompatibility (const SCH_CONNECTIVITY::LIBRARY_SYMBOL_FACT &aBase, const LIB_SYMBOL &aCandidate) |
| using SYMBOL_COMPAT_FUNC = std::function<std::vector<VARIANT_COMPAT_RESULT>( const LIB_ID& )> |
Callback that evaluates variant symbol compatibility for a given candidate LIB_ID.
Returns an empty vector when the candidate is fully compatible with the base symbol.
Definition at line 77 of file variant_symbol_utils.h.
|
strong |
Describes a single pin compatibility problem found when comparing a candidate symbol against a base symbol for use as a variant symbol override.
| Enumerator | |
|---|---|
| NONE | |
| MISSING_PIN_NUMBER | A base pin number is absent from the candidate for a given unit/body style. |
| EXTRA_PIN_NUMBER | Candidate has a pin occurrence that is absent from the base. |
| PIN_POSITION_MISMATCH | A matching pin number has a different position in library coordinates. |
| PIN_TYPE_MISMATCH | A matching pin number has a different electrical type. |
| INSUFFICIENT_UNITS | Candidate has fewer units than the base. |
| MISSING_BODY_STYLE | Base uses alternate body styles but candidate does not. |
Definition at line 45 of file variant_symbol_utils.h.
| std::vector< VARIANT_COMPAT_RESULT > ValidateVariantSymbolCompatibility | ( | const LIB_SYMBOL & | aBase, |
| const LIB_SYMBOL & | aCandidate ) |
Check whether aCandidate can be used as a variant symbol override for aBase.
The returned vector lists every issue found and an empty vector means fully compatible. Every graphical pin occurrence must have a one-to-one match with the same number, unit, body style, position, and electrical type. The candidate must have at least as many units as the base and must provide alternate body styles when the base has them. Pin names, symbol body graphics, field names and counts are not checked.
| aBase | the base symbol whose pin layout must be preserved. |
| aCandidate | the proposed alternate symbol. |
Definition at line 198 of file variant_symbol_utils.cpp.
References LIB_SYMBOL::GetBodyStyleCount(), LIB_SYMBOL::GetUnitCount(), validateCompatibility(), and variantPins().
Referenced by SCH_SYMBOL::GetVariantLibSymbol(), SCH_EDIT_TOOL::SetVariantSymbol(), and ERC_TESTER::TestVariantSymbols().
| std::vector< VARIANT_COMPAT_RESULT > ValidateVariantSymbolCompatibility | ( | const SCH_CONNECTIVITY::LIBRARY_SYMBOL_FACT & | aBase, |
| const LIB_SYMBOL & | aCandidate ) |
Definition at line 206 of file variant_symbol_utils.cpp.
References SCH_CONNECTIVITY::LIBRARY_SYMBOL_FACT::bodyStyleCount, LIB_SYMBOL::GetBodyStyleCount(), LIB_SYMBOL::GetUnitCount(), SCH_CONNECTIVITY::LIBRARY_SYMBOL_FACT::inheritedPins, SCH_CONNECTIVITY::LIBRARY_SYMBOL_FACT::pins, SCH_CONNECTIVITY::LIBRARY_SYMBOL_FACT::unitCount, validateCompatibility(), and variantPins().
Check whether two graphical pins occupy the same variant-symbol connection slot.
Definition at line 35 of file variant_symbol_utils.cpp.
References SCH_ITEM::GetBodyStyle(), SCH_PIN::GetNumber(), SCH_PIN::GetPosition(), and SCH_ITEM::GetUnit().
Referenced by SCH_SYMBOL::MapLibPins().