|
KiCad PCB EDA Suite
|
Container to create a flattened list of symbols because in a complex hierarchy, a symbol can be used more than once and its reference designator is dependent on the sheet path for the same symbol. More...
#include <sch_reference_list.h>
Public Types | |
| typedef std::vector< SCH_REFERENCE >::iterator | iterator |
| typedef std::vector< SCH_REFERENCE >::const_iterator | const_iterator |
Public Member Functions | |
| SCH_REFERENCE_LIST () | |
| SCH_REFERENCE & | operator[] (int aIndex) |
| const SCH_REFERENCE & | operator[] (int aIndex) const |
| void | Clear () |
| size_t | GetCount () const |
| SCH_REFERENCE & | GetItem (size_t aIdx) |
| const SCH_REFERENCE & | GetItem (size_t aIdx) const |
| SCH_REFERENCE * | FindItem (const SCH_REFERENCE &aItem) |
| void | AddItem (const SCH_REFERENCE &aItem) |
| void | RemoveItem (unsigned int aIndex) |
| Remove an item from the list of references. | |
| bool | Contains (const SCH_REFERENCE &aItem) const |
| Return true if aItem exists in this list. | |
| void | SplitReferences () |
| Attempt to split all reference designators into a name (U) and number (1). | |
| void | UseReusedSheetRepresentatives (const SCH_SHEET_LIST &aSheets) |
| Replace the references of each reused sheet symbol with one reference on the first instance of its sheet in aSheets, which carries the base every instance shares in suffix mode. | |
| SCH_MULTI_UNIT_REFERENCE_MAP | LockedForRepresentatives (const SCH_MULTI_UNIT_REFERENCE_MAP &aLocked) const |
| Move locked multi-unit groups onto the representatives in this list. | |
| void | RenumberBasesUsedBy (const SCH_REFERENCE_LIST &aOthers, const SCH_MULTI_UNIT_REFERENCE_MAP &aLocked, const SCH_SHEET_LIST &aSheets) |
| Mark unsplit references for renumbering where their kept base would collide once suffix mode copies it to every instance of its sheet in aSheets. | |
| void | RemoveAnnotation () |
| Treat all symbols in this list as non-annotated. | |
| void | UpdateAnnotation () |
| Update the symbol references for the schematic project (or the current sheet). | |
| void | ReannotateByOptions (ANNOTATE_ORDER_T aSortOption, ANNOTATE_ALGO_T aAlgoOption, int aStartNumber, const SCH_REFERENCE_LIST &aAdditionalRefs, bool aStartAtCurrent, SCH_SHEET_LIST *aHierarchy) |
| Forces reannotation of the provided references. | |
| void | ReannotateDuplicates (const SCH_REFERENCE_LIST &aAdditionalReferences, ANNOTATE_ALGO_T aAlgoOption) |
| Convenience function for the Paste Unique functionality. | |
| void | AnnotateByOptions (enum ANNOTATE_ORDER_T aSortOption, enum ANNOTATE_ALGO_T aAlgoOption, int aStartNumber, const SCH_MULTI_UNIT_REFERENCE_MAP &aLockedUnitMap, const SCH_REFERENCE_LIST &aAdditionalRefs, bool aStartAtCurrent, const SCH_SHEET_LIST *aSharedSheets=nullptr) |
| Annotate the references by the provided options. | |
| void | Annotate (bool aUseSheetNum, int aSheetIntervalId, int aStartNumber, const SCH_MULTI_UNIT_REFERENCE_MAP &aLockedUnitMap, const SCH_REFERENCE_LIST &aAdditionalRefs, bool aStartAtCurrent=false, const SCH_SHEET_LIST *aSharedSheets=nullptr) |
| Set the reference designators in the list that have not been annotated. | |
| int | CheckAnnotation (ANNOTATION_ERROR_HANDLER aErrorHandler) |
| Check for annotations errors. | |
| void | SortByXCoordinate () |
| Sort the list of references by X position. | |
| void | SortByYCoordinate () |
| Sort the list of references by Y position. | |
| void | SortByTimeStamp () |
| Sort the flat list by Time Stamp (sheet path + timestamp). | |
| void | SortByRefAndValue () |
| Sort the list of references by value. | |
| void | SortByReferenceOnly () |
| Sort the list of references by reference. | |
| void | SortBySymbolPtr () |
| Sort the list by the symbol pointer. | |
| int | FindRef (const wxString &aRef) const |
| Search the list for a symbol with a given reference, as shown with its sheet suffix. | |
| int | FindRefByFullPath (const wxString &aFullPath) const |
| Search the list for a symbol with the given KIID path (as string). | |
| void | GetRefsInUse (int aIndex, std::vector< int > &aIdList, int aMinRefId) const |
| Add all the reference designator numbers greater than aMinRefId to aIdList skipping the reference at aIndex. | |
| std::vector< int > | GetPackageUnits (const SCH_REFERENCE &aRef) const |
| Return the units a locked package needs free when aRef is numbered, which are the units of every member with the same library symbol and value. | |
| int | FindFirstUnusedReference (const SCH_REFERENCE &aRef, int aMinValue, const std::vector< int > &aRequiredUnits, const std::map< const SCH_REFERENCE *, std::vector< SCH_REFERENCE > > &aDestinations={}, const SCH_REFERENCE_LIST *aLocked=nullptr) const |
| Return the first unused reference number from the properties given in aRef, ensuring all of the units in aRequiredUnits are also unused. | |
| std::vector< SCH_SYMBOL_INSTANCE > | GetSymbolInstances () const |
| std::shared_ptr< REFDES_TRACKER > | GetRefDesTracker () const |
| void | SetRefDesTracker (std::shared_ptr< REFDES_TRACKER > aTracker) |
| iterator | begin () |
| iterator | end () |
| const_iterator | begin () const |
| const_iterator | end () const |
| iterator | erase (iterator position) |
| iterator | erase (iterator first, iterator last) |
Static Private Member Functions | |
| static bool | sortByRefAndValue (const SCH_REFERENCE &item1, const SCH_REFERENCE &item2) |
| static bool | sortByXPosition (const SCH_REFERENCE &item1, const SCH_REFERENCE &item2) |
| static bool | sortByYPosition (const SCH_REFERENCE &item1, const SCH_REFERENCE &item2) |
| static bool | sortByTimeStamp (const SCH_REFERENCE &item1, const SCH_REFERENCE &item2) |
| static bool | sortByReferenceOnly (const SCH_REFERENCE &item1, const SCH_REFERENCE &item2) |
| static bool | sortBySymbolPtr (const SCH_REFERENCE &item1, const SCH_REFERENCE &item2) |
Private Attributes | |
| std::vector< SCH_REFERENCE > | m_flatList |
| std::shared_ptr< REFDES_TRACKER > | m_refDesTracker |
| A list of previously used reference designators. | |
Friends | |
| class | BACK_ANNOTATION |
| class | BACK_ANNOTATE |
Container to create a flattened list of symbols because in a complex hierarchy, a symbol can be used more than once and its reference designator is dependent on the sheet path for the same symbol.
This flattened list is used for netlist generation, BOM generation, and schematic annotation.
Definition at line 335 of file sch_reference_list.h.
| typedef std::vector<SCH_REFERENCE>::const_iterator SCH_REFERENCE_LIST::const_iterator |
Definition at line 682 of file sch_reference_list.h.
| typedef std::vector<SCH_REFERENCE>::iterator SCH_REFERENCE_LIST::iterator |
Definition at line 681 of file sch_reference_list.h.
|
inline |
Definition at line 338 of file sch_reference_list.h.
Referenced by Annotate(), AnnotateByOptions(), AnnotateNewSymbol(), FindFirstUnusedReference(), ReannotateByOptions(), ReannotateDuplicates(), RenumberBasesUsedBy(), and UseReusedSheetRepresentatives().
|
inline |
Definition at line 363 of file sch_reference_list.h.
References m_flatList.
Referenced by Annotate(), AnnotateNewSymbol(), AnnotateReferences(), SCH_SHEET_PATH::AppendSymbol(), BOOST_AUTO_TEST_CASE(), SYMBOL_FIELDS_EDITOR_GRID_DATA_MODEL::DeleteRows(), TEST_SCH_REFERENCE_LIST_FIXTURE::getAdditionalRefs(), DIALOG_SYMBOL_FIELDS_TABLE::getSymbolReferences(), SCH_EDITOR_CONTROL::Paste(), SCH_DRAWING_TOOLS::PlaceSymbol(), and UseReusedSheetRepresentatives().
| void SCH_REFERENCE_LIST::Annotate | ( | bool | aUseSheetNum, |
| int | aSheetIntervalId, | ||
| int | aStartNumber, | ||
| const SCH_MULTI_UNIT_REFERENCE_MAP & | aLockedUnitMap, | ||
| const SCH_REFERENCE_LIST & | aAdditionalRefs, | ||
| bool | aStartAtCurrent = false, | ||
| const SCH_SHEET_LIST * | aSharedSheets = nullptr ) |
Set the reference designators in the list that have not been annotated.
If a the sheet number is 2 and aSheetIntervalId is 100, then the first reference designator would be 201 and the last reference designator would be 299 when no overlap occurs with sheet number 3. If there are 150 items in sheet number 2, then items are referenced U201 to U351, and items in sheet 3 start from U352
| aUseSheetNum | Set to true to start annotation for each sheet at the sheet number times aSheetIntervalId. Otherwise annotate incrementally. |
| aSheetIntervalId | The per sheet reference designator multiplier. |
| aStartNumber | The number to start with if NOT numbering based on sheet number. |
| aLockedUnitMap | A SCH_MULTI_UNIT_REFERENCE_MAP of reference designator wxStrings to SCH_REFERENCE_LISTs. May be an empty map. If not empty, any multi-unit parts found in this map will be annotated as a group rather than individually. |
| aAdditionalRefs | Additional references to use for checking that there a reference designator doesn't already exist. The caller must ensure that none of the references in aAdditionalRefs exist in this list. |
| aStartAtCurrent | Use m_numRef for each reference as the start number (overrides aStartNumber) |
| aSharedSheets | Hierarchy to check when one base is shared by reused sheet instances |
Definition at line 737 of file sch_reference_list.cpp.
References AddItem(), buildFullReference(), SCH_REFERENCE::CompareLibId(), SCH_REFERENCE::CompareValue(), FindFirstUnusedReference(), GetCount(), GetPackageUnits(), SCH_REFERENCE::GetSheetPath(), SCH_REFERENCE::GetSymbol(), SCH_REFERENCE::IsSameInstance(), SCH_SHEET_PATH::LastScreen(), m_flatList, SCH_REFERENCE::m_isNew, m_refDesTracker, SCH_REFERENCE::m_unit, path, SCH_REFERENCE_LIST(), sharesReusedBase(), and SCH_REFERENCE::Split().
Referenced by AnnotateByOptions(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and UpdateAnnotation().
| void SCH_REFERENCE_LIST::AnnotateByOptions | ( | enum ANNOTATE_ORDER_T | aSortOption, |
| enum ANNOTATE_ALGO_T | aAlgoOption, | ||
| int | aStartNumber, | ||
| const SCH_MULTI_UNIT_REFERENCE_MAP & | aLockedUnitMap, | ||
| const SCH_REFERENCE_LIST & | aAdditionalRefs, | ||
| bool | aStartAtCurrent, | ||
| const SCH_SHEET_LIST * | aSharedSheets = nullptr ) |
Annotate the references by the provided options.
| aSortOption | Define the annotation order. See ANNOTATE_ORDER_T. |
| aAlgoOption | Define the annotation style. See ANNOTATE_ALGO_T. |
| aStartNumber | The start number for non-sheet-based annotation styles. |
| aLockedUnitMap | A SCH_MULTI_UNIT_REFERENCE_MAP of reference designator wxStrings to SCH_REFERENCE_LISTs. May be an empty map. If not empty, any multi-unit parts found in this map will be annotated as a group rather than individually. |
| aAdditionalRefs | Additional references to check for duplicates |
| aStartAtCurrent | Use m_numRef for each reference as the start number (overrides aStartNumber) |
| aSharedSheets | Hierarchy to check when one base is shared by reused sheet instances |
Definition at line 697 of file sch_reference_list.cpp.
References Annotate(), INCREMENTAL_BY_REF, SCH_REFERENCE_LIST(), SHEET_NUMBER_X_100, SHEET_NUMBER_X_1000, SORT_BY_X_POSITION, SORT_BY_Y_POSITION, SortByXCoordinate(), and SortByYCoordinate().
Referenced by AnnotateReferences(), and ReannotateByOptions().
|
inline |
Definition at line 684 of file sch_reference_list.h.
References m_flatList.
Referenced by AnnotateNewSymbol(), SCHEMATIC::Contains(), FindFirstUnusedReference(), and RenumberBasesUsedBy().
|
inline |
Definition at line 688 of file sch_reference_list.h.
References m_flatList.
| int SCH_REFERENCE_LIST::CheckAnnotation | ( | ANNOTATION_ERROR_HANDLER | aErrorHandler | ) |
Check for annotations errors.
The following annotation error conditions are tested:
| aErrorHandler | A handler for errors. |
Definition at line 970 of file sch_reference_list.cpp.
References _, SCH_REFERENCE::CompareRef(), SCH_REFERENCE::CompareValue(), ERCE_DIFFERENT_UNIT_VALUE, ERCE_DUPLICATE_REFERENCE, ERCE_EXTRA_UNITS, ERCE_UNANNOTATED, SCH_REFERENCE::GetLibPart(), SCH_REFERENCE::GetRef(), SCH_REFERENCE::GetRefSuffix(), SCH_REFERENCE::GetSymbol(), SCH_REFERENCE::GetUnit(), LIB_SYMBOL::GetUnitCount(), m_flatList, SCH_REFERENCE::m_numRef, SCH_REFERENCE::m_numRefStr, SCH_REFERENCE::m_unit, SCH_REFERENCE::m_value, SortByRefAndValue(), SplitReferences(), and SCH_SYMBOL::SubReference().
Referenced by BOOST_AUTO_TEST_CASE(), SCH_EDIT_FRAME::CheckAnnotate(), REF_SUFFIX_FIXTURE::CountDuplicates(), EESCHEMA_JOBS_HANDLER::JobExportNetlist(), EESCHEMA_JOBS_HANDLER::JobExportPythonBom(), and ERC_TESTER::TestAnnotation().
|
inline |
Definition at line 351 of file sch_reference_list.h.
References m_flatList.
Referenced by BOOST_AUTO_TEST_CASE(), and SCH_DRAWING_TOOLS::PlaceSymbol().
| bool SCH_REFERENCE_LIST::Contains | ( | const SCH_REFERENCE & | aItem | ) | const |
Return true if aItem exists in this list.
| aItem | Reference to check. |
Definition at line 53 of file sch_reference_list.cpp.
References GetCount(), and m_flatList.
Referenced by AnnotateReferences(), BOOST_AUTO_TEST_CASE(), and FindFirstUnusedReference().
|
inline |
Definition at line 686 of file sch_reference_list.h.
References m_flatList.
Referenced by SCHEMATIC::Contains(), FindFirstUnusedReference(), and RenumberBasesUsedBy().
|
inline |
Definition at line 690 of file sch_reference_list.h.
References m_flatList.
Definition at line 694 of file sch_reference_list.h.
References m_flatList.
Definition at line 692 of file sch_reference_list.h.
References m_flatList.
| int SCH_REFERENCE_LIST::FindFirstUnusedReference | ( | const SCH_REFERENCE & | aRef, |
| int | aMinValue, | ||
| const std::vector< int > & | aRequiredUnits, | ||
| const std::map< const SCH_REFERENCE *, std::vector< SCH_REFERENCE > > & | aDestinations = {}, | ||
| const SCH_REFERENCE_LIST * | aLocked = nullptr ) const |
Return the first unused reference number from the properties given in aRef, ensuring all of the units in aRequiredUnits are also unused.
| aRef | is the reference item used for the search pattern. |
| aMinValue | The minimum value for the current search. |
| aRequiredUnits | List of units to ensure are free |
| aDestinations | Instances affected by each reference in this list |
| aLocked | Package whose members will receive the same number |
Definition at line 530 of file sch_reference_list.cpp.
References begin(), candidates(), SCH_REFERENCE::CompareLibId(), SCH_REFERENCE::CompareValue(), Contains(), end(), SCH_REFERENCE::formatRefStr(), SCH_REFERENCE::GetRef(), SCH_REFERENCE::GetUnit(), m_flatList, m_refDesTracker, and SCH_REFERENCE_LIST().
Referenced by Annotate().
| SCH_REFERENCE * SCH_REFERENCE_LIST::FindItem | ( | const SCH_REFERENCE & | aItem | ) |
Definition at line 65 of file sch_reference_list.cpp.
References GetCount(), and m_flatList.
| int SCH_REFERENCE_LIST::FindRef | ( | const wxString & | aRef | ) | const |
Search the list for a symbol with a given reference, as shown with its sheet suffix.
Definition at line 193 of file sch_reference_list.cpp.
References m_flatList.
| int SCH_REFERENCE_LIST::FindRefByFullPath | ( | const wxString & | aFullPath | ) | const |
Search the list for a symbol with the given KIID path (as string).
| aFullPath | is the path of the symbol item to search. |
Definition at line 181 of file sch_reference_list.cpp.
References m_flatList.
|
inline |
Definition at line 356 of file sch_reference_list.h.
References m_flatList.
Referenced by Annotate(), AnnotateNewSymbol(), SCH_EDIT_FRAME::AnnotateSymbols(), SCH_EDITOR_CONTROL::AssignFootprints(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), SCH_EDIT_FRAME::CheckAnnotate(), CollectOtherUnits(), Contains(), SCHEMATIC::ConvertRefsToKIIDs(), DetectFieldCaseConflicts(), SCH_EDITOR_CONTROL::ExportSymbolsToLibrary(), FindItem(), findSymbolsAndPins(), TEST_SCH_REFERENCE_LIST_FIXTURE::getAdditionalRefs(), DIALOG_TABLE_PROPERTIES::getContextualTextVars(), DIALOG_TABLECELL_PROPERTIES::getContextualTextVars(), DIALOG_TEXT_PROPERTIES::getContextualTextVars(), DIALOG_SYMBOL_FIELDS_TABLE::getSymbolReferences(), DIALOG_EDIT_SYMBOLS_LIBID::initDlg(), IsUnannotatedUnitOccupied(), EESCHEMA_JOBS_HANDLER::JobExportBom(), EESCHEMA_JOBS_HANDLER::JobExportNetlist(), EESCHEMA_JOBS_HANDLER::JobExportPythonBom(), ISSUE25112_FIXTURE::MakeScopedModel(), SCH_EDIT_FRAME::mapExistingAnnotation(), SCH_FIELD::OnScintillaCharAdded(), SCH_EDITOR_CONTROL::processCmpToFootprintLinkFile(), ReannotateByOptions(), RemoveAnnotation(), sheetContainsOnlyWantedItems(), SplitReferences(), and UpdateAnnotation().
|
inline |
Definition at line 358 of file sch_reference_list.h.
References m_flatList.
|
inline |
Definition at line 359 of file sch_reference_list.h.
References m_flatList.
| std::vector< int > SCH_REFERENCE_LIST::GetPackageUnits | ( | const SCH_REFERENCE & | aRef | ) | const |
Return the units a locked package needs free when aRef is numbered, which are the units of every member with the same library symbol and value.
Members may still carry different references when suffix mode merged packages of reused sheets.
Definition at line 225 of file sch_reference_list.cpp.
References m_flatList, SCH_REFERENCE::m_unit, and alg::remove_duplicates().
Referenced by Annotate().
|
inline |
Definition at line 676 of file sch_reference_list.h.
References m_refDesTracker.
| void SCH_REFERENCE_LIST::GetRefsInUse | ( | int | aIndex, |
| std::vector< int > & | aIdList, | ||
| int | aMinRefId ) const |
Add all the reference designator numbers greater than aMinRefId to aIdList skipping the reference at aIndex.
| aIndex | is the current symbol's index to use for reference prefix filtering. |
| aIdList | is the buffer to fill. |
| aMinRefId | is the minimum ID value to store. All values < aMinRefId are ignored. |
Definition at line 205 of file sch_reference_list.cpp.
References m_flatList, and alg::remove_duplicates().
| std::vector< SCH_SYMBOL_INSTANCE > SCH_REFERENCE_LIST::GetSymbolInstances | ( | ) | const |
Definition at line 614 of file sch_reference_list.cpp.
References m_flatList, SCH_SYMBOL_INSTANCE::m_Path, SCH_SYMBOL_INSTANCE::m_Reference, and SCH_SYMBOL_INSTANCE::m_Unit.
| SCH_MULTI_UNIT_REFERENCE_MAP SCH_REFERENCE_LIST::LockedForRepresentatives | ( | const SCH_MULTI_UNIT_REFERENCE_MAP & | aLocked | ) | const |
Move locked multi-unit groups onto the representatives in this list.
Groups that share a symbol merge, because a representative's base reaches every instance and so every package its units belong to.
Definition at line 302 of file sch_reference_list.cpp.
References group, index, locked, m_flatList, packageMemberKey(), and result.
Referenced by AnnotateReferences().
|
inline |
Definition at line 341 of file sch_reference_list.h.
References m_flatList.
|
inline |
Definition at line 346 of file sch_reference_list.h.
References m_flatList.
| void SCH_REFERENCE_LIST::ReannotateByOptions | ( | ANNOTATE_ORDER_T | aSortOption, |
| ANNOTATE_ALGO_T | aAlgoOption, | ||
| int | aStartNumber, | ||
| const SCH_REFERENCE_LIST & | aAdditionalRefs, | ||
| bool | aStartAtCurrent, | ||
| SCH_SHEET_LIST * | aHierarchy ) |
Forces reannotation of the provided references.
Will also reannotate associated multi-unit symbols.
| aSortOption | Define the annotation order. See ANNOTATE_ORDER_T. |
| aAlgoOption | Define the annotation style. See ANNOTATE_ALGO_T. |
| aStartNumber | The start number for non-sheet-based annotation styles. |
| aAdditionalRefs | Additional references to check for duplicates, |
| aStartAtCurrent | Use m_numRef for each reference as the start number (overrides aStartNumber). |
| aHierarchy | Optional sheet path hierarchy for resetting the references' sheet numbers based on their sheet's place in the hierarchy. Set nullptr if not desired. |
Definition at line 647 of file sch_reference_list.cpp.
References AnnotateByOptions(), SCH_SHEET_LIST::FindSheetForPath(), GetCount(), SCH_SYMBOL::GetRef(), SCH_REFERENCE::GetSheetPath(), SCH_REFERENCE::GetSymbol(), m_flatList, SCH_REFERENCE::m_isNew, path, SCH_REFERENCE_LIST(), SCH_REFERENCE::SetSheetNumber(), and SplitReferences().
Referenced by AnnotateNewSymbol(), and ReannotateDuplicates().
| void SCH_REFERENCE_LIST::ReannotateDuplicates | ( | const SCH_REFERENCE_LIST & | aAdditionalReferences, |
| ANNOTATE_ALGO_T | aAlgoOption ) |
Convenience function for the Paste Unique functionality.
Replaces any duplicate reference designators with the next available number after the present number obeying the current annotation style.
Multi-unit symbols are reannotated together.
Definition at line 691 of file sch_reference_list.cpp.
References ReannotateByOptions(), SCH_REFERENCE_LIST(), and UNSORTED.
|
inline |
Treat all symbols in this list as non-annotated.
Does not update annotation state of the symbols.
Definition at line 435 of file sch_reference_list.h.
References GetCount(), and m_flatList.
Referenced by AnnotateReferences(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
| void SCH_REFERENCE_LIST::RemoveItem | ( | unsigned int | aIndex | ) |
Remove an item from the list of references.
| aIndex | is the index of the item to be removed. |
Definition at line 46 of file sch_reference_list.cpp.
References m_flatList.
| void SCH_REFERENCE_LIST::RenumberBasesUsedBy | ( | const SCH_REFERENCE_LIST & | aOthers, |
| const SCH_MULTI_UNIT_REFERENCE_MAP & | aLocked, | ||
| const SCH_SHEET_LIST & | aSheets ) |
Mark unsplit references for renumbering where their kept base would collide once suffix mode copies it to every instance of its sheet in aSheets.
A base collides when aOthers, the references this annotation does not touch, use it or one of its composed references for anything but a free unit of the same part, or when an earlier package in this list holds it. A colliding package renumbers whole.
| aLocked | the groups from LockedForRepresentatives(), which define the packages. |
Definition at line 357 of file sch_reference_list.cpp.
References begin(), end(), SCH_REFERENCE::GetComposedRef(), SCHEMATIC::GetPackageRefSuffix(), SCH_REFERENCE::GetRef(), SCH_REFERENCE::GetSheetPath(), SCH_REFERENCE::GetSymbol(), SCH_REFERENCE::GetUnit(), group, SCH_SHEET_PATH::LastScreen(), m_flatList, packageMemberKey(), path, result, SCH_REFERENCE_LIST(), SCH_ITEM::Schematic(), and sharesReusedBase().
Referenced by AnnotateReferences().
|
inline |
Definition at line 677 of file sch_reference_list.h.
References m_refDesTracker.
Referenced by AnnotateNewSymbol(), AnnotateReferences(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
inline |
Sort the list of references by value.
Symbols are sorted in the following order:
Definition at line 597 of file sch_reference_list.h.
References m_flatList, and sortByRefAndValue().
Referenced by CheckAnnotation().
|
staticprivate |
Definition at line 117 of file sch_reference_list.cpp.
References SCH_REFERENCE::CompareRef(), SCH_REFERENCE::CompareValue(), SCH_REFERENCE::GetRefSuffix(), SCH_REFERENCE::m_sheetNum, SCH_REFERENCE::m_symbolPos, SCH_REFERENCE::m_symbolUuid, SCH_REFERENCE::m_unit, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by SortByRefAndValue().
|
inline |
Sort the list of references by reference.
Symbols are sorted in the following order:
Definition at line 609 of file sch_reference_list.h.
References m_flatList, and sortByReferenceOnly().
Referenced by REF_SUFFIX_FIXTURE::AnnotatePlaced(), API_HANDLER_SCH::handlePlaceSymbolFromLibrary(), SCH_EDITOR_CONTROL::Paste(), and SCH_DRAWING_TOOLS::PlaceSymbol().
|
staticprivate |
Definition at line 148 of file sch_reference_list.cpp.
References CASE_SENSITIVE, SCH_REFERENCE::GetRef(), SCH_REFERENCE::m_symbolUuid, SCH_REFERENCE::m_unit, and StrNumCmp().
Referenced by SortByReferenceOnly().
|
inline |
Sort the list by the symbol pointer.
Because symbols are shared in complex hierarchies, this sorting can be used to coalesce symbol instance changes into a single commit instead of per instances commits.
Definition at line 620 of file sch_reference_list.h.
References m_flatList, and sortBySymbolPtr().
|
staticprivate |
Definition at line 175 of file sch_reference_list.cpp.
References SCH_REFERENCE::m_rootSymbol.
Referenced by SortBySymbolPtr().
|
inline |
Sort the flat list by Time Stamp (sheet path + timestamp).
Useful to detect duplicate Time Stamps
Definition at line 581 of file sch_reference_list.h.
References m_flatList, and sortByTimeStamp().
|
staticprivate |
Definition at line 163 of file sch_reference_list.cpp.
References SCH_SHEET_PATH::Cmp(), SCH_REFERENCE::m_sheetPath, and SCH_REFERENCE::m_symbolUuid.
Referenced by SortByTimeStamp().
|
inline |
Sort the list of references by X position.
Symbols are sorted as follows:
Definition at line 556 of file sch_reference_list.h.
References m_flatList, and sortByXPosition().
Referenced by AnnotateByOptions().
|
staticprivate |
Definition at line 77 of file sch_reference_list.cpp.
References SCH_REFERENCE::CompareRef(), SCH_REFERENCE::m_sheetNum, SCH_REFERENCE::m_symbolPos, SCH_REFERENCE::m_symbolUuid, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by SortByXCoordinate().
|
inline |
Sort the list of references by Y position.
Symbols are sorted as follows:
Definition at line 571 of file sch_reference_list.h.
References m_flatList, and sortByYPosition().
Referenced by AnnotateByOptions().
|
staticprivate |
Definition at line 97 of file sch_reference_list.cpp.
References SCH_REFERENCE::CompareRef(), SCH_REFERENCE::m_sheetNum, SCH_REFERENCE::m_symbolPos, SCH_REFERENCE::m_symbolUuid, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by SortByYCoordinate().
|
inline |
Attempt to split all reference designators into a name (U) and number (1).
If the last character is '?' or not a digit, the reference is tagged as not annotated. For symbols with multiple parts, keeps the unit number intact
Definition at line 396 of file sch_reference_list.h.
References GetCount(), and m_flatList.
Referenced by AnnotateReferences(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), CheckAnnotation(), SCH_EDITOR_CONTROL::IncrementAnnotations(), and ReannotateByOptions().
|
inline |
Update the symbol references for the schematic project (or the current sheet).
Definition at line 449 of file sch_reference_list.h.
References Annotate(), GetCount(), and m_flatList.
Referenced by AnnotateNewSymbol(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
| void SCH_REFERENCE_LIST::UseReusedSheetRepresentatives | ( | const SCH_SHEET_LIST & | aSheets | ) |
Replace the references of each reused sheet symbol with one reference on the first instance of its sheet in aSheets, which carries the base every instance shares in suffix mode.
Definition at line 267 of file sch_reference_list.cpp.
References AddItem(), m_flatList, path, SCH_REFERENCE_LIST(), sharesReusedBase(), and SYMBOL_FILTER_ALL.
Referenced by AnnotateReferences().
|
friend |
Definition at line 710 of file sch_reference_list.h.
References BACK_ANNOTATE.
Referenced by BACK_ANNOTATE.
|
friend |
Definition at line 679 of file sch_reference_list.h.
References BACK_ANNOTATION.
Referenced by BACK_ANNOTATION.
|
private |
Definition at line 713 of file sch_reference_list.h.
Referenced by AddItem(), Annotate(), begin(), begin(), CheckAnnotation(), Clear(), Contains(), end(), end(), erase(), erase(), FindFirstUnusedReference(), FindItem(), FindRef(), FindRefByFullPath(), GetCount(), GetItem(), GetItem(), GetPackageUnits(), GetRefsInUse(), GetSymbolInstances(), LockedForRepresentatives(), operator[](), operator[](), ReannotateByOptions(), RemoveAnnotation(), RemoveItem(), RenumberBasesUsedBy(), SortByRefAndValue(), SortByReferenceOnly(), SortBySymbolPtr(), SortByTimeStamp(), SortByXCoordinate(), SortByYCoordinate(), SplitReferences(), UpdateAnnotation(), and UseReusedSheetRepresentatives().
|
private |
A list of previously used reference designators.
Definition at line 714 of file sch_reference_list.h.
Referenced by Annotate(), FindFirstUnusedReference(), GetRefDesTracker(), and SetRefDesTracker().