KiCad PCB EDA Suite
SCH_SHEET_PATH Class Reference

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_PATHoperator= (const SCH_SHEET_PATH &aOther)
 
SCH_SHEET_PATH operator+ (const SCH_SHEET_PATH &aOther)
 
 ~SCH_SHEET_PATH ()=default
 
SCH_SHEETat (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_SHEETGetSheet (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_SHEETLast () const
 Return a pointer to the last SCH_SHEET of the list. More...
 
SCH_SCREENLastScreen ()
 
SCH_SCREENLastScreen () 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 () const
 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...
 
void SetSymbolInstancesToDefault ()
 Set all of the symbol instances in this sheet instance to the default symbol instance data. 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)
 

Detailed Description

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 129 of file sch_sheet_path.h.

Constructor & Destructor Documentation

◆ SCH_SHEET_PATH() [1/2]

SCH_SHEET_PATH::SCH_SHEET_PATH ( )

Definition at line 103 of file sch_sheet_path.cpp.

104{
106 m_current_hash = 0;
107}

References m_current_hash, and m_virtualPageNumber.

◆ SCH_SHEET_PATH() [2/2]

SCH_SHEET_PATH::SCH_SHEET_PATH ( const SCH_SHEET_PATH aOther)

Definition at line 110 of file sch_sheet_path.cpp.

111{
112 initFromOther( aOther );
113}
void initFromOther(const SCH_SHEET_PATH &aOther)

References initFromOther().

◆ ~SCH_SHEET_PATH()

SCH_SHEET_PATH::~SCH_SHEET_PATH ( )
default

Member Function Documentation

◆ AppendMultiUnitSymbol()

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.

Parameters
aRefListMap of reference designators to reference lists
aSymbolA symbol to add to aRefList
aIncludePowerSymbolsSet to false to only get normal symbols.

Definition at line 393 of file sch_sheet_path.cpp.

396{
397 // Skip pseudo-symbols, which have a reference starting with #. This mainly
398 // affects power symbols.
399 if( !aIncludePowerSymbols && aSymbol->GetRef( this )[0] == wxT( '#' ) )
400 return;
401
402 LIB_SYMBOL* symbol = aSymbol->GetLibSymbolRef().get();
403
404 if( symbol && symbol->GetUnitCount() > 1 )
405 {
406 SCH_REFERENCE schReference = SCH_REFERENCE( aSymbol, symbol, *this );
407 schReference.SetSheetNumber( m_virtualPageNumber );
408 wxString reference_str = schReference.GetRef();
409
410 // Never lock unassigned references
411 if( reference_str[reference_str.Len() - 1] == '?' )
412 return;
413
414 aRefList[reference_str].AddItem( schReference );
415 }
416}
Define a library symbol object.
Definition: lib_symbol.h:98
int GetUnitCount() const override
For items with units, return the number of units.
A helper to define a symbol's reference designator in a schematic.
wxString GetRef() const
void SetSheetNumber(int aSheetNumber)
const wxString GetRef(const SCH_SHEET_PATH *aSheet, bool aIncludeUnit=false) const
Return the reference for the given sheet path.
Definition: sch_symbol.cpp:516
std::unique_ptr< LIB_SYMBOL > & GetLibSymbolRef()
Definition: sch_symbol.h:189

References SCH_SYMBOL::GetLibSymbolRef(), SCH_REFERENCE::GetRef(), SCH_SYMBOL::GetRef(), LIB_SYMBOL::GetUnitCount(), m_virtualPageNumber, and SCH_REFERENCE::SetSheetNumber().

Referenced by SCH_EDIT_FRAME::AnnotateSymbols(), GetMultiUnitSymbols(), and TEST_SCH_REFERENCE_LIST_FIXTURE::loadTestCase().

◆ AppendSymbol()

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.

Parameters
aReferencesList of references to populate.
aSymbolA symbol to add to aReferences
aIncludePowerSymbolsset to false to only get normal symbols.
aForceIncludeOrphanSymbolsset 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 361 of file sch_sheet_path.cpp.

364{
365 // Skip pseudo-symbols, which have a reference starting with #. This mainly
366 // affects power symbols.
367 if( aIncludePowerSymbols || aSymbol->GetRef( this )[0] != wxT( '#' ) )
368 {
369 LIB_SYMBOL* symbol = aSymbol->GetLibSymbolRef().get();
370
371 if( symbol || aForceIncludeOrphanSymbols )
372 {
373 SCH_REFERENCE schReference( aSymbol, symbol, *this );
374
375 schReference.SetSheetNumber( m_virtualPageNumber );
376 aReferences.AddItem( schReference );
377 }
378 }
379}
void AddItem(const SCH_REFERENCE &aItem)

References SCH_REFERENCE_LIST::AddItem(), SCH_SYMBOL::GetLibSymbolRef(), SCH_SYMBOL::GetRef(), m_virtualPageNumber, and SCH_REFERENCE::SetSheetNumber().

Referenced by SCH_EDIT_FRAME::AnnotateSymbols(), SCH_EDIT_FRAME::CheckAnnotate(), SCH_SEXPR_PLUGIN::Format(), GetSymbols(), and TEST_SCH_REFERENCE_LIST_FIXTURE::loadTestCase().

◆ at()

SCH_SHEET * SCH_SHEET_PATH::at ( size_t  aIndex) const
inline

Forwarded method from std::vector.

Definition at line 143 of file sch_sheet_path.h.

143{ return m_sheets.at( aIndex ); }
std::vector< SCH_SHEET * > m_sheets

References m_sheets.

Referenced by Cmp(), GetSheet(), NETLIST_EXPORTER_SPICE::GetSheets(), SCH_EDIT_FRAME::GetUniqueFilenameForCurrentSheet(), IsContainedWithin(), operator+(), PathAsString(), PathHumanReadable(), PathWithoutRootUuid(), and TestForRecursion().

◆ clear()

void SCH_SHEET_PATH::clear ( )
inline

Forwarded method from std::vector.

Definition at line 146 of file sch_sheet_path.h.

147 {
148 m_sheets.clear();
149 Rehash();
150 }

References m_sheets, and Rehash().

Referenced by SCH_EDIT_FRAME::doCloseWindow(), SCHEMATIC::Reset(), SCHEMATIC::SetRoot(), and HIERARCHY_NAVIG_PANEL::UpdateHierarchyTree().

◆ Cmp()

int SCH_SHEET_PATH::Cmp ( const SCH_SHEET_PATH aSheetPathToTest) const

Compare if this is the same sheet path as aSheetPathToTest.

Parameters
aSheetPathToTestis the sheet path to compare.
Returns
1 if this sheet path has more sheets than aSheetPathToTest, -1 if this sheet path has fewer sheets than aSheetPathToTest, or 0 if same

Definition at line 162 of file sch_sheet_path.cpp.

163{
164 if( size() > aSheetPathToTest.size() )
165 return 1;
166
167 if( size() < aSheetPathToTest.size() )
168 return -1;
169
170 //otherwise, same number of sheets.
171 for( unsigned i = 0; i < size(); i++ )
172 {
173 if( at( i )->m_Uuid < aSheetPathToTest.at( i )->m_Uuid )
174 return -1;
175
176 if( at( i )->m_Uuid != aSheetPathToTest.at( i )->m_Uuid )
177 return 1;
178 }
179
180 return 0;
181}
const KIID m_Uuid
Definition: eda_item.h:492
SCH_SHEET * at(size_t aIndex) const
Forwarded method from std::vector.
size_t size() const
Forwarded method from std::vector.

References at(), EDA_ITEM::m_Uuid, and size().

Referenced by SCH_REFERENCE_LIST::sortByTimeStamp().

◆ ComparePageNum()

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.

Returns
-1 if aSheetPathToTest is greater than this (should appear later in the sort order) 0 if aSheetPathToTest is equal to this 1 if aSheetPathToTest is less than this (should appear earlier in the sort order)

Definition at line 184 of file sch_sheet_path.cpp.

185{
186 wxString pageA = GetPageNumber();
187 wxString pageB = aSheetPathToTest.GetPageNumber();
188
189 int pageNumComp = SCH_SHEET::ComparePageNum( pageA, pageB );
190
191 if( pageNumComp == 0 )
192 {
193 int virtualPageA = GetVirtualPageNumber();
194 int virtualPageB = aSheetPathToTest.GetVirtualPageNumber();
195
196 if( virtualPageA > virtualPageB )
197 pageNumComp = 1;
198 else if( virtualPageA < virtualPageB )
199 pageNumComp = -1;
200 }
201
202 return pageNumComp;
203}
wxString GetPageNumber() const
int GetVirtualPageNumber() const
static int ComparePageNum(const wxString &aPageNumberA, const wxString &aPageNumberB)
Compares page numbers of schematic sheets.
Definition: sch_sheet.cpp:1266

References SCH_SHEET::ComparePageNum(), GetPageNumber(), and GetVirtualPageNumber().

Referenced by HIERARCHY_TREE::OnCompareItems(), and SCH_SHEET_LIST::SortByPageNumbers().

◆ empty()

bool SCH_SHEET_PATH::empty ( ) const
inline

Forwarded method from std::vector.

Definition at line 153 of file sch_sheet_path.h.

153{ return m_sheets.empty(); }

References m_sheets.

Referenced by SCH_SHEET::findSelf(), Last(), SCH_SEXPR_PLUGIN::loadHierarchy(), DIALOG_ERC::OnERCItemSelected(), and PathHumanReadable().

◆ GetCurrentHash()

size_t SCH_SHEET_PATH::GetCurrentHash ( ) const
inline

Definition at line 174 of file sch_sheet_path.h.

174{ return m_current_hash; }

References m_current_hash.

Referenced by SHEET_PATH_CMP::operator()(), and operator==().

◆ GetMultiUnitSymbols()

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.

Parameters
aRefListMap of reference designators to reference lists
aIncludePowerSymbolsSet to false to only get normal symbols.

Definition at line 382 of file sch_sheet_path.cpp.

384{
385 for( SCH_ITEM* item : LastScreen()->Items().OfType( SCH_SYMBOL_T ) )
386 {
387 SCH_SYMBOL* symbol = static_cast<SCH_SYMBOL*>( item );
388 AppendMultiUnitSymbol( aRefList, symbol, aIncludePowerSymbols );
389 }
390}
Base class for any item which can be embedded within the SCHEMATIC container class,...
Definition: sch_item.h:147
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-...
SCH_SCREEN * LastScreen()
Schematic symbol object.
Definition: sch_symbol.h:79
@ SCH_SYMBOL_T
Definition: typeinfo.h:155

References AppendMultiUnitSymbol(), LastScreen(), and SCH_SYMBOL_T.

Referenced by SCH_EDIT_FRAME::AnnotateSymbols().

◆ GetPageNumber()

wxString SCH_SHEET_PATH::GetPageNumber ( ) const

Definition at line 519 of file sch_sheet_path.cpp.

520{
521 SCH_SHEET* sheet = Last();
522
523 wxCHECK( sheet, wxEmptyString );
524
525 return sheet->GetPageNumber( *this );
526}
SCH_SHEET * Last() const
Return a pointer to the last SCH_SHEET of the list.
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition: sch_sheet.h:55
wxString GetPageNumber(const SCH_SHEET_PATH &aInstance) const
Return the sheet page number for aInstance.
Definition: sch_sheet.cpp:1229

References SCH_SHEET::GetPageNumber(), and Last().

Referenced by ComparePageNum(), SCH_EDIT_TOOL::EditPageNumber(), SCH_EDITOR_CONTROL::FindNext(), HIERARCHY_NAVIG_PANEL::onRightClick(), SCH_SHEET_LIST::PageNumberExists(), DIALOG_PLOT_SCHEMATIC::plotOneSheetDXF(), DIALOG_PLOT_SCHEMATIC::plotOneSheetHpgl(), DIALOG_PLOT_SCHEMATIC::plotOneSheetPS(), DIALOG_PLOT_SCHEMATIC::plotOneSheetSVG(), and SCHEMATIC::ResolveTextVar().

◆ GetSheet()

const SCH_SHEET * SCH_SHEET_PATH::GetSheet ( unsigned  aIndex) const
inline

Definition at line 198 of file sch_sheet_path.h.

199 {
200 SCH_SHEET* retv = nullptr;
201
202 if( aIndex < size() )
203 retv = at( aIndex );
204
205 return retv;
206 }

References at(), and size().

Referenced by IsFullPath(), and SCH_SHEET_LIST::TestForRecursion().

◆ GetSymbols()

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.

Parameters
aReferencesList of references to populate.
aIncludePowerSymbolsset to false to only get normal symbols.
aForceIncludeOrphanSymbolsset 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 350 of file sch_sheet_path.cpp.

352{
353 for( SCH_ITEM* item : LastScreen()->Items().OfType( SCH_SYMBOL_T ) )
354 {
355 SCH_SYMBOL* symbol = static_cast<SCH_SYMBOL*>( item );
356 AppendSymbol( aReferences, symbol, aIncludePowerSymbols, aForceIncludeOrphanSymbols );
357 }
358}
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.

References AppendSymbol(), LastScreen(), and SCH_SYMBOL_T.

Referenced by SCH_EDIT_FRAME::AnnotateSymbols(), SCH_EDIT_FRAME::CheckAnnotate(), CollectOtherUnits(), findSymbolsAndPins(), SCH_SHEET_LIST::GetSymbols(), SCH_SHEET_LIST::GetSymbolsWithinPath(), SCH_EDITOR_CONTROL::Paste(), sheetContainsOnlyWantedItems(), and SCH_EDITOR_CONTROL::updatePastedSheet().

◆ GetVirtualPageNumber()

◆ initFromOther()

void SCH_SHEET_PATH::initFromOther ( const SCH_SHEET_PATH aOther)
private

Definition at line 136 of file sch_sheet_path.cpp.

137{
138 m_sheets = aOther.m_sheets;
141
142 // Note: don't copy m_recursion_test_cache as it is slow and we want SCH_SHEET_PATHS to be
143 // very fast to construct for use in the connectivity algorithm.
144}

References m_current_hash, m_sheets, and m_virtualPageNumber.

Referenced by operator=(), and SCH_SHEET_PATH().

◆ IsContainedWithin()

bool SCH_SHEET_PATH::IsContainedWithin ( const SCH_SHEET_PATH aSheetPathToTest) const

Check if this path is contained inside aSheetPathToTest.

Parameters
aSheetPathToTestis the sheet path to compare against.
Returns
true if this path is contained inside or equal to aSheetPathToTest.

Definition at line 206 of file sch_sheet_path.cpp.

207{
208 if( aSheetPathToTest.size() > size() )
209 return false;
210
211 for( size_t i = 0; i < aSheetPathToTest.size(); ++i )
212 {
213 if( at( i )->m_Uuid != aSheetPathToTest.at( i )->m_Uuid )
214 {
215 wxLogTrace( traceSchSheetPaths, "Sheet path '%s' is not within path '%s'.",
216 aSheetPathToTest.Path().AsString(), Path().AsString() );
217
218 return false;
219 }
220 }
221
222 wxLogTrace( traceSchSheetPaths, "Sheet path '%s' is within path '%s'.",
223 aSheetPathToTest.Path().AsString(), Path().AsString() );
224
225 return true;
226}
wxString AsString() const
Definition: kiid.cpp:330
KIID_PATH Path() const
Get the sheet path as an KIID_PATH.
const wxChar *const traceSchSheetPaths
Flag to enable debug output of schematic symbol sheet path manipulation code.
_OUT_STRING AsString(const std::string &aString)
Definition: sexpr.h:131

References KIID_PATH::AsString(), SEXPR::AsString(), at(), EDA_ITEM::m_Uuid, Path(), size(), and traceSchSheetPaths.

Referenced by findSymbolsAndPins(), SCH_SHEET_LIST::GetSheetsWithinPath(), SCH_SHEET_LIST::GetSymbolsWithinPath(), and sheetContainsOnlyWantedItems().

◆ IsFullPath()

bool SCH_SHEET_PATH::IsFullPath ( ) const

Definition at line 147 of file sch_sheet_path.cpp.

148{
149 return GetSheet( 0 ) && GetSheet( 0 )->IsRootSheet();
150}
const SCH_SHEET * GetSheet(unsigned aIndex) const
bool IsRootSheet() const
Definition: sch_sheet.cpp:193

References GetSheet(), and SCH_SHEET::IsRootSheet().

Referenced by SCH_SHEET::AddInstance(), SCH_SHEET::GetPageNumber(), and SCH_SHEET::SetPageNumber().

◆ Last()

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 229 of file sch_sheet_path.cpp.

230{
231 if( !empty() )
232 return m_sheets.back();
233
234 return nullptr;
235}
bool empty() const
Forwarded method from std::vector.

References empty(), and m_sheets.

Referenced by SCH_SHEET_LIST::AllSheetPageNumbersEmpty(), SCH_NAVIGATE_TOOL::CanGoUp(), KIGFX::SCH_VIEW::DisplaySheet(), SCH_DRAWING_TOOLS::DrawSheet(), SCH_EDIT_TOOL::EditPageNumber(), SCH_SHEET::findSelf(), SCH_SHEET::GetContextualTextVars(), GetPageNumber(), SCH_FIELD::GetShownText(), SCH_TEXT::GetShownText(), SCH_TEXTBOX::GetShownText(), EE_SELECTION_TOOL::Init(), SCH_DRAWING_TOOLS::Init(), SCH_LINE_WIRE_BUS_TOOL::Init(), LastScreen(), CADSTAR_SCH_ARCHIVE_LOADER::loadSheetAndChildSheets(), MakeFilePathRelativeToParentSheet(), NETLIST_EXPORTER_XML::makeSymbols(), SCH_SHEET_LIST::NameExists(), HIERARCHY_NAVIG_PANEL::onRightClick(), DIALOG_SCH_FIELD_PROPERTIES::onScintillaCharAdded(), DIALOG_TEXT_PROPERTIES::onScintillaCharAdded(), SCH_EDITOR_CONTROL::Paste(), DIALOG_PLOT_SCHEMATIC::plotOneSheetDXF(), DIALOG_PLOT_SCHEMATIC::plotOneSheetHpgl(), DIALOG_PLOT_SCHEMATIC::plotOneSheetPDF(), DIALOG_PLOT_SCHEMATIC::plotOneSheetPS(), DIALOG_PLOT_SCHEMATIC::plotOneSheetSVG(), SCH_LABEL_BASE::ResolveTextVar(), SCHEMATIC::ResolveTextVar(), SCH_SHEET::ResolveTextVar(), SCH_EDITOR_CONTROL::Revert(), SCH_EDITOR_CONTROL::SaveCurrSheetCopyAs(), SCH_SHEET_LIST::SetInitialPageNumbers(), and SetPageNumber().

◆ LastScreen() [1/2]

SCH_SCREEN * SCH_SHEET_PATH::LastScreen ( )
Returns
the SCH_SCREEN relative to the last sheet in list.
the SCH_SCREEN relative to the last sheet in list.

Definition at line 238 of file sch_sheet_path.cpp.

239{
240 SCH_SHEET* lastSheet = Last();
241
242 if( lastSheet )
243 return lastSheet->GetScreen();
244
245 return nullptr;
246}
SCH_SCREEN * GetScreen() const
Definition: sch_sheet.h:103

References SCH_SHEET::GetScreen(), and Last().

Referenced by SCH_SHEET_LIST::AnnotatePowerSymbols(), SCH_EDIT_FRAME::AnnotateSymbols(), BACK_ANNOTATE::applyChangelist(), SCH_EDITOR_CONTROL::AssignNetclass(), HIERARCHY_NAVIG_PANEL::buildHierarchyTree(), SCH_SHEET_LIST::BuildSheetList(), SCH_EDIT_FRAME::CheckAnnotate(), SCH_EDIT_FRAME::CheckSheetForRecursion(), SCH_SHEET_LIST::ClearModifyStatus(), SCH_EDIT_FRAME::CommonSettingsChanged(), 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_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(), findItemsFromSyncSelection(), NETLIST_EXPORTER_BASE::findNextSymbol(), SCH_SHEET_LIST::FindSheetForScreen(), SCH_EDIT_FRAME::FixupJunctions(), SCH_SHEET_LIST::GetItem(), GetMultiUnitSymbols(), SCH_EDIT_FRAME::GetScreen(), GetSymbols(), SCH_EDIT_FRAME::HardRedraw(), DIALOG_EDIT_SYMBOLS_LIBID::initDlg(), SCH_SHEET_LIST::IsModified(), SCH_SEXPR_PLUGIN::loadHierarchy(), MakeFilePathRelativeToParentSheet(), NETLIST_EXPORTER_XML::makeSymbols(), SCH_PRINTOUT::OnPrintPage(), HIERARCHY_NAVIG_PANEL::onRightClick(), DIALOG_ERC::OnRunERCClick(), DIALOG_SHEET_PROPERTIES::onSheetFilenameChanged(), SCH_EDITOR_CONTROL::Paste(), SCH_DRAWING_TOOLS::PlaceSymbol(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem(), 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(), SetSymbolInstancesToDefault(), 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().

◆ LastScreen() [2/2]

SCH_SCREEN * SCH_SHEET_PATH::LastScreen ( ) const

Definition at line 249 of file sch_sheet_path.cpp.

250{
251 SCH_SHEET* lastSheet = Last();
252
253 if( lastSheet )
254 return lastSheet->GetScreen();
255
256 return nullptr;
257}

References SCH_SHEET::GetScreen(), and Last().

◆ MakeFilePathRelativeToParentSheet()

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:

  • If the sheet file name path is in the same as the parent sheet file name path, set the sheet file name to just the file name and extension with no path.
  • If the sheet file name path can be made relative to the parent sheet file name path, set the sheet file name using the relative path.
  • If the sheet file name path cannot be converted to a relative path, then fall back to the absolute file name path.

Definition at line 539 of file sch_sheet_path.cpp.

540{
541 wxCHECK( m_sheets.size() > 1, /* void */ );
542
543 wxFileName sheetFileName = Last()->GetFileName();
544
545 // If the sheet file name is absolute, then the user requested is so don't make it relative.
546 if( sheetFileName.IsAbsolute() )
547 return;
548
549 SCH_SCREEN* screen = LastScreen();
550 SCH_SCREEN* parentScreen = m_sheets[ m_sheets.size() - 2 ]->GetScreen();
551
552 wxCHECK( screen && parentScreen, /* void */ );
553
554 wxFileName fileName = screen->GetFileName();
555 wxFileName parentFileName = parentScreen->GetFileName();
556
557 // SCH_SCREEN file names must be absolute. If they are not, someone set them incorrectly
558 // on load or on creation.
559 wxCHECK( fileName.IsAbsolute() && parentFileName.IsAbsolute(), /* void */ );
560
561 if( fileName.GetPath() == parentFileName.GetPath() )
562 {
563 Last()->SetFileName( fileName.GetFullName() );
564 }
565 else if( fileName.MakeRelativeTo( parentFileName.GetPath() ) )
566 {
567 Last()->SetFileName( fileName.GetFullPath() );
568 }
569 else
570 {
571 Last()->SetFileName( screen->GetFileName() );
572 }
573
574 wxLogTrace( tracePathsAndFiles,
575 wxT( "\n File name: '%s'"
576 "\n parent file name '%s',"
577 "\n sheet '%s' file name '%s'." ),
578 screen->GetFileName(), parentScreen->GetFileName(), PathHumanReadable(),
579 Last()->GetFileName() );
580}
const wxString & GetFileName() const
Definition: sch_screen.h:143
wxString PathHumanReadable(bool aUseShortRootName=true) const
Return the sheet path in a human readable form made from the sheet names.
void SetFileName(const wxString &aFilename)
Definition: sch_sheet.h:305
wxString GetFileName() const
Return the filename corresponding to this sheet.
Definition: sch_sheet.h:299
const wxChar *const tracePathsAndFiles
Flag to enable path and file name debug output.

References SCH_SCREEN::GetFileName(), SCH_SHEET::GetFileName(), Last(), LastScreen(), m_sheets, PathHumanReadable(), SCH_SHEET::SetFileName(), and tracePathsAndFiles.

◆ operator!=()

bool SCH_SHEET_PATH::operator!= ( const SCH_SHEET_PATH d1) const
inline

Definition at line 378 of file sch_sheet_path.h.

378{ return !( *this == d1 ) ; }

◆ operator+()

SCH_SHEET_PATH SCH_SHEET_PATH::operator+ ( const SCH_SHEET_PATH aOther)

Definition at line 123 of file sch_sheet_path.cpp.

124{
125 SCH_SHEET_PATH retv = *this;
126
127 size_t size = aOther.size();
128
129 for( size_t i = 0; i < size; i++ )
130 retv.push_back( aOther.at( i ) );
131
132 return retv;
133}
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
void push_back(SCH_SHEET *aSheet)
Forwarded method from std::vector.

References at(), push_back(), and size().

◆ operator<()

bool SCH_SHEET_PATH::operator< ( const SCH_SHEET_PATH d1) const
inline

Definition at line 380 of file sch_sheet_path.h.

380{ return m_sheets < d1.m_sheets; }

References m_sheets.

◆ operator=()

SCH_SHEET_PATH & SCH_SHEET_PATH::operator= ( const SCH_SHEET_PATH aOther)

Definition at line 116 of file sch_sheet_path.cpp.

117{
118 initFromOther( aOther );
119 return *this;
120}

References initFromOther().

◆ operator==()

bool SCH_SHEET_PATH::operator== ( const SCH_SHEET_PATH d1) const

Definition at line 432 of file sch_sheet_path.cpp.

433{
434 return m_current_hash == d1.GetCurrentHash();
435}
size_t GetCurrentHash() const

References GetCurrentHash(), and m_current_hash.

◆ Path()

◆ PathAsString()

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 260 of file sch_sheet_path.cpp.

261{
262 wxString s;
263
264 s = wxT( "/" ); // This is the root path
265
266 // Start at 1 to avoid the root sheet, which does not need to be added to the path.
267 // Its timestamp changes anyway.
268 for( unsigned i = 1; i < size(); i++ )
269 s += at( i )->m_Uuid.AsString() + "/";
270
271 return s;
272}
wxString AsString() const
Definition: kiid.cpp:249

References KIID::AsString(), at(), EDA_ITEM::m_Uuid, and size().

Referenced by SCH_REFERENCE::GetPath(), SCH_EAGLE_PLUGIN::loadInstance(), NETLIST_EXPORTER_XML::makeSymbols(), SCH_EDIT_FRAME::SendSelectItemsToPcb(), and NETLIST_EXPORTER_ORCADPCB2::WriteNetlist().

◆ PathHumanReadable()

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 297 of file sch_sheet_path.cpp.

298{
299 wxString s;
300
301 if( aUseShortRootName )
302 {
303 s = wxS( "/" ); // Use only the short name in netlists
304 }
305 else
306 {
307 wxString fileName;
308
309 if( !empty() && at( 0 )->GetScreen() )
310 fileName = at( 0 )->GetScreen()->GetFileName();
311
312 wxFileName fn = fileName;
313
314 s = fn.GetName() + wxS( "/" );
315 }
316
317 // Start at 1 since we've already processed the root sheet.
318 for( unsigned i = 1; i < size(); i++ )
319 s << at( i )->GetFields()[SHEETNAME].GetShownText() << wxS( "/" );
320
321 return s;
322}
std::vector< SCH_FIELD > & GetFields()
Definition: sch_sheet.h:91
@ SHEETNAME
Definition: sch_sheet.h:43

References at(), empty(), SCH_SHEET::GetFields(), SCH_SCREEN::GetFileName(), SCH_SHEET::GetScreen(), SHEETNAME, and size().

Referenced by KIGFX::SCH_VIEW::DisplaySheet(), SCH_EDIT_TOOL::EditPageNumber(), SCH_EDIT_FRAME::GetScreenDesc(), MakeFilePathRelativeToParentSheet(), NETLIST_EXPORTER_XML::makeSymbols(), HIERARCHY_NAVIG_PANEL::onRightClick(), DIALOG_SHEET_PROPERTIES::OnUpdateUI(), DIALOG_PLOT_SCHEMATIC::plotOneSheetDXF(), DIALOG_PLOT_SCHEMATIC::plotOneSheetHpgl(), DIALOG_PLOT_SCHEMATIC::plotOneSheetPDF(), DIALOG_PLOT_SCHEMATIC::plotOneSheetPS(), DIALOG_PLOT_SCHEMATIC::plotOneSheetSVG(), SCH_CONNECTION::recacheName(), SCHEMATIC::ResolveTextVar(), and SCH_SHEET::ResolveTextVar().

◆ PathWithoutRootUuid()

KIID_PATH SCH_SHEET_PATH::PathWithoutRootUuid ( ) const

Get the sheet path as an KIID_PATH without the root sheet UUID prefix.

Note
This KIID_PATH does not include the root sheet UUID prefixed to the path.

Definition at line 286 of file sch_sheet_path.cpp.

287{
289
290 for( size_t i = 1; i < size(); i++ )
291 path.push_back( at( i )->m_Uuid );
292
293 return path;
294}

References at(), EDA_ITEM::m_Uuid, path, and size().

Referenced by SCH_SHEET::AddInstance(), SCH_SEXPR_PLUGIN::Format(), SCH_SHEET::GetPageNumber(), and SCH_SHEET::SetPageNumber().

◆ pop_back()

◆ push_back()

◆ Rehash()

void SCH_SHEET_PATH::Rehash ( )

Definition at line 153 of file sch_sheet_path.cpp.

154{
155 m_current_hash = 0;
156
157 for( SCH_SHEET* sheet : m_sheets )
158 boost::hash_combine( m_current_hash, sheet->m_Uuid.Hash() );
159}
static void hash_combine(std::size_t &seed)
This is a dummy function to take the final case of hash_combine below.
Definition: hash.h:34

References hash_combine(), m_current_hash, and m_sheets.

Referenced by clear(), pop_back(), and push_back().

◆ SetPageNumber()

void SCH_SHEET_PATH::SetPageNumber ( const wxString &  aPageNumber)

Set the sheet instance user definable page number.

Note
User definable page numbers can be any string devoid of white space characters.

Definition at line 529 of file sch_sheet_path.cpp.

530{
531 SCH_SHEET* sheet = Last();
532
533 wxCHECK( sheet, /* void */ );
534
535 sheet->SetPageNumber( *this, aPageNumber );
536}
void SetPageNumber(const SCH_SHEET_PATH &aInstance, const wxString &aPageNumber)
Set the page number for the sheet instance aInstance.
Definition: sch_sheet.cpp:1249

References Last(), and SCH_SHEET::SetPageNumber().

Referenced by SCH_EDIT_TOOL::EditPageNumber(), and HIERARCHY_NAVIG_PANEL::onRightClick().

◆ SetSymbolInstancesToDefault()

void SCH_SHEET_PATH::SetSymbolInstancesToDefault ( )

Set all of the symbol instances in this sheet instance to the default symbol instance data.

Definition at line 419 of file sch_sheet_path.cpp.

420{
421 for( SCH_ITEM* item : LastScreen()->Items().OfType( SCH_SYMBOL_T ) )
422 {
423 SCH_SYMBOL* symbol = static_cast<SCH_SYMBOL*>( item );
424
425 wxCHECK2( symbol, continue );
426
427 symbol->SetInstanceToDefault( *this );
428 }
429}
void SetInstanceToDefault(const SCH_SHEET_PATH &aInstance)

References LastScreen(), SCH_SYMBOL_T, and SCH_SYMBOL::SetInstanceToDefault().

Referenced by DIALOG_SHEET_PROPERTIES::TransferDataFromWindow().

◆ SetVirtualPageNumber()

void SCH_SHEET_PATH::SetVirtualPageNumber ( int  aPageNumber)
inline

Set the sheet instance virtual page number.

Virtual page numbers are incremental integers set automatically when the sheet path hierarchy is created (

See also
SCH_SHEET_LIST::BuildSheetList). The virtual page numbering is ordered by the X and Y position of the sheet in a schematic which mimics the page numbering code prior to the addition of actual user definable page numbers. Virtual page numbers should only be use when annotating schematics.

Definition at line 185 of file sch_sheet_path.h.

185{ m_virtualPageNumber = aPageNumber; }

References m_virtualPageNumber.

Referenced by SCH_SHEET_LIST::BuildSheetList(), SCH_EDIT_FRAME::SetSheetNumberAndCount(), and SCH_SHEET_LIST::SortByPageNumbers().

◆ size()

◆ 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.

Parameters
aSrcFileNameis the source file name of the sheet add to aDestFileName.
aDestFileNameis the file name of the destination sheet for aSrcFileName.
Returns
true if aFileName will cause recursion in the sheet path. Otherwise false.
Todo:
Store sheet file names with full path, either relative to project path or absolute path. The current design always assumes subsheet files are located in the project folder which may or may not be desirable.

Definition at line 438 of file sch_sheet_path.cpp.

439{
440 auto pair = std::make_pair( aSrcFileName, aDestFileName );
441
442 if( m_recursion_test_cache.count( pair ) )
443 return m_recursion_test_cache.at( pair );
444
445 SCHEMATIC* sch = LastScreen()->Schematic();
446
447 wxCHECK_MSG( sch, false, "No SCHEMATIC found in SCH_SHEET_PATH::TestForRecursion!" );
448
449 wxFileName rootFn = sch->GetFileName();
450 wxFileName srcFn = aSrcFileName;
451 wxFileName destFn = aDestFileName;
452
453 if( srcFn.IsRelative() )
454 srcFn.MakeAbsolute( rootFn.GetPath() );
455
456 if( destFn.IsRelative() )
457 destFn.MakeAbsolute( rootFn.GetPath() );
458
459
460 // The source and destination sheet file names cannot be the same.
461 if( srcFn == destFn )
462 {
463 m_recursion_test_cache[pair] = true;
464 return true;
465 }
466
470 unsigned i = 0;
471
472 while( i < size() )
473 {
474 wxFileName cmpFn = at( i )->GetFileName();
475
476 if( cmpFn.IsRelative() )
477 cmpFn.MakeAbsolute( rootFn.GetPath() );
478
479 // Test if the file name of the destination sheet is in anywhere in this sheet path.
480 if( cmpFn == destFn )
481 break;
482
483 i++;
484 }
485
486 // The destination sheet file name was not found in the sheet path or the destination
487 // sheet file name is the root sheet so no recursion is possible.
488 if( i >= size() || i == 0 )
489 {
490 m_recursion_test_cache[pair] = false;
491 return false;
492 }
493
494 // Walk back up to the root sheet to see if the source file name is already a parent in
495 // the sheet path. If so, recursion will occur.
496 do
497 {
498 i -= 1;
499
500 wxFileName cmpFn = at( i )->GetFileName();
501
502 if( cmpFn.IsRelative() )
503 cmpFn.MakeAbsolute( rootFn.GetPath() );
504
505 if( cmpFn == srcFn )
506 {
507 m_recursion_test_cache[pair] = true;
508 return true;
509 }
510
511 } while( i != 0 );
512
513 // The source sheet file name is not a parent of the destination sheet file name.
514 m_recursion_test_cache[pair] = false;
515 return false;
516}
Holds all the data relating to one schematic.
Definition: schematic.h:60
wxString GetFileName() const override
Helper to retrieve the filename from the root sheet screen.
Definition: schematic.cpp:166
SCHEMATIC * Schematic() const
Definition: sch_screen.cpp:86
std::map< std::pair< wxString, wxString >, bool > m_recursion_test_cache
Page numbers are maintained by the sheet load order.

References at(), SCH_SHEET::GetFileName(), SCHEMATIC::GetFileName(), LastScreen(), m_recursion_test_cache, SCH_SCREEN::Schematic(), and size().

Referenced by SCH_SHEET_LIST::BuildSheetList().

◆ UpdateAllScreenReferences()

void SCH_SHEET_PATH::UpdateAllScreenReferences ( ) const

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 325 of file sch_sheet_path.cpp.

326{
327 std::vector<SCH_ITEM*> symbols;
328
329 std::copy_if( LastScreen()->Items().begin(),
330 LastScreen()->Items().end(),
331 std::back_inserter( symbols ),
332 []( SCH_ITEM* aItem )
333 {
334 return ( aItem->Type() == SCH_SYMBOL_T );
335 } );
336
337 for( SCH_ITEM* item : symbols )
338 {
339 SCH_SYMBOL* symbol = static_cast<SCH_SYMBOL*>( item );
340 symbol->GetField( REFERENCE_FIELD )->SetText( symbol->GetRef( this ) );
341 symbol->GetField( VALUE_FIELD )->SetText( symbol->GetValue( this, false ) );
342 symbol->GetField( FOOTPRINT_FIELD )->SetText( symbol->GetFootprint( this, false ) );
343 symbol->UpdateUnit( symbol->GetUnitSelection( this ) );
344 LastScreen()->Update( item );
345 }
346}
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:97
virtual void SetText(const wxString &aText)
Definition: eda_text.cpp:163
void Update(SCH_ITEM *aItem)
Update aItem's bounding box in the tree.
Definition: sch_screen.cpp:259
const wxString GetFootprint(const SCH_SHEET_PATH *sheet, bool aResolve) const
Return the instance-specific footprint assignment for the given sheet path.
Definition: sch_symbol.cpp:717
void UpdateUnit(int aUnit)
Change the unit number to aUnit without setting any internal flags.
Definition: sch_symbol.cpp:400
SCH_FIELD * GetField(MANDATORY_FIELD_T aFieldType)
Return a mandatory field in this symbol.
Definition: sch_symbol.cpp:776
const wxString GetValue(const SCH_SHEET_PATH *sheet, bool aResolve) const
Return the instance-specific value for the given sheet path.
Definition: sch_symbol.cpp:651
int GetUnitSelection(const SCH_SHEET_PATH *aSheet) const
Return the instance-specific unit selection for the given sheet path.
Definition: sch_symbol.cpp:609
@ FOOTPRINT_FIELD
Field Name Module PCB, i.e. "16DIP300".
@ VALUE_FIELD
Field Value of part, i.e. "3.3K".
@ REFERENCE_FIELD
Field Reference of part, i.e. "IC21".

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(), EDA_ITEM::Type(), SCH_SCREEN::Update(), 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_EDIT_FRAME::FixupJunctions(), DIALOG_MIGRATE_BUSES::onItemSelected(), SCH_PRINTOUT::OnPrintPage(), DIALOG_UPDATE_FROM_PCB::OnUpdateClick(), SCH_EDIT_FRAME::OpenProjectFiles(), SCH_EDITOR_CONTROL::Paste(), SCH_DRAWING_TOOLS::PlaceSymbol(), DIALOG_CHANGE_SYMBOLS::processMatchingSymbols(), SCH_EDITOR_CONTROL::ReplaceAll(), SCH_EDITOR_CONTROL::ReplaceAndFindNext(), and DIALOG_PLOT_SCHEMATIC::restoreEnvironment().

Member Data Documentation

◆ m_current_hash

size_t SCH_SHEET_PATH::m_current_hash
protected

Definition at line 388 of file sch_sheet_path.h.

Referenced by GetCurrentHash(), initFromOther(), operator==(), Rehash(), and SCH_SHEET_PATH().

◆ m_recursion_test_cache

std::map<std::pair<wxString, wxString>, bool> SCH_SHEET_PATH::m_recursion_test_cache
protected

Page numbers are maintained by the sheet load order.

Definition at line 392 of file sch_sheet_path.h.

Referenced by TestForRecursion().

◆ m_sheets

std::vector< SCH_SHEET* > SCH_SHEET_PATH::m_sheets
protected

◆ m_virtualPageNumber

int SCH_SHEET_PATH::m_virtualPageNumber
protected

The documentation for this class was generated from the following files: