![]() |
KiCad PCB EDA Suite
|
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened schematic hierarchy. More...
#include <sch_sheet_path.h>
Public Member Functions | |
SCH_SHEET_PATH () | |
SCH_SHEET_PATH (const SCH_SHEET_PATH &aOther) | |
SCH_SHEET_PATH & | operator= (const SCH_SHEET_PATH &aOther) |
~SCH_SHEET_PATH ()=default | |
SCH_SHEET * | at (size_t aIndex) const |
Forwarded method from std::vector. More... | |
void | clear () |
Forwarded method from std::vector. More... | |
bool | empty () const |
Forwarded method from std::vector. More... | |
void | pop_back () |
Forwarded method from std::vector. More... | |
void | push_back (SCH_SHEET *aSheet) |
Forwarded method from std::vector. More... | |
size_t | size () const |
Forwarded method from std::vector. More... | |
void | Rehash () |
size_t | GetCurrentHash () const |
void | SetVirtualPageNumber (int aPageNumber) |
Set the sheet instance virtual page number. More... | |
int | GetVirtualPageNumber () const |
void | SetPageNumber (const wxString &aPageNumber) |
Set the sheet instance user definable page number. More... | |
wxString | GetPageNumber () const |
const SCH_SHEET * | GetSheet (unsigned aIndex) const |
bool | IsFullPath () const |
int | Cmp (const SCH_SHEET_PATH &aSheetPathToTest) const |
Compare if this is the same sheet path as aSheetPathToTest. More... | |
int | ComparePageNum (const SCH_SHEET_PATH &aSheetPathToTest) const |
Compare sheets by their page number. More... | |
bool | IsContainedWithin (const SCH_SHEET_PATH &aSheetPathToTest) const |
Check if this path is contained inside aSheetPathToTest. More... | |
SCH_SHEET * | Last () const |
Return a pointer to the last SCH_SHEET of the list. More... | |
SCH_SCREEN * | LastScreen () |
SCH_SCREEN * | LastScreen () const |
wxString | PathAsString () const |
Return the path of time stamps which do not changes even when editing sheet parameters. More... | |
KIID_PATH | Path () const |
Get the sheet path as an KIID_PATH. More... | |
KIID_PATH | PathWithoutRootUuid () const |
Get the sheet path as an KIID_PATH without the root sheet UUID prefix. More... | |
wxString | PathHumanReadable (bool aUseShortRootName=true) const |
Return the sheet path in a human readable form made from the sheet names. More... | |
void | UpdateAllScreenReferences () |
Update all the symbol references for this sheet path. More... | |
void | AppendSymbol (SCH_REFERENCE_LIST &aReferences, SCH_SYMBOL *aSymbol, bool aIncludePowerSymbols=true, bool aForceIncludeOrphanSymbols=false) const |
Append a SCH_REFERENCE object to aReferences based on aSymbol. More... | |
void | GetSymbols (SCH_REFERENCE_LIST &aReferences, bool aIncludePowerSymbols=true, bool aForceIncludeOrphanSymbols=false) const |
Adds SCH_REFERENCE object to aReferences for each symbol in the sheet. More... | |
void | AppendMultiUnitSymbol (SCH_MULTI_UNIT_REFERENCE_MAP &aRefList, SCH_SYMBOL *aSymbol, bool aIncludePowerSymbols=true) const |
Append a SCH_REFERENCE_LIST object to aRefList based on aSymbol, storing same-reference set of multi-unit parts together. More... | |
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 sheet. More... | |
bool | TestForRecursion (const wxString &aSrcFileName, const wxString &aDestFileName) |
Test the SCH_SHEET_PATH file names to check adding the sheet stored in the file aSrcFileName to the sheet stored in file aDestFileName will cause a sheet path recursion. More... | |
void | MakeFilePathRelativeToParentSheet () |
Make the sheet file name relative to its parent sheet. More... | |
bool | operator== (const SCH_SHEET_PATH &d1) const |
bool | operator!= (const SCH_SHEET_PATH &d1) const |
bool | operator< (const SCH_SHEET_PATH &d1) const |
Protected Attributes | |
std::vector< SCH_SHEET * > | m_sheets |
size_t | m_current_hash |
int | m_virtualPageNumber |
std::map< std::pair< wxString, wxString >, bool > | m_recursion_test_cache |
Page numbers are maintained by the sheet load order. More... | |
Private Member Functions | |
void | initFromOther (const SCH_SHEET_PATH &aOther) |
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened schematic hierarchy.
The SCH_SHEET objects are stored in a list from first (usually the root sheet) to a given sheet in last position. The last sheet is usually the sheet we want to select or reach (which is what the function Last() returns). Others sheets constitute the "path" from the first to the last sheet.
Definition at line 128 of file sch_sheet_path.h.
SCH_SHEET_PATH::SCH_SHEET_PATH | ( | ) |
Definition at line 98 of file sch_sheet_path.cpp.
References m_current_hash, and m_virtualPageNumber.
SCH_SHEET_PATH::SCH_SHEET_PATH | ( | const SCH_SHEET_PATH & | aOther | ) |
Definition at line 105 of file sch_sheet_path.cpp.
References initFromOther().
|
default |
void SCH_SHEET_PATH::AppendMultiUnitSymbol | ( | SCH_MULTI_UNIT_REFERENCE_MAP & | aRefList, |
SCH_SYMBOL * | aSymbol, | ||
bool | aIncludePowerSymbols = true |
||
) | const |
Append a SCH_REFERENCE_LIST object to aRefList based on aSymbol, storing same-reference set of multi-unit parts together.
The map key for each element will be the reference designator.
aRefList | Map of reference designators to reference lists |
aSymbol | A symbol to add to aRefList |
aIncludePowerSymbols | Set to false to only get normal symbols. |
Definition at line 351 of file sch_sheet_path.cpp.
References SCH_SYMBOL::GetLibSymbolRef(), SCH_REFERENCE::GetRef(), SCH_SYMBOL::GetRef(), LIB_SYMBOL::GetUnitCount(), m_virtualPageNumber, and SCH_REFERENCE::SetSheetNumber().
Referenced by EE_SELECTION::GetMultiUnitSymbols(), and GetMultiUnitSymbols().
void SCH_SHEET_PATH::AppendSymbol | ( | SCH_REFERENCE_LIST & | aReferences, |
SCH_SYMBOL * | aSymbol, | ||
bool | aIncludePowerSymbols = true , |
||
bool | aForceIncludeOrphanSymbols = false |
||
) | const |
Append a SCH_REFERENCE object to aReferences based on aSymbol.
aReferences | List of references to populate. |
aSymbol | A symbol to add to aReferences |
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 319 of file sch_sheet_path.cpp.
References SCH_REFERENCE_LIST::AddItem(), SCH_SYMBOL::GetLibSymbolRef(), SCH_SYMBOL::GetRef(), m_virtualPageNumber, and SCH_REFERENCE::SetSheetNumber().
Referenced by SCH_SEXPR_PLUGIN::Format(), EE_SELECTION::GetSymbols(), and GetSymbols().
|
inline |
Forwarded method from std::vector.
Definition at line 140 of file sch_sheet_path.h.
References m_sheets.
Referenced by Cmp(), GetSheet(), SCH_EDIT_FRAME::GetUniqueFilenameForCurrentSheet(), IsContainedWithin(), PathAsString(), PathHumanReadable(), PathWithoutRootUuid(), and TestForRecursion().
|
inline |
Forwarded method from std::vector.
Definition at line 143 of file sch_sheet_path.h.
References m_sheets, and Rehash().
Referenced by SCH_EDIT_FRAME::doCloseWindow(), TEST_SCH_SHEET_LIST_FIXTURE::loadSchematic(), SCHEMATIC::Reset(), SCHEMATIC::SetRoot(), and HIERARCHY_NAVIG_DLG::UpdateHierarchyTree().
int SCH_SHEET_PATH::Cmp | ( | const SCH_SHEET_PATH & | aSheetPathToTest | ) | const |
Compare if this is the same sheet path as aSheetPathToTest.
aSheetPathToTest | is the sheet path to compare. |
Definition at line 144 of file sch_sheet_path.cpp.
References at(), EDA_ITEM::m_Uuid, and size().
Referenced by SCH_REFERENCE_LIST::sortByTimeStamp().
int SCH_SHEET_PATH::ComparePageNum | ( | const SCH_SHEET_PATH & | aSheetPathToTest | ) | const |
Compare sheets by their page number.
If the actual page number is equal, use virtual page numbers to compare.
Definition at line 166 of file sch_sheet_path.cpp.
References SCH_SHEET::ComparePageNum(), GetPageNumber(), and GetVirtualPageNumber().
Referenced by SCH_EDITOR_CONTROL::FindNext(), HIERARCHY_TREE::OnCompareItems(), and SCH_SHEET_LIST::SortByPageNumbers().
|
inline |
Forwarded method from std::vector.
Definition at line 150 of file sch_sheet_path.h.
References m_sheets.
Referenced by Last(), and PathHumanReadable().
|
inline |
Definition at line 171 of file sch_sheet_path.h.
References m_current_hash.
Referenced by SCH_EDITOR_CONTROL::FindNext(), and operator==().
void SCH_SHEET_PATH::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 sheet.
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 340 of file sch_sheet_path.cpp.
References AppendMultiUnitSymbol(), LastScreen(), and SCH_SYMBOL_T.
Referenced by SCH_EDIT_FRAME::AnnotateSymbols().
wxString SCH_SHEET_PATH::GetPageNumber | ( | ) | const |
Definition at line 464 of file sch_sheet_path.cpp.
References SCH_SHEET::GetPageNumber(), and Last().
Referenced by ComparePageNum(), SCH_FIELD::DoHypertextMenu(), SCH_EDIT_TOOL::EditPageNumber(), SCH_EDITOR_CONTROL::FindNext(), SCH_NAVIGATE_TOOL::HypertextCommand(), SCH_SHEET_LIST::PageNumberExists(), SCHEMATIC::ResolveTextVar(), and SCH_GLOBALLABEL::ResolveTextVar().
|
inline |
Definition at line 195 of file sch_sheet_path.h.
Referenced by IsFullPath(), and SCH_SHEET_LIST::TestForRecursion().
void SCH_SHEET_PATH::GetSymbols | ( | SCH_REFERENCE_LIST & | aReferences, |
bool | aIncludePowerSymbols = true , |
||
bool | aForceIncludeOrphanSymbols = false |
||
) | const |
Adds SCH_REFERENCE object to aReferences for each symbol in the sheet.
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 308 of file sch_sheet_path.cpp.
References AppendSymbol(), LastScreen(), and SCH_SYMBOL_T.
Referenced by SCH_EDIT_FRAME::AnnotateSymbols(), SCH_EDIT_FRAME::CheckAnnotate(), CollectOtherUnits(), SCH_SHEET_LIST::GetSymbols(), SCH_SHEET_LIST::GetSymbolsWithinPath(), SCH_EDITOR_CONTROL::Paste(), and SCH_EDITOR_CONTROL::updatePastedSheet().
|
inline |
Definition at line 184 of file sch_sheet_path.h.
References m_virtualPageNumber.
Referenced by ComparePageNum().
|
private |
Definition at line 118 of file sch_sheet_path.cpp.
References m_current_hash, m_sheets, and m_virtualPageNumber.
Referenced by operator=(), and SCH_SHEET_PATH().
bool SCH_SHEET_PATH::IsContainedWithin | ( | const SCH_SHEET_PATH & | aSheetPathToTest | ) | const |
Check if this path is contained inside aSheetPathToTest.
aSheetPathToTest | is the sheet path to compare against. |
Definition at line 188 of file sch_sheet_path.cpp.
References at(), EDA_ITEM::m_Uuid, and size().
Referenced by SCH_SHEET_LIST::GetSheetsWithinPath(), and SCH_SHEET_LIST::GetSymbolsWithinPath().
bool SCH_SHEET_PATH::IsFullPath | ( | ) | const |
Definition at line 129 of file sch_sheet_path.cpp.
References GetSheet(), and SCH_SHEET::IsRootSheet().
Referenced by SCH_SHEET::AddInstance(), SCH_SHEET::GetPageNumber(), and SCH_SHEET::SetPageNumber().
SCH_SHEET * SCH_SHEET_PATH::Last | ( | ) | const |
Return a pointer to the last SCH_SHEET of the list.
One can see the others sheet as the "path" to reach this last sheet.
Definition at line 203 of file sch_sheet_path.cpp.
References empty(), and m_sheets.
Referenced by SCH_SHEET_LIST::AllSheetPageNumbersEmpty(), SCH_DRAWING_TOOLS::DrawSheet(), SCH_EDIT_TOOL::EditPageNumber(), GetPageNumber(), SCH_FIELD::GetShownText(), SCH_TEXT::GetShownText(), HIERARCHY_NAVIG_DLG::HIERARCHY_NAVIG_DLG(), SCH_DRAWING_TOOLS::Init(), EE_SELECTION_TOOL::Init(), SCH_LINE_WIRE_BUS_TOOL::Init(), LastScreen(), SCH_NAVIGATE_TOOL::LeaveSheet(), SCH_EDITOR_CONTROL::LeaveSheet(), CADSTAR_SCH_ARCHIVE_LOADER::loadSheetAndChildSheets(), MakeFilePathRelativeToParentSheet(), NETLIST_EXPORTER_XML::makeSymbols(), SCH_SHEET_LIST::NameExists(), DIALOG_TEXT_AND_LABEL_PROPERTIES::onScintillaCharAdded(), DIALOG_SCH_FIELD_PROPERTIES::onScintillaCharAdded(), SCH_EDITOR_CONTROL::Paste(), SCH_EDITOR_CONTROL::SaveCurrSheetCopyAs(), SCH_SHEET_LIST::SetInitialPageNumbers(), SetPageNumber(), SCH_EDIT_FRAME::setupUIConditions(), and HIERARCHY_NAVIG_DLG::UpdateHierarchyTree().
SCH_SCREEN * SCH_SHEET_PATH::LastScreen | ( | ) |
Definition at line 212 of file sch_sheet_path.cpp.
References SCH_SHEET::GetScreen(), and Last().
Referenced by SCH_SHEET_LIST::AnnotatePowerSymbols(), SCH_EDIT_FRAME::AnnotateSymbols(), BACK_ANNOTATE::applyChangelist(), HIERARCHY_NAVIG_DLG::buildHierarchyTree(), SCH_SHEET_LIST::BuildSheetList(), SCH_EDIT_FRAME::CheckSheetForRecursion(), SCH_SHEET_LIST::ClearModifyStatus(), DIALOG_PLOT_SCHEMATIC::createDXFFiles(), DIALOG_PLOT_SCHEMATIC::createHPGLFiles(), DIALOG_PLOT_SCHEMATIC::createPDFFile(), DIALOG_PLOT_SCHEMATIC::createPSFiles(), DIALOG_PLOT_SCHEMATIC::createSVGFiles(), SCH_EDIT_FRAME::DisplayCurrentSheet(), SCH_DRAWING_TOOLS::DrawSheet(), SCH_EDIT_TOOL::EditPageNumber(), CONNECTION_GRAPH::ercCheckBusToBusConflicts(), CONNECTION_GRAPH::ercCheckBusToBusEntryConflicts(), CONNECTION_GRAPH::ercCheckBusToNetConflicts(), CONNECTION_GRAPH::ercCheckFloatingWires(), CONNECTION_GRAPH::ercCheckLabels(), CONNECTION_GRAPH::ercCheckMultipleDrivers(), CONNECTION_GRAPH::ercCheckNoConnects(), SCH_SHEET_LIST::FillItemMap(), SCH_SHEET_LIST::FindAllSheetsForScreen(), NETLIST_EXPORTER_BASE::findNextSymbol(), SCH_SHEET_LIST::FindSheetForScreen(), SCH_EDIT_FRAME::FixupJunctions(), SCH_SHEET_LIST::GetItem(), GetMultiUnitSymbols(), SCH_EDIT_FRAME::GetScreen(), GetSymbols(), DIALOG_EDIT_SYMBOLS_LIBID::initDlg(), SCH_SHEET_LIST::IsModified(), MakeFilePathRelativeToParentSheet(), NETLIST_EXPORTER_XML::makeSymbols(), SCH_PRINTOUT::OnPrintPage(), DIALOG_ERC::OnRunERCClick(), DIALOG_SHEET_PROPERTIES::onSheetFilenameChanged(), SCH_EDITOR_CONTROL::Paste(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), NETLIST_EXPORTER_PSPICE::ProcessNetlist(), BACK_ANNOTATE::processNetNameChange(), DIALOG_CHANGE_SYMBOLS::processSymbol(), SCH_EDITOR_CONTROL::ReplaceAndFindNext(), RESCUER::RESCUER(), SCH_EDIT_FRAME::ResolveERCExclusions(), SCHEMATIC::ResolveTextVar(), SCH_EDIT_FRAME::SaveSymbolToSchematic(), SCH_EDIT_FRAME::SetCurrentSheet(), TestForRecursion(), ERC_TESTER::TestMultiunitFootprints(), ERC_TESTER::TestMultUnitPinConflicts(), ERC_TESTER::TestPinToPin(), ERC_TESTER::TestSimilarLabels(), DIALOG_SHEET_PROPERTIES::TransferDataFromWindow(), UpdateAllScreenReferences(), CONNECTION_GRAPH::updateItemConnectivity(), SCH_EDITOR_CONTROL::UpdateNetHighlighting(), and NETLIST_EXPORTER_ORCADPCB2::WriteNetlist().
SCH_SCREEN * SCH_SHEET_PATH::LastScreen | ( | ) | const |
Definition at line 223 of file sch_sheet_path.cpp.
References SCH_SHEET::GetScreen(), and Last().
void SCH_SHEET_PATH::MakeFilePathRelativeToParentSheet | ( | ) |
Make the sheet file name relative to its parent sheet.
This should only be called when changing the parent sheet path such performing a save as or a new schematic without a project in stand alone mode. The sheet file name is only made relative if the current file name is relative. Absolute sheet file name paths are a user choice so do not change them.
Sheet file name paths are set according to the following criteria:
Definition at line 484 of file sch_sheet_path.cpp.
References SCH_SCREEN::GetFileName(), SCH_SHEET::GetFileName(), Last(), LastScreen(), m_sheets, PathHumanReadable(), SCH_SHEET::SetFileName(), and tracePathsAndFiles.
|
inline |
Definition at line 370 of file sch_sheet_path.h.
|
inline |
SCH_SHEET_PATH & SCH_SHEET_PATH::operator= | ( | const SCH_SHEET_PATH & | aOther | ) |
Definition at line 111 of file sch_sheet_path.cpp.
References initFromOther().
bool SCH_SHEET_PATH::operator== | ( | const SCH_SHEET_PATH & | d1 | ) | const |
KIID_PATH SCH_SHEET_PATH::Path | ( | ) | const |
Get the sheet path as an KIID_PATH.
Definition at line 249 of file sch_sheet_path.cpp.
References m_sheets, and path.
Referenced by SCH_EDIT_FRAME::AnnotateSymbols(), SCH_SYMBOL::ClearAnnotation(), SCH_SYMBOL::GetFootprint(), SCH_SHEET_LIST::GetPaths(), SCH_SYMBOL::GetRef(), SCH_SYMBOL::GetUnitSelection(), SCH_SYMBOL::GetValue(), SCH_SYMBOL::IsAnnotated(), SCH_REFERENCE::IsSameInstance(), SCH_EAGLE_PLUGIN::loadSchematic(), SCH_EDIT_FRAME::mapExistingAnnotation(), SCH_SYMBOL::SetFootprint(), SCH_SYMBOL::SetRef(), SCH_EDIT_FRAME::SetSheetNumberAndCount(), SCH_SYMBOL::SetUnitSelection(), and SCH_SYMBOL::SetValue().
wxString SCH_SHEET_PATH::PathAsString | ( | ) | const |
Return the path of time stamps which do not changes even when editing sheet parameters.
A path is something like / (root) or /34005677 or /34005677/00AE4523.
Definition at line 234 of file sch_sheet_path.cpp.
References KIID::AsString(), at(), EDA_ITEM::m_Uuid, and size().
Referenced by FormatProbeItem(), SCH_REFERENCE::GetPath(), SCH_EAGLE_PLUGIN::loadInstance(), NETLIST_EXPORTER_XML::makeSymbols(), and NETLIST_EXPORTER_ORCADPCB2::WriteNetlist().
wxString SCH_SHEET_PATH::PathHumanReadable | ( | bool | aUseShortRootName = true | ) | const |
Return the sheet path in a human readable form made from the sheet names.
The "normal" path instead uses the KIID objects in the path that do not change even when editing sheet parameters.
Definition at line 271 of file sch_sheet_path.cpp.
References at(), empty(), SCH_SHEET::GetFields(), SCH_SCREEN::GetFileName(), SCH_SHEET::GetScreen(), SHEETNAME, and size().
Referenced by SCH_EDIT_TOOL::EditPageNumber(), SCH_EDIT_FRAME::GetScreenDesc(), inheritNetclass(), MakeFilePathRelativeToParentSheet(), NETLIST_EXPORTER_XML::makeSymbols(), DIALOG_SHEET_PROPERTIES::OnUpdateUI(), SCH_CONNECTION::recacheName(), and SCHEMATIC::ResolveTextVar().
KIID_PATH SCH_SHEET_PATH::PathWithoutRootUuid | ( | ) | const |
Get the sheet path as an KIID_PATH without the root sheet UUID prefix.
Definition at line 260 of file sch_sheet_path.cpp.
References at(), path, and size().
Referenced by SCH_SHEET::AddInstance(), SCH_SEXPR_PLUGIN::Format(), SCH_SHEET::GetPageNumber(), and SCH_SHEET::SetPageNumber().
|
inline |
Forwarded method from std::vector.
Definition at line 153 of file sch_sheet_path.h.
References m_sheets, and Rehash().
Referenced by HIERARCHY_NAVIG_DLG::buildHierarchyTree(), SCH_SHEET_LIST::BuildSheetList(), SCH_EDIT_TOOL::EditPageNumber(), SCH_NAVIGATE_TOOL::LeaveSheet(), SCH_EDITOR_CONTROL::LeaveSheet(), and SCH_SHEET::LocatePathOfScreen().
|
inline |
Forwarded method from std::vector.
Definition at line 160 of file sch_sheet_path.h.
References m_sheets, and Rehash().
Referenced by HIERARCHY_NAVIG_DLG::buildHierarchyTree(), SCH_SHEET_LIST::BuildSheetList(), SCH_EDIT_FRAME::CreateScreens(), SCH_DRAWING_TOOLS::DrawSheet(), SCH_EDIT_TOOL::EditPageNumber(), SCH_NAVIGATE_TOOL::EnterSheet(), SCH_EDITOR_CONTROL::EnterSheet(), SCH_SEXPR_PLUGIN::Format(), HIERARCHY_NAVIG_DLG::getRootString(), HIERARCHY_NAVIG_DLG::HIERARCHY_NAVIG_DLG(), SCH_ALTIUM_PLUGIN::Load(), TEST_SCH_SHEET_LIST_FIXTURE::loadSchematic(), TEST_NETLISTS_FIXTURE::loadSchematic(), SCH_EAGLE_PLUGIN::loadSchematic(), CADSTAR_SCH_ARCHIVE_LOADER::loadSheetAndChildSheets(), CADSTAR_SCH_ARCHIVE_LOADER::loadSheets(), SCH_SHEET::LocatePathOfScreen(), SCH_ALTIUM_PLUGIN::ParseSheetSymbol(), CONNECTION_GRAPH::propagateToNeighbors(), SCHEMATIC::SetRoot(), TEST_SCH_SHEET_PATH_FIXTURE::TEST_SCH_SHEET_PATH_FIXTURE(), DIALOG_SHEET_PROPERTIES::TransferDataFromWindow(), DIALOG_SHEET_PROPERTIES::TransferDataToWindow(), HIERARCHY_NAVIG_DLG::UpdateHierarchyTree(), and SCH_EDITOR_CONTROL::updatePastedSheet().
void SCH_SHEET_PATH::Rehash | ( | ) |
Definition at line 135 of file sch_sheet_path.cpp.
References hash_combine(), m_current_hash, and m_sheets.
Referenced by clear(), pop_back(), and push_back().
void SCH_SHEET_PATH::SetPageNumber | ( | const wxString & | aPageNumber | ) |
Set the sheet instance user definable page number.
Definition at line 474 of file sch_sheet_path.cpp.
References Last(), and SCH_SHEET::SetPageNumber().
Referenced by SCH_EDIT_TOOL::EditPageNumber().
|
inline |
Set the sheet instance virtual page number.
Virtual page numbers are incremental integers set automatically when the sheet path hierarchy is created (
Definition at line 182 of file sch_sheet_path.h.
References m_virtualPageNumber.
Referenced by SCH_SHEET_LIST::BuildSheetList(), SCH_EDIT_FRAME::SetSheetNumberAndCount(), and SCH_SHEET_LIST::SortByPageNumbers().
|
inline |
Forwarded method from std::vector.
Definition at line 167 of file sch_sheet_path.h.
References m_sheets.
Referenced by Cmp(), SCH_EDIT_TOOL::EditPageNumber(), GetSheet(), SCH_EDIT_FRAME::GetUniqueFilenameForCurrentSheet(), IsContainedWithin(), PathAsString(), PathHumanReadable(), PathWithoutRootUuid(), CONNECTION_GRAPH::propagateToNeighbors(), TestForRecursion(), and SCH_SHEET_LIST::TestForRecursion().
bool SCH_SHEET_PATH::TestForRecursion | ( | const wxString & | aSrcFileName, |
const wxString & | aDestFileName | ||
) |
Test the SCH_SHEET_PATH file names to check adding the sheet stored in the file aSrcFileName to the sheet stored in file aDestFileName will cause a sheet path recursion.
aSrcFileName | is the source file name of the sheet add to aDestFileName. |
aDestFileName | is the file name of the destination sheet for aSrcFileName. |
Definition at line 383 of file sch_sheet_path.cpp.
References at(), SCHEMATIC::GetFileName(), SCH_SHEET::GetFileName(), LastScreen(), m_recursion_test_cache, SCH_SCREEN::Schematic(), and size().
Referenced by SCH_SHEET_LIST::BuildSheetList().
void SCH_SHEET_PATH::UpdateAllScreenReferences | ( | ) |
Update all the symbol references for this sheet path.
Mandatory in complex hierarchies because sheets may use the same screen (basic schematic) more than once but with different references and units according to the displayed sheet.
Definition at line 294 of file sch_sheet_path.cpp.
References FOOTPRINT_FIELD, SCH_SYMBOL::GetField(), SCH_SYMBOL::GetFootprint(), SCH_SYMBOL::GetRef(), SCH_SYMBOL::GetUnitSelection(), SCH_SYMBOL::GetValue(), LastScreen(), REFERENCE_FIELD, SCH_SYMBOL_T, EDA_TEXT::SetText(), SCH_SYMBOL::UpdateUnit(), and VALUE_FIELD.
Referenced by SCH_EDIT_FRAME::AnnotateSymbols(), DIALOG_PLOT_SCHEMATIC::createDXFFiles(), DIALOG_PLOT_SCHEMATIC::createHPGLFiles(), DIALOG_PLOT_SCHEMATIC::createPDFFile(), DIALOG_PLOT_SCHEMATIC::createPSFiles(), DIALOG_PLOT_SCHEMATIC::createSVGFiles(), SCH_EDIT_FRAME::DeleteAnnotation(), SCH_EDIT_FRAME::DisplayCurrentSheet(), SCH_EDITOR_CONTROL::FindNext(), SCH_EDIT_FRAME::FixupJunctions(), DIALOG_MIGRATE_BUSES::onItemSelected(), SCH_PRINTOUT::OnPrintPage(), DIALOG_UPDATE_FROM_PCB::OnUpdateClick(), SCH_EDIT_FRAME::OpenProjectFiles(), SCH_EDITOR_CONTROL::Paste(), DIALOG_CHANGE_SYMBOLS::processMatchingSymbols(), SCH_EDITOR_CONTROL::ReplaceAll(), SCH_EDITOR_CONTROL::ReplaceAndFindNext(), and DIALOG_PLOT_SCHEMATIC::restoreEnvironment().
|
protected |
Definition at line 380 of file sch_sheet_path.h.
Referenced by GetCurrentHash(), initFromOther(), operator==(), Rehash(), and SCH_SHEET_PATH().
|
protected |
Page numbers are maintained by the sheet load order.
Definition at line 384 of file sch_sheet_path.h.
Referenced by TestForRecursion().
|
protected |
Definition at line 378 of file sch_sheet_path.h.
Referenced by at(), clear(), empty(), initFromOther(), Last(), MakeFilePathRelativeToParentSheet(), operator<(), Path(), pop_back(), push_back(), Rehash(), and size().
|
protected |
Definition at line 382 of file sch_sheet_path.h.
Referenced by AppendMultiUnitSymbol(), AppendSymbol(), GetVirtualPageNumber(), initFromOther(), SCH_SHEET_PATH(), and SetVirtualPageNumber().