|
KiCad PCB EDA Suite
|
Container class that holds multiple SCH_SCREEN objects in a hierarchy. More...
#include <sch_screen.h>
Public Member Functions | |
| SCH_SCREENS (SCH_SHEET *aSheet) | |
| SCH_SCREENS (SCH_SHEET &aSheet) | |
| ~SCH_SCREENS () | |
| size_t | GetCount () const |
| SCH_SCREEN * | GetFirst () |
| SCH_SCREEN * | GetNext () |
| SCH_SCREEN * | GetScreen (unsigned int aIndex) const |
| SCH_SHEET * | GetSheet (unsigned int aIndex) const |
| void | ClearAnnotationOfNewSheetPaths (SCH_SHEET_LIST &aInitialSheetPathList) |
| Clear the annotation for the symbols inside new sheetpaths when a complex hierarchy is modified and new sheetpaths added when a screen shares more than one sheet path, missing alternate references are added and alternate references of new sheet paths are cleared. | |
| int | ReplaceDuplicateTimeStamps () |
| Test all sheet and symbol objects in the schematic for duplicate time stamps and replaces them as necessary. | |
| void | DeleteAllMarkers (enum MARKER_BASE::MARKER_T aMarkerType, bool aIncludeExclusions) |
| Delete all electronic rules check markers of aMarkerType from all the screens in the list. | |
| void | DeleteMarkers (enum MARKER_BASE::MARKER_T aMarkerTyp, int aErrorCode, bool aIncludeExclusions=true) |
| Delete all markers of a particular type and error code. | |
| void | DeleteMarker (SCH_MARKER *aMarker) |
| Delete a specific marker. | |
| void | UpdateSymbolLinks (REPORTER *aReporter=nullptr) |
| Initialize the LIB_SYMBOL reference for each SCH_SYMBOL found in the full schematic. | |
| void | ClearEditFlags () |
| bool | HasNoFullyDefinedLibIds () |
| Test all of the schematic symbols to see if all LIB_ID objects library nickname is not set. | |
| size_t | GetLibNicknames (wxArrayString &aLibNicknames) |
| Fetch all of the symbol library nicknames into aLibNicknames. | |
| int | ChangeSymbolLibNickname (const wxString &aFrom, const wxString &aTo) |
| Change all of the symbol library nicknames. | |
| bool | HasSchematic (const wxString &aSchematicFileName) |
| Check if one of the schematics in the list of screens is aSchematicFileName. | |
| void | BuildClientSheetPathList () |
| Build the list of sheet paths sharing a screen for each screen in use. | |
| void | SetLegacySymbolInstanceData () |
| Update the symbol value and footprint instance data for legacy designs. | |
| void | FixLegacyPowerSymbolMismatches () |
| Fix legacy power symbols that have mismatched value text fields and invisible power pin names. | |
| void | PruneOrphanedSymbolInstances (const wxString &aProjectName, const SCH_SHEET_LIST &aValidSheetPaths) |
| void | PruneOrphanedSheetInstances (const wxString &aProjectName, const SCH_SHEET_LIST &aValidSheetPaths) |
| bool | HasSymbolFieldNamesWithWhiteSpace () const |
| std::set< wxString > | GetVariantNames () const |
| void | DeleteVariant (const wxString &aVariantName, SCH_COMMIT *aCommit=nullptr) |
| void | RenameVariant (const wxString &aOldName, const wxString &aNewName, SCH_COMMIT *aCommit=nullptr) |
| void | CopyVariant (const wxString &aSourceVariant, const wxString &aNewVariant, SCH_COMMIT *aCommit=nullptr) |
Private Member Functions | |
| void | addScreenToList (SCH_SCREEN *aScreen, SCH_SHEET *aSheet) |
| void | buildScreenList (SCH_SHEET *aSheet) |
Private Attributes | |
| std::vector< SCH_SCREEN * > | m_screens |
| std::vector< SCH_SHEET * > | m_sheets |
| unsigned int | m_index |
Container class that holds multiple SCH_SCREEN objects in a hierarchy.
Individual SCH_SCREEN objects are unique and correspond to .sch files.
Definition at line 749 of file sch_screen.h.
| SCH_SCREENS::SCH_SCREENS | ( | SCH_SHEET * | aSheet | ) |
Definition at line 2038 of file sch_screen.cpp.
References buildScreenList(), and m_index.
Referenced by ClearAnnotationOfNewSheetPaths(), and SCH_SCREENS().
|
inline |
Definition at line 753 of file sch_screen.h.
References SCH_SCREENS().
| SCH_SCREENS::~SCH_SCREENS | ( | ) |
Definition at line 2045 of file sch_screen.cpp.
|
private |
Definition at line 2088 of file sch_screen.cpp.
References m_screens, and m_sheets.
Referenced by buildScreenList().
| void SCH_SCREENS::BuildClientSheetPathList | ( | ) |
Build the list of sheet paths sharing a screen for each screen in use.
Definition at line 2370 of file sch_screen.cpp.
References GetFirst(), GetNext(), SCHEMATIC::HasHierarchy(), SCHEMATIC::Hierarchy(), and SCH_SCREEN::Schematic().
Referenced by ClearAnnotationOfNewSheetPaths(), SCH_SEARCH_HANDLER::FindAll(), SCH_FIND_REPLACE_TOOL::FindNext(), and SCH_EDIT_FRAME::SaveProject().
|
private |
Definition at line 2104 of file sch_screen.cpp.
References addScreenToList(), buildScreenList(), SCH_SHEET::GetScreen(), SCH_SCREEN::Items(), EE_RTREE::OfType(), SCH_SHEET_T, and EDA_ITEM::Type().
Referenced by buildScreenList(), and SCH_SCREENS().
| int SCH_SCREENS::ChangeSymbolLibNickname | ( | const wxString & | aFrom, |
| const wxString & | aTo ) |
Change all of the symbol library nicknames.
| [in] | aFrom | the current symbol library name to change. |
| [in] | aTo | the new symbol library name. |
Definition at line 2333 of file sch_screen.cpp.
References GetFirst(), SCH_SYMBOL::GetLibId(), LIB_ID::GetLibNickname(), GetNext(), SCH_SCREEN::Items(), EE_RTREE::OfType(), SCH_SYMBOL_T, SCH_SYMBOL::SetLibId(), LIB_ID::SetLibNickname(), and UTF8::wx_str().
| void SCH_SCREENS::ClearAnnotationOfNewSheetPaths | ( | SCH_SHEET_LIST & | aInitialSheetPathList | ) |
Clear the annotation for the symbols inside new sheetpaths when a complex hierarchy is modified and new sheetpaths added when a screen shares more than one sheet path, missing alternate references are added and alternate references of new sheet paths are cleared.
| aInitialSheetPathList | is the initial sheet paths list of hierarchy before changes. |
Definition at line 2121 of file sch_screen.cpp.
References BuildClientSheetPathList(), SCH_SCREEN::ClearAnnotation(), SCH_SCREEN::EnsureAlternateReferencesExist(), GetFirst(), SCHEMATIC::Hierarchy(), SCHEMATIC::Root(), SCH_SCREENS(), and SCH_SCREEN::Schematic().
Referenced by SCH_EDIT_TOOL::EditProperties().
| void SCH_SCREENS::ClearEditFlags | ( | ) |
Definition at line 2212 of file sch_screen.cpp.
References GetFirst(), and GetNext().
Referenced by SCH_IO_ALTIUM::LoadSchematicFile(), and SCH_IO_PADS::LoadSchematicFile().
| void SCH_SCREENS::CopyVariant | ( | const wxString & | aSourceVariant, |
| const wxString & | aNewVariant, | ||
| SCH_COMMIT * | aCommit = nullptr ) |
Definition at line 2501 of file sch_screen.cpp.
References m_screens.
Referenced by SCHEMATIC::CopyVariant().
| void SCH_SCREENS::DeleteAllMarkers | ( | enum MARKER_BASE::MARKER_T | aMarkerType, |
| bool | aIncludeExclusions ) |
Delete all electronic rules check markers of aMarkerType from all the screens in the list.
| aMarkerType | Type of markers to be deleted. |
Definition at line 2264 of file sch_screen.cpp.
References DeleteMarkers(), and ERCE_UNSPECIFIED.
Referenced by DIALOG_ERC::deleteAllMarkers().
| void SCH_SCREENS::DeleteMarker | ( | SCH_MARKER * | aMarker | ) |
Delete a specific marker.
Definition at line 2222 of file sch_screen.cpp.
References GetFirst(), GetNext(), and SCH_MARKER_T.
Referenced by SHEETLIST_ERC_ITEMS_PROVIDER::DeleteItem().
| void SCH_SCREENS::DeleteMarkers | ( | enum MARKER_BASE::MARKER_T | aMarkerTyp, |
| int | aErrorCode, | ||
| bool | aIncludeExclusions = true ) |
Delete all markers of a particular type and error code.
Definition at line 2238 of file sch_screen.cpp.
References ERCE_UNSPECIFIED, GetFirst(), MARKER_BASE::GetMarkerType(), GetNext(), MARKER_BASE::GetRCItem(), MARKER_BASE::IsExcluded(), and SCH_MARKER_T.
Referenced by DeleteAllMarkers(), and DIALOG_ERC::OnERCItemRClick().
| void SCH_SCREENS::DeleteVariant | ( | const wxString & | aVariantName, |
| SCH_COMMIT * | aCommit = nullptr ) |
Definition at line 2482 of file sch_screen.cpp.
References m_screens.
Referenced by SCHEMATIC::DeleteVariant().
| void SCH_SCREENS::FixLegacyPowerSymbolMismatches | ( | ) |
Fix legacy power symbols that have mismatched value text fields and invisible power pin names.
Definition at line 2412 of file sch_screen.cpp.
References GetFirst(), and GetNext().
Referenced by EESCHEMA_HELPERS::LoadSchematic(), and KI_TEST::LoadSchematic().
|
inline |
Definition at line 755 of file sch_screen.h.
References m_screens.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), PrepareSaveAsFiles(), and SCH_EDIT_FRAME::SaveProject().
| SCH_SCREEN * SCH_SCREENS::GetFirst | ( | ) |
Definition at line 2050 of file sch_screen.cpp.
References m_index, and m_screens.
Referenced by SCH_EDIT_FRAME::AskToSaveChanges(), BuildClientSheetPathList(), ChangeSymbolLibNickname(), ClearAnnotationOfNewSheetPaths(), ClearEditFlags(), DeleteMarker(), DeleteMarkers(), SCH_SEARCH_HANDLER::FindAll(), SCH_FIND_REPLACE_TOOL::FindNext(), FixLegacyPowerSymbolMismatches(), SCHEMATIC::FixupJunctionsAfterImport(), GetLibNicknames(), SCHEMATIC::GetSchematicsSharedByMultipleProjects(), getSymbols(), HasNoFullyDefinedLibIds(), HasSchematic(), SCHEMATIC::IsComplexHierarchy(), EESCHEMA_JOBS_HANDLER::JobExportPlot(), SCH_IO_EAGLE::loadModuleInstance(), EESCHEMA_HELPERS::LoadSchematic(), KI_TEST::LoadSchematic(), SCH_IO_ALTIUM::LoadSchematicFile(), SCH_IO_ALTIUM::LoadSchematicProject(), DIALOG_EESCHEMA_PAGE_SETTINGS::onSavePageSettings(), PruneOrphanedSheetInstances(), PruneOrphanedSymbolInstances(), SCH::readSchematicFromFile(), SCH_FIND_REPLACE_TOOL::ReplaceAll(), SCH_EDITOR_CONTROL::Revert(), SCHEMATIC::RunOnNestedEmbeddedFiles(), SCH_EDIT_FRAME::SaveProject(), SCHEMATIC::SetCurrentVariant(), SetLegacySymbolInstanceData(), SCHEMATIC::SetSheetNumberAndCount(), DIALOG_LABEL_PROPERTIES::TransferDataToWindow(), and UpdateSymbolLinks().
| size_t SCH_SCREENS::GetLibNicknames | ( | wxArrayString & | aLibNicknames | ) |
Fetch all of the symbol library nicknames into aLibNicknames.
| [out] | aLibNicknames | is the array to populate with all of the unique library nicknames. |
Definition at line 2315 of file sch_screen.cpp.
References UTF8::empty(), GetFirst(), SCH_SYMBOL::GetLibId(), LIB_ID::GetLibNickname(), GetNext(), and SCH_SYMBOL_T.
Referenced by SCH_EDIT_FRAME::LoadSheetFromFile().
| SCH_SCREEN * SCH_SCREENS::GetNext | ( | ) |
Definition at line 2061 of file sch_screen.cpp.
References GetScreen(), m_index, and m_screens.
Referenced by SCH_EDIT_FRAME::AskToSaveChanges(), BuildClientSheetPathList(), ChangeSymbolLibNickname(), ClearEditFlags(), DeleteMarker(), DeleteMarkers(), SCH_SEARCH_HANDLER::FindAll(), SCH_FIND_REPLACE_TOOL::FindNext(), FixLegacyPowerSymbolMismatches(), SCHEMATIC::FixupJunctionsAfterImport(), GetLibNicknames(), SCHEMATIC::GetSchematicsSharedByMultipleProjects(), getSymbols(), HasNoFullyDefinedLibIds(), HasSchematic(), SCHEMATIC::IsComplexHierarchy(), EESCHEMA_JOBS_HANDLER::JobExportPlot(), SCH_IO_EAGLE::loadModuleInstance(), EESCHEMA_HELPERS::LoadSchematic(), KI_TEST::LoadSchematic(), SCH_IO_ALTIUM::LoadSchematicFile(), SCH_IO_ALTIUM::LoadSchematicProject(), DIALOG_EESCHEMA_PAGE_SETTINGS::onSavePageSettings(), PruneOrphanedSheetInstances(), PruneOrphanedSymbolInstances(), SCH::readSchematicFromFile(), SCH_FIND_REPLACE_TOOL::ReplaceAll(), SCH_EDITOR_CONTROL::Revert(), SCHEMATIC::RunOnNestedEmbeddedFiles(), SCHEMATIC::SetCurrentVariant(), SetLegacySymbolInstanceData(), SCHEMATIC::SetSheetNumberAndCount(), DIALOG_LABEL_PROPERTIES::TransferDataToWindow(), and UpdateSymbolLinks().
| SCH_SCREEN * SCH_SCREENS::GetScreen | ( | unsigned int | aIndex | ) | const |
Definition at line 2070 of file sch_screen.cpp.
References m_screens.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), GetNext(), PrepareSaveAsFiles(), and SCH_EDIT_FRAME::SaveProject().
| SCH_SHEET * SCH_SCREENS::GetSheet | ( | unsigned int | aIndex | ) | const |
Definition at line 2079 of file sch_screen.cpp.
References m_sheets.
Referenced by SCH_EDIT_FRAME::SaveProject().
| std::set< wxString > SCH_SCREENS::GetVariantNames | ( | ) | const |
Definition at line 2468 of file sch_screen.cpp.
References m_screens.
Referenced by SCHEMATIC::LoadVariants(), and SCHEMATIC::rebuildHierarchyState().
| bool SCH_SCREENS::HasNoFullyDefinedLibIds | ( | ) |
Test all of the schematic symbols to see if all LIB_ID objects library nickname is not set.
If none of the LIB_ID object library nicknames are not set, this indicates that the project was created before the symbol library implementation.
Definition at line 2294 of file sch_screen.cpp.
References UTF8::empty(), GetFirst(), SCH_SYMBOL::GetLibId(), LIB_ID::GetLibNickname(), GetNext(), and SCH_SYMBOL_T.
Referenced by SCH_EDIT_FRAME::checkForNoFullyDefinedLibIds().
| bool SCH_SCREENS::HasSchematic | ( | const wxString & | aSchematicFileName | ) |
Check if one of the schematics in the list of screens is aSchematicFileName.
Schematic file names in SCH_SCREEN object are stored with the absolute path to the schematic file.
| [in] | aSchematicFileName | is the schematic file name to search. |
Definition at line 2358 of file sch_screen.cpp.
References GetFirst(), and GetNext().
Referenced by SCH_EDIT_FRAME::LoadSheetFromFile().
| bool SCH_SCREENS::HasSymbolFieldNamesWithWhiteSpace | ( | ) | const |
Definition at line 2456 of file sch_screen.cpp.
References m_screens.
| void SCH_SCREENS::PruneOrphanedSheetInstances | ( | const wxString & | aProjectName, |
| const SCH_SHEET_LIST & | aValidSheetPaths ) |
Definition at line 2445 of file sch_screen.cpp.
References GetFirst(), and GetNext().
Referenced by SCH_EDITOR_CONTROL::Paste().
| void SCH_SCREENS::PruneOrphanedSymbolInstances | ( | const wxString & | aProjectName, |
| const SCH_SHEET_LIST & | aValidSheetPaths ) |
Definition at line 2434 of file sch_screen.cpp.
References GetFirst(), and GetNext().
Referenced by BOOST_FIXTURE_TEST_CASE(), and SCH_EDITOR_CONTROL::Paste().
| void SCH_SCREENS::RenameVariant | ( | const wxString & | aOldName, |
| const wxString & | aNewName, | ||
| SCH_COMMIT * | aCommit = nullptr ) |
Definition at line 2491 of file sch_screen.cpp.
References m_screens.
Referenced by SCHEMATIC::RenameVariant().
| int SCH_SCREENS::ReplaceDuplicateTimeStamps | ( | ) |
Test all sheet and symbol objects in the schematic for duplicate time stamps and replaces them as necessary.
Time stamps must be unique in order for complex hierarchies know which symbols go to which sheets.
Definition at line 2167 of file sch_screen.cpp.
References m_screens, and EDA_ITEM::m_Uuid.
Referenced by SCH_EDIT_FRAME::AnnotateSymbols(), BOOST_AUTO_TEST_CASE(), and SCH_EDIT_FRAME::LoadSheetFromFile().
| void SCH_SCREENS::SetLegacySymbolInstanceData | ( | ) |
Update the symbol value and footprint instance data for legacy designs.
Definition at line 2405 of file sch_screen.cpp.
References GetFirst(), and GetNext().
Referenced by SCHEMATIC::SetLegacySymbolInstanceData().
| void SCH_SCREENS::UpdateSymbolLinks | ( | REPORTER * | aReporter = nullptr | ) |
Initialize the LIB_SYMBOL reference for each SCH_SYMBOL found in the full schematic.
| [in] | aReporter | An optional REPORTER object pointer to write warning and error messages into. |
Definition at line 2271 of file sch_screen.cpp.
References SCHEMATIC::ConnectionGraph(), GetFirst(), GetNext(), SCHEMATIC::Hierarchy(), CONNECTION_GRAPH::Recalculate(), and SCH_SCREEN::Schematic().
Referenced by SCH_IO_ALTIUM::LoadSchematicFile(), SCH_IO_EAGLE::LoadSchematicFile(), and SCH_IO_PADS::LoadSchematicFile().
|
private |
Definition at line 896 of file sch_screen.h.
Referenced by GetFirst(), GetNext(), and SCH_SCREENS().
|
private |
Definition at line 894 of file sch_screen.h.
Referenced by addScreenToList(), CopyVariant(), DeleteVariant(), GetCount(), GetFirst(), GetNext(), GetScreen(), GetVariantNames(), HasSymbolFieldNamesWithWhiteSpace(), RenameVariant(), and ReplaceDuplicateTimeStamps().
|
private |
Definition at line 895 of file sch_screen.h.
Referenced by addScreenToList(), and GetSheet().