KiCad PCB EDA Suite
|
A container for handling SCH_SHEET_PATH objects in a flattened hierarchy. More...
#include <sch_sheet_path.h>
Public Member Functions | |
SCH_SHEET_LIST (SCH_SHEET *aSheet=nullptr) | |
Construct a flattened list of SCH_SHEET_PATH objects from aSheet. | |
~SCH_SHEET_LIST () | |
bool | IsModified () const |
Check the entire hierarchy for any modifications. | |
void | ClearModifyStatus () |
SCH_ITEM * | GetItem (const KIID &aID, SCH_SHEET_PATH *aPathOut=nullptr) const |
Fetch a SCH_ITEM by ID. | |
void | FillItemMap (std::map< KIID, EDA_ITEM * > &aMap) |
Fill an item cache for temporary use when many items need to be fetched. | |
void | AnnotatePowerSymbols () |
Silently annotate the not yet annotated power symbols of the entire hierarchy of the sheet path list. | |
void | GetSymbols (SCH_REFERENCE_LIST &aReferences, bool aIncludePowerSymbols=true, bool aForceIncludeOrphanSymbols=false) const |
Add a SCH_REFERENCE object to aReferences for each symbol in the list of sheets. | |
void | GetSymbolsWithinPath (SCH_REFERENCE_LIST &aReferences, const SCH_SHEET_PATH &aSheetPath, bool aIncludePowerSymbols=true, bool aForceIncludeOrphanSymbols=false) const |
Add a SCH_REFERENCE object to aReferences for each symbol in the list of sheets that are contained within aSheetPath as well as recursively downwards inside aSheetPath. | |
void | GetSheetsWithinPath (std::vector< SCH_SHEET_PATH > &aSheets, const SCH_SHEET_PATH &aSheetPath) const |
Add a SCH_SHEET_PATH object to aSheets for each sheet in the list that are contained within aSheetPath as well as recursively downwards inside aSheetPath. | |
std::optional< SCH_SHEET_PATH > | GetSheetPathByKIIDPath (const KIID_PATH &aPath, bool aIncludeLastSheet=true) const |
Finds a SCH_SHEET_PATH that matches the provided KIID_PATH. | |
void | GetMultiUnitSymbols (SCH_MULTI_UNIT_REFERENCE_MAP &aRefList, bool aIncludePowerSymbols=true) const |
Add a SCH_REFERENCE_LIST object to aRefList for each same-reference set of multi-unit parts in the list of sheets. | |
bool | TestForRecursion (const SCH_SHEET_LIST &aSrcSheetHierarchy, const wxString &aDestFileName) |
Test every SCH_SHEET_PATH in this SCH_SHEET_LIST to verify if adding the sheets stored in aSrcSheetHierarchy to the sheet stored in aDestFileName will cause recursion. | |
SCH_SHEET_PATH * | FindSheetForPath (const SCH_SHEET_PATH *aPath) |
Return a pointer to the first SCH_SHEET_PATH object (not necessarily the only one) matching the provided path. | |
SCH_SHEET_PATH | FindSheetForScreen (const SCH_SCREEN *aScreen) |
Return the first SCH_SHEET_PATH object (not necessarily the only one) using a particular screen. | |
SCH_SHEET_LIST | FindAllSheetsForScreen (const SCH_SCREEN *aScreen) const |
Return a SCH_SHEET_LIST with a copy of all the SCH_SHEET_PATH using a particular screen. | |
void | BuildSheetList (SCH_SHEET *aSheet, bool aCheckIntegrity) |
Build the list of sheets and their sheet path from aSheet. | |
void | SortByPageNumbers (bool aUpdateVirtualPageNums=true) |
Sort the list of sheets by page number. | |
bool | NameExists (const wxString &aSheetName) const |
bool | PageNumberExists (const wxString &aPageNumber) const |
void | TrimToPageNumbers (const std::vector< wxString > &aPageInclusions) |
Truncates the list by removing sheet's with page numbers not in the given list. | |
void | UpdateSymbolInstanceData (const std::vector< SCH_SYMBOL_INSTANCE > &aSymbolInstances) |
Update all of the symbol instance information using aSymbolInstances. | |
void | UpdateSheetInstanceData (const std::vector< SCH_SHEET_INSTANCE > &aSheetInstances) |
Update all of the sheet instance information using aSheetInstances. | |
std::vector< KIID_PATH > | GetPaths () const |
std::vector< SCH_SHEET_INSTANCE > | GetSheetInstances () const |
Fetch the instance information for all of the sheets in the hiearchy. | |
bool | AllSheetPageNumbersEmpty () const |
Check all of the sheet instance for empty page numbers. | |
void | SetInitialPageNumbers () |
Set initial sheet page numbers. | |
void | AddNewSymbolInstances (const SCH_SHEET_PATH &aPrefixSheetPath, const wxString &aProjectName) |
Attempt to add new symbol instances for all symbols in this list of sheet paths prefixed with aPrefixSheetPath. | |
void | AddNewSheetInstances (const SCH_SHEET_PATH &aPrefixSheetPath, int aLastVirtualPageNumber) |
int | GetLastVirtualPageNumber () const |
void | RemoveSymbolInstances (const SCH_SHEET_PATH &aPrefixSheetPath) |
void | CheckForMissingSymbolInstances (const wxString &aProjectName) |
bool | HasPath (const KIID_PATH &aPath) const |
bool | ContainsSheet (const SCH_SHEET *aSheet) const |
std::optional< SCH_SHEET_PATH > | GetOrdinalPath (const SCH_SCREEN *aScreen) const |
Return the ordinal sheet path of aScreen. | |
Public Attributes | |
T | elements |
STL member. | |
Private Attributes | |
SCH_SHEET_PATH | m_currentSheetPath |
A container for handling SCH_SHEET_PATH objects in a flattened hierarchy.
SCH_SHEET objects are not unique, there can be many sheets with the same filename and that share the same SCH_SCREEN reference. Each The schematic file (SCH_SCREEN) may be shared between these sheets and symbol references are specific to a sheet path. When a sheet is entered, symbol references and sheet page number are updated.
Definition at line 468 of file sch_sheet_path.h.
SCH_SHEET_LIST::SCH_SHEET_LIST | ( | SCH_SHEET * | aSheet = nullptr | ) |
Construct a flattened list of SCH_SHEET_PATH objects from aSheet.
If aSheet == NULL, then this is an empty hierarchy which the user can populate.
Definition at line 754 of file sch_sheet_path.cpp.
References BuildSheetList().
|
inline |
Definition at line 478 of file sch_sheet_path.h.
void SCH_SHEET_LIST::AddNewSheetInstances | ( | const SCH_SHEET_PATH & | aPrefixSheetPath, |
int | aLastVirtualPageNumber | ||
) |
Definition at line 1343 of file sch_sheet_path.cpp.
References SCH_SHEET::addInstance(), SCH_SHEET_PATH::at(), SCH_SHEET::getInstance(), SCH_SHEET_INSTANCE::m_PageNumber, SCH_SHEET_PATH::Path(), path, SCH_SHEET_PATH::SetPageNumber(), SCH_SHEET_PATH::SetVirtualPageNumber(), and SCH_SHEET_PATH::size().
Referenced by SCH_EDIT_FRAME::LoadSheetFromFile(), and DIALOG_SHEET_PROPERTIES::onSheetFilenameChanged().
void SCH_SHEET_LIST::AddNewSymbolInstances | ( | const SCH_SHEET_PATH & | aPrefixSheetPath, |
const wxString & | aProjectName | ||
) |
Attempt to add new symbol instances for all symbols in this list of sheet paths prefixed with aPrefixSheetPath.
aPrefixSheetPath | is the sheet path to append the new symbol instances to. |
aProjectName | is the name of the project for the new symbol instance data. |
Definition at line 1328 of file sch_sheet_path.cpp.
References SCH_SHEET_PATH::AddNewSymbolInstances().
Referenced by SCH_EDIT_FRAME::LoadSheetFromFile(), and DIALOG_SHEET_PROPERTIES::onSheetFilenameChanged().
bool SCH_SHEET_LIST::AllSheetPageNumbersEmpty | ( | ) | const |
Check all of the sheet instance for empty page numbers.
Definition at line 1299 of file sch_sheet_path.cpp.
References SCH_SHEET_PATH::GetPageNumber().
Referenced by BOOST_AUTO_TEST_CASE(), SCH_EDIT_FRAME::OpenProjectFiles(), and SetInitialPageNumbers().
void SCH_SHEET_LIST::AnnotatePowerSymbols | ( | ) |
Silently annotate the not yet annotated power symbols of the entire hierarchy of the sheet path list.
It is called before creating a netlist, to annotate power symbols, without prompting the user about not annotated or duplicate for these symbols, if only these symbols need annotation ( a very frequent case ).
Definition at line 972 of file sch_sheet_path.cpp.
References SCH_REFERENCE_LIST::AddItem(), SCH_REFERENCE_LIST::Annotate(), SCH_REFERENCE_LIST::GetCount(), SCH_SYMBOL::GetLibSymbolRef(), LIB_SYMBOL::IsPower(), SCH_SCREEN::Items(), SCH_SHEET_PATH::LastScreen(), EE_RTREE::OfType(), SCH_SYMBOL_T, SCH_REFERENCE_LIST::SplitReferences(), and SCH_REFERENCE_LIST::UpdateAnnotation().
Referenced by EESCHEMA_HELPERS::LoadSchematic(), KI_TEST::LoadSchematic(), SCH::readSchematicFromFile(), SCH_EDIT_FRAME::ReadyToNetlist(), ERC_TESTER::RunTests(), and SCH_EDIT_FRAME::WriteNetListFile().
void SCH_SHEET_LIST::BuildSheetList | ( | SCH_SHEET * | aSheet, |
bool | aCheckIntegrity | ||
) |
Build the list of sheets and their sheet path from aSheet.
If aSheet is the root sheet, the full sheet path and sheet list are built.
The list will be ordered as per #SCH_SCREEN::BuildSheetList which results in sheets being ordered in the legacy way of using the X and Y positions of the sheets.
aSheet | is the starting sheet from which the list is built, or NULL indicating that g_RootSheet should be used. |
std::bad_alloc | if the memory for the sheet path list could not be allocated. |
Definition at line 761 of file sch_sheet_path.cpp.
References BuildSheetList(), SCH_SHEET::GetFileName(), SCH_SCREEN::GetSheets(), SCH_SHEET_PATH::LastScreen(), m_currentSheetPath, SCH_SHEET_PATH::pop_back(), SCH_SHEET_PATH::push_back(), SCH_SCREEN::Remove(), BASE_SCREEN::SetContentModified(), SCH_SHEET_PATH::SetVirtualPageNumber(), and SCH_SHEET_PATH::TestForRecursion().
Referenced by BuildSheetList(), SCHEMATIC::BuildUnorderedSheetList(), SCH_PLOTTER::createDXFFiles(), SCH_PLOTTER::createHPGLFiles(), SCH_PLOTTER::createPDFFile(), SCH_PLOTTER::createPSFiles(), SCH_PLOTTER::createSVGFiles(), SCH_EDIT_TOOL::Properties(), SCH_SHEET_LIST(), and DIALOG_SHEET_PROPERTIES::TransferDataFromWindow().
void SCH_SHEET_LIST::CheckForMissingSymbolInstances | ( | const wxString & | aProjectName | ) |
Definition at line 1413 of file sch_sheet_path.cpp.
References SCH_SHEET_PATH::CheckForMissingSymbolInstances().
Referenced by SCH_EDIT_FRAME::OpenProjectFiles().
void SCH_SHEET_LIST::ClearModifyStatus | ( | ) |
Definition at line 898 of file sch_sheet_path.cpp.
References SCH_SHEET_PATH::LastScreen(), and BASE_SCREEN::SetContentModified().
Referenced by SCH_EDIT_FRAME::doCloseWindow().
bool SCH_SHEET_LIST::ContainsSheet | ( | const SCH_SHEET * | aSheet | ) | const |
Definition at line 1446 of file sch_sheet_path.cpp.
References path.
Referenced by SCH_EDITOR_CONTROL::updatePastedSheet().
Fill an item cache for temporary use when many items need to be fetched.
Definition at line 952 of file sch_sheet_path.cpp.
References SCH_SCREEN::Items(), SCH_SHEET_PATH::LastScreen(), and EDA_ITEM::m_Uuid.
Referenced by ERC_REPORT::GetTextReport(), SCH_EDITOR_CONTROL::Paste(), and ERC_REPORT::WriteJsonReport().
SCH_SHEET_LIST SCH_SHEET_LIST::FindAllSheetsForScreen | ( | const SCH_SCREEN * | aScreen | ) | const |
Return a SCH_SHEET_LIST with a copy of all the SCH_SHEET_PATH using a particular screen.
Definition at line 1176 of file sch_sheet_path.cpp.
References SCH_SHEET_PATH::LastScreen().
Referenced by SCH_EDITOR_CONTROL::Paste(), SCH_DRAWING_TOOLS::PlaceSymbol(), and SCH_FIND_REPLACE_TOOL::ReplaceAll().
SCH_SHEET_PATH * SCH_SHEET_LIST::FindSheetForPath | ( | const SCH_SHEET_PATH * | aPath | ) |
Return a pointer to the first SCH_SHEET_PATH object (not necessarily the only one) matching the provided path.
Returns nullptr if not found.
Definition at line 1152 of file sch_sheet_path.cpp.
References SCH_SHEET_PATH::Path(), and path.
Referenced by SCH_REFERENCE_LIST::ReannotateByOptions().
SCH_SHEET_PATH SCH_SHEET_LIST::FindSheetForScreen | ( | const SCH_SCREEN * | aScreen | ) |
Return the first SCH_SHEET_PATH object (not necessarily the only one) using a particular screen.
Definition at line 1164 of file sch_sheet_path.cpp.
References SCH_SHEET_PATH::LastScreen().
Referenced by SCH_EDIT_FRAME::PutDataInPreviousState().
SCH_ITEM * SCH_SHEET_LIST::GetItem | ( | const KIID & | aID, |
SCH_SHEET_PATH * | aPathOut = nullptr |
||
) | const |
Fetch a SCH_ITEM by ID.
Also returns the sheet the item was found on in aPathOut.
Definition at line 908 of file sch_sheet_path.cpp.
References DELETED_SHEET_ITEM::GetInstance(), and SCH_SHEET_PATH::GetItem().
Referenced by SCH_MARKER::DeserializeFromString(), SCHEMATIC::GetItem(), SCHEMATIC::ResolveERCExclusionsPostUpdate(), and SCH_EDIT_FRAME::SaveSymbolToSchematic().
int SCH_SHEET_LIST::GetLastVirtualPageNumber | ( | ) | const |
Definition at line 1420 of file sch_sheet_path.cpp.
References SCH_SHEET_PATH::GetVirtualPageNumber().
Referenced by SCH_EDIT_FRAME::LoadSheetFromFile(), and DIALOG_SHEET_PROPERTIES::onSheetFilenameChanged().
void SCH_SHEET_LIST::GetMultiUnitSymbols | ( | SCH_MULTI_UNIT_REFERENCE_MAP & | aRefList, |
bool | aIncludePowerSymbols = true |
||
) | const |
Add a SCH_REFERENCE_LIST object to aRefList for each same-reference set of multi-unit parts in the list of sheets.
The map key for each element will be the reference designator.
aRefList | Map of reference designators to reference lists |
aIncludePowerSymbols | Set to false to only get normal symbols. |
Definition at line 1092 of file sch_sheet_path.cpp.
Referenced by SCH_EDIT_FRAME::AnnotateSymbols(), BACK_ANNOTATE::BackAnnotateSymbols(), and ERC_TESTER::ERC_TESTER().
std::optional< SCH_SHEET_PATH > SCH_SHEET_LIST::GetOrdinalPath | ( | const SCH_SCREEN * | aScreen | ) | const |
Return the ordinal sheet path of aScreen.
Definition at line 1461 of file sch_sheet_path.cpp.
References path.
Referenced by BOOST_AUTO_TEST_CASE().
std::vector< KIID_PATH > SCH_SHEET_LIST::GetPaths | ( | ) | const |
Definition at line 1264 of file sch_sheet_path.cpp.
References SCH_SHEET_PATH::Path().
std::vector< SCH_SHEET_INSTANCE > SCH_SHEET_LIST::GetSheetInstances | ( | ) | const |
Fetch the instance information for all of the sheets in the hiearchy.
Definition at line 1275 of file sch_sheet_path.cpp.
References SCH_SHEET_INSTANCE::m_PageNumber, SCH_SHEET_INSTANCE::m_Path, SCH_SHEET_PATH::Path(), path, and SCH_SHEET_PATH::pop_back().
std::optional< SCH_SHEET_PATH > SCH_SHEET_LIST::GetSheetPathByKIIDPath | ( | const KIID_PATH & | aPath, |
bool | aIncludeLastSheet = true |
||
) | const |
Finds a SCH_SHEET_PATH that matches the provided KIID_PATH.
aPath | The KIID_PATH to search for. |
Definition at line 1074 of file sch_sheet_path.cpp.
References SCH_SHEET_PATH::Path().
Referenced by SCH_MARKER::DeserializeFromString(), findItemsFromSyncSelection(), SCH_SCREEN::PruneOrphanedSheetInstances(), SCH_SCREEN::PruneOrphanedSymbolInstances(), SCH_IO_KICAD_SEXPR::saveSheet(), and SCH_IO_KICAD_SEXPR::saveSymbol().
void SCH_SHEET_LIST::GetSheetsWithinPath | ( | std::vector< SCH_SHEET_PATH > & | aSheets, |
const SCH_SHEET_PATH & | aSheetPath | ||
) | const |
Add a SCH_SHEET_PATH object to aSheets for each sheet in the list that are contained within aSheetPath as well as recursively downwards inside aSheetPath.
aReferences | List of sheets to populate. |
aSheetPath | Path to return sheets from |
Definition at line 1063 of file sch_sheet_path.cpp.
References SCH_SHEET_PATH::IsContainedWithin().
Referenced by SCH_EDIT_FRAME::AnnotateSymbols(), SCH_EDIT_FRAME::CheckAnnotate(), SCH_EDIT_FRAME::DeleteAnnotation(), and DIALOG_SYMBOL_FIELDS_TABLE::getSheetSymbolReferences().
void SCH_SHEET_LIST::GetSymbols | ( | SCH_REFERENCE_LIST & | aReferences, |
bool | aIncludePowerSymbols = true , |
||
bool | aForceIncludeOrphanSymbols = false |
||
) | const |
Add a SCH_REFERENCE object to aReferences for each symbol in the list of sheets.
aReferences | List of references to populate. |
aIncludePowerSymbols | Set to false to only get normal symbols. |
aForceIncludeOrphanSymbols | Set to true to include symbols having no symbol found in lib. The normal option is false, and set to true only to build the full list of symbols. |
Definition at line 1042 of file sch_sheet_path.cpp.
References SCH_SHEET_PATH::GetSymbols().
Referenced by SCH_EDIT_FRAME::AnnotateSymbols(), SCH_EDITOR_CONTROL::AssignFootprints(), BACK_ANNOTATE::BackAnnotateSymbols(), SCH_EDIT_FRAME::CheckAnnotate(), SCHEMATIC::ConvertRefsToKIIDs(), DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE(), SCH_EDITOR_CONTROL::ExportSymbolsToLibrary(), FindSymbolByRefAndUnit(), TEST_SCH_REFERENCE_LIST_FIXTURE::getAdditionalRefs(), DIALOG_TABLE_PROPERTIES::getContextualTextVars(), DIALOG_TEXT_PROPERTIES::getContextualTextVars(), GetUnplacedUnitsForSymbol(), SCH_EDITOR_CONTROL::IncrementAnnotations(), DIALOG_EDIT_SYMBOLS_LIBID::initDlg(), EESCHEMA_JOBS_HANDLER::JobExportBom(), EESCHEMA_JOBS_HANDLER::JobExportNetlist(), EESCHEMA_JOBS_HANDLER::JobExportPythonBom(), SCH_EDIT_FRAME::mapExistingAnnotation(), DIALOG_SYMBOL_FIELDS_TABLE::OnSchItemsAdded(), DIALOG_SYMBOL_FIELDS_TABLE::OnSchItemsChanged(), SCH_FIELD::OnScintillaCharAdded(), SCH_EDITOR_CONTROL::Paste(), SCH_DRAWING_TOOLS::PlaceSymbol(), and SCH_EDITOR_CONTROL::processCmpToFootprintLinkFile().
void SCH_SHEET_LIST::GetSymbolsWithinPath | ( | SCH_REFERENCE_LIST & | aReferences, |
const SCH_SHEET_PATH & | aSheetPath, | ||
bool | aIncludePowerSymbols = true , |
||
bool | aForceIncludeOrphanSymbols = false |
||
) | const |
Add a SCH_REFERENCE object to aReferences for each symbol in the list of sheets that are contained within aSheetPath as well as recursively downwards inside aSheetPath.
aReferences | List of references to populate. |
aSheetPath | Path to return symbols from |
aIncludePowerSymbols | Set to false to only get normal symbols. |
aForceIncludeOrphanSymbols | Set to true to include symbols having no symbol found in lib. The normal option is false, and set to true only to build the full list of symbols. |
Definition at line 1050 of file sch_sheet_path.cpp.
References SCH_SHEET_PATH::GetSymbols(), and SCH_SHEET_PATH::IsContainedWithin().
Referenced by SCH_EDIT_FRAME::AnnotateSymbols(), and DIALOG_SYMBOL_FIELDS_TABLE::getSheetSymbolReferences().
bool SCH_SHEET_LIST::HasPath | ( | const KIID_PATH & | aPath | ) | const |
Definition at line 1434 of file sch_sheet_path.cpp.
References path.
Referenced by SCHEMATIC::GetSchematicsSharedByMultipleProjects(), DIALOG_CHANGE_SYMBOLS::getSymbolReferences(), and SCH_EDITOR_CONTROL::Paste().
bool SCH_SHEET_LIST::IsModified | ( | ) | const |
Check the entire hierarchy for any modifications.
Definition at line 886 of file sch_sheet_path.cpp.
References BASE_SCREEN::IsContentModified(), and SCH_SHEET_PATH::LastScreen().
Referenced by SCH_EDIT_FRAME::IsContentModified(), and SCH_EDIT_FRAME::OpenProjectFiles().
bool SCH_SHEET_LIST::NameExists | ( | const wxString & | aSheetName | ) | const |
Definition at line 848 of file sch_sheet_path.cpp.
References SCH_SHEET::GetName(), and SCH_SHEET_PATH::Last().
Referenced by SCH_EDITOR_CONTROL::Paste().
bool SCH_SHEET_LIST::PageNumberExists | ( | const wxString & | aPageNumber | ) | const |
Definition at line 860 of file sch_sheet_path.cpp.
References SCH_SHEET_PATH::GetPageNumber().
Referenced by SCH_EDITOR_CONTROL::Paste().
void SCH_SHEET_LIST::RemoveSymbolInstances | ( | const SCH_SHEET_PATH & | aPrefixSheetPath | ) |
Definition at line 1336 of file sch_sheet_path.cpp.
References SCH_SHEET_PATH::RemoveSymbolInstances().
void SCH_SHEET_LIST::SetInitialPageNumbers | ( | ) |
Set initial sheet page numbers.
The number scheme is base on the old pseudo sheet numbering algorithm prior to the implementation of user definable sheet page numbers.
Definition at line 1311 of file sch_sheet_path.cpp.
References AllSheetPageNumbersEmpty(), and SCH_SHEET_PATH::SetPageNumber().
Referenced by BOOST_AUTO_TEST_CASE(), and SCH_EDIT_FRAME::OpenProjectFiles().
void SCH_SHEET_LIST::SortByPageNumbers | ( | bool | aUpdateVirtualPageNums = true | ) |
Sort the list of sheets by page number.
This should be called after BuildSheetList
If page numbers happen to be equal, then it compares the sheet names to ensure deterministic ordering.
aUpdateVirtualPageNums | If true, updates the virtual page numbers to match the new ordering |
Enforce strict ordering. If the page numbers are the same, use UUIDs
Definition at line 813 of file sch_sheet_path.cpp.
References SCH_SHEET::ComparePageNum(), SCH_SHEET_PATH::GetCachedPageNumber(), SCH_SHEET_PATH::GetCurrentHash(), SCH_SHEET_PATH::GetVirtualPageNumber(), path, and SCH_SHEET_PATH::SetVirtualPageNumber().
Referenced by SCH_PLOTTER::createDXFFiles(), SCH_PLOTTER::createHPGLFiles(), SCH_PLOTTER::createPDFFile(), SCH_PLOTTER::createPSFiles(), SCH_PLOTTER::createSVGFiles(), SCH_FIND_REPLACE_TOOL::FindNext(), SCH_PRINTOUT::OnPrintPage(), SCH_EDITOR_CONTROL::Paste(), and SCH_DRAWING_TOOLS::PlaceSymbol().
bool SCH_SHEET_LIST::TestForRecursion | ( | const SCH_SHEET_LIST & | aSrcSheetHierarchy, |
const wxString & | aDestFileName | ||
) |
Test every SCH_SHEET_PATH in this SCH_SHEET_LIST to verify if adding the sheets stored in aSrcSheetHierarchy to the sheet stored in aDestFileName will cause recursion.
aSrcSheetHierarchy | is the SCH_SHEET_LIST of the source sheet add to aDestFileName. |
aDestFileName | is the file name of the destination sheet for aSrcFileName. |
Definition at line 1112 of file sch_sheet_path.cpp.
References empty(), SCH_SHEET::GetFileName(), SCHEMATIC::GetFileName(), SCH_SHEET_PATH::GetSheet(), and SCH_SHEET_PATH::size().
Referenced by SCH_EDIT_FRAME::CheckSheetForRecursion(), and SCH_EDITOR_CONTROL::Paste().
void SCH_SHEET_LIST::TrimToPageNumbers | ( | const std::vector< wxString > & | aPageInclusions | ) |
Truncates the list by removing sheet's with page numbers not in the given list.
aPageInclusions | List of Page Numbers (non-virtual) to keep |
Definition at line 872 of file sch_sheet_path.cpp.
References SCH_SHEET_PATH::GetPageNumber().
Referenced by SCH_PLOTTER::createDXFFiles(), SCH_PLOTTER::createHPGLFiles(), SCH_PLOTTER::createPDFFile(), SCH_PLOTTER::createPSFiles(), and SCH_PLOTTER::createSVGFiles().
void SCH_SHEET_LIST::UpdateSheetInstanceData | ( | const std::vector< SCH_SHEET_INSTANCE > & | aSheetInstances | ) |
Update all of the sheet instance information using aSheetInstances.
aSymbolInstances | is the symbol path information loaded from the root schematic. |
Definition at line 1234 of file sch_sheet_path.cpp.
References SCH_SHEET::GetName(), path, and traceSchSheetPaths.
Referenced by EESCHEMA_HELPERS::LoadSchematic(), KI_TEST::LoadSchematic(), and SCH_EDIT_FRAME::OpenProjectFiles().
void SCH_SHEET_LIST::UpdateSymbolInstanceData | ( | const std::vector< SCH_SYMBOL_INSTANCE > & | aSymbolInstances | ) |
Update all of the symbol instance information using aSymbolInstances.
WARNING: Do not call this on anything other than the full hierarchy.
aSymbolInstances | is the symbol path information loaded from the root schematic. |
Definition at line 1190 of file sch_sheet_path.cpp.
References SCH_SYMBOL::AddHierarchicalReference(), KIID_PATH::AsString(), SCH_SYMBOL::GetField(), SCH_SCREEN::Items(), SCH_SHEET_PATH::LastScreen(), EDA_ITEM::m_Uuid, EE_RTREE::OfType(), SCH_SHEET_PATH::Path(), REFERENCE_FIELD, SCH_SYMBOL_T, SCH_SYMBOL::SetFootprintFieldText(), SCH_FIELD::SetText(), SCH_SYMBOL::SetValueFieldText(), traceSchSheetPaths, and SCH_SYMBOL::UpdatePrefix().
Referenced by EESCHEMA_HELPERS::LoadSchematic(), KI_TEST::LoadSchematic(), SCH_EDIT_FRAME::LoadSheetFromFile(), SCH_EDIT_FRAME::OpenProjectFiles(), and SCH::readSchematicFromFile().
|
inherited |
STL member.
|
private |
Definition at line 711 of file sch_sheet_path.h.
Referenced by BuildSheetList().