KiCad PCB EDA Suite
SCH_SHEET_LIST Class Reference

SCH_SHEET_LIST. More...

#include <sch_sheet_path.h>

Inheritance diagram for SCH_SHEET_LIST:

Public Member Functions

 SCH_SHEET_LIST (SCH_SHEET *aSheet=NULL)
 Constructor build a flattened list of SCH_SHEET_PATH objects from aSheet. More...
 
 ~SCH_SHEET_LIST ()
 
bool IsModified ()
 Function IsModified checks the entire hierarchy for any modifications. More...
 
void ClearModifyStatus ()
 
SCH_ITEMGetItem (const KIID &aID, SCH_SHEET_PATH *aPathOut)
 Fetch a SCH_ITEM by ID. More...
 
void AnnotatePowerSymbols ()
 Function AnnotatePowerSymbols Silently annotates the not yet annotated power symbols of the entire hierarchy of the sheet path list. More...
 
void GetComponents (SCH_REFERENCE_LIST &aReferences, bool aIncludePowerSymbols=true, bool aForceIncludeOrphanComponents=false)
 Function GetComponents adds a SCH_REFERENCE() object to aReferences for each component in the list of sheets. More...
 
void GetMultiUnitComponents (SCH_MULTI_UNIT_REFERENCE_MAP &aRefList, bool aIncludePowerSymbols=true)
 Function GetMultiUnitComponents adds a SCH_REFERENCE_LIST object to aRefList for each same-reference set of multi-unit parts in the list of sheets. More...
 
bool SetComponentFootprint (const wxString &aReference, const wxString &aFootPrint, bool aSetVisible)
 Function SetFootprintField searches all the sheets for a component with aReference and set the footprint field to aFootPrint if found. More...
 
bool IsComplexHierarchy () const
 Function IsComplexHierarchy searches all of the sheets for duplicate files names which indicates a complex hierarchy. More...
 
bool TestForRecursion (const SCH_SHEET_LIST &aSrcSheetHierarchy, const wxString &aDestFileName) const
 Function TestForRecursion. More...
 
SCH_SHEET_PATHFindSheetForScreen (SCH_SCREEN *aScreen)
 Function FindSheetForScreen. More...
 
void BuildSheetList (SCH_SHEET *aSheet)
 Function BuildSheetList builds the list of sheets and their sheet path from aSheet. More...
 
bool NameExists (const wxString &aSheetName)
 

Private Attributes

bool m_isRootSheet
 
SCH_SHEET_PATH m_currentSheetPath
 

Detailed Description

SCH_SHEET_LIST.

handles a list of 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 component references are specific to a sheet path. When a sheet is entered, component references and sheet page number are updated.

Definition at line 319 of file sch_sheet_path.h.

Constructor & Destructor Documentation

◆ SCH_SHEET_LIST()

SCH_SHEET_LIST::SCH_SHEET_LIST ( SCH_SHEET aSheet = NULL)

Constructor build 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 323 of file sch_sheet_path.cpp.

324 {
325  m_isRootSheet = false;
326 
327  if( aSheet != NULL )
328  BuildSheetList( aSheet );
329 }
#define NULL
void BuildSheetList(SCH_SHEET *aSheet)
Function BuildSheetList builds the list of sheets and their sheet path from aSheet.

References BuildSheetList(), m_isRootSheet, and NULL.

◆ ~SCH_SHEET_LIST()

SCH_SHEET_LIST::~SCH_SHEET_LIST ( )
inline

Definition at line 335 of file sch_sheet_path.h.

335 {}

Member Function Documentation

◆ AnnotatePowerSymbols()

void SCH_SHEET_LIST::AnnotatePowerSymbols ( )

Function AnnotatePowerSymbols Silently annotates 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 464 of file sch_sheet_path.cpp.

465 {
466  // List of reference for power symbols
467  SCH_REFERENCE_LIST references;
468 
469  // Map of locked components (not used, but needed by Annotate()
470  SCH_MULTI_UNIT_REFERENCE_MAP lockedComponents;
471 
472  // Build the list of power components:
473  for( SCH_SHEET_PATH& sheet : *this )
474  {
475  for( auto item : sheet.LastScreen()->Items().OfType( SCH_COMPONENT_T ) )
476  {
477  auto component = static_cast<SCH_COMPONENT*>( item );
478  LIB_PART* part = component->GetPartRef().get();
479 
480  if( !part || !part->IsPower() )
481  continue;
482 
483  if( part )
484  {
485  SCH_REFERENCE schReference( component, part, sheet );
486  references.AddItem( schReference );
487  }
488  }
489  }
490 
491  // Find duplicate, and silently clear annotation of duplicate
492  std::map<wxString, int> ref_list; // stores the existing references
493 
494  for( unsigned ii = 0; ii< references.GetCount(); ++ii )
495  {
496  wxString curr_ref = references[ii].GetRef();
497 
498  if( ref_list.find( curr_ref ) == ref_list.end() )
499  {
500  ref_list[curr_ref] = ii;
501  continue;
502  }
503 
504  // Possible duplicate, if the ref ends by a number:
505  if( curr_ref.Last() < '0' && curr_ref.Last() > '9' )
506  continue; // not annotated
507 
508  // Duplicate: clear annotation by removing the number ending the ref
509  while( curr_ref.Last() >= '0' && curr_ref.Last() <= '9' )
510  curr_ref.RemoveLast();
511 
512  references[ii].SetRef( curr_ref );
513  }
514 
515 
516  // Break full components reference in name (prefix) and number:
517  // example: IC1 become IC, and 1
518  references.SplitReferences();
519 
520  // Ensure all power symbols have the reference starting by '#'
521  // (No sure this is really useful)
522  for( unsigned ii = 0; ii< references.GetCount(); ++ii )
523  {
524  if( references[ii].GetRef()[0] != '#' )
525  {
526  wxString new_ref = "#" + references[ii].GetRef();
527  references[ii].SetRef( new_ref );
528  }
529  }
530 
531  // Recalculate and update reference numbers in schematic
532  references.Annotate( false, 0, 100, lockedComponents );
533  references.UpdateAnnotation();
534 }
void AddItem(SCH_REFERENCE &aItem)
Function AddItem adds a SCH_REFERENCE object to the list of references.
EE_TYPE OfType(KICAD_T aType)
Definition: sch_rtree.h:219
SCH_REFERENCE_LIST is used to create a flattened list of components because in a complex hierarchy,...
void UpdateAnnotation()
function UpdateAnnotation Updates the reference components for the schematic project (or the current ...
Define a library symbol object.
void Annotate(bool aUseSheetNum, int aSheetIntervalId, int aStartNumber, SCH_MULTI_UNIT_REFERENCE_MAP aLockedUnitMap)
Function Annotate set the reference designators in the list that have not been annotated.
SCH_SHEET_PATH.
std::map< wxString, SCH_REFERENCE_LIST > SCH_MULTI_UNIT_REFERENCE_MAP
Type SCH_MULTI_UNIT_REFERENCE_MAP is used to create a map of reference designators for multi-unit par...
bool IsPower() const
SCH_SCREEN * LastScreen()
Function LastScreen.
void SplitReferences()
Function SplitReferences attempts to split all reference designators into a name (U) and number (1).
EE_RTREE & Items()
Definition: sch_screen.h:127
unsigned GetCount()
Function GetCount.
SCH_REFERENCE is used as a helper to define a component's reference designator in a schematic.

References SCH_REFERENCE_LIST::AddItem(), SCH_REFERENCE_LIST::Annotate(), SCH_REFERENCE_LIST::GetCount(), LIB_PART::IsPower(), SCH_SCREEN::Items(), SCH_SHEET_PATH::LastScreen(), EE_RTREE::OfType(), SCH_COMPONENT_T, SCH_REFERENCE_LIST::SplitReferences(), and SCH_REFERENCE_LIST::UpdateAnnotation().

Referenced by SCH_EDIT_FRAME::CreateNetlist(), SCH_EDIT_FRAME::KiwayMailIn(), SCH_EDIT_FRAME::prepareForNetlist(), and DIALOG_ERC::TestErc().

◆ BuildSheetList()

void SCH_SHEET_LIST::BuildSheetList ( SCH_SHEET aSheet)

Function BuildSheetList builds 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.

Parameters
aSheetis the starting sheet from which the list is built, or NULL indicating that g_RootSheet should be used.
Exceptions
std::bad_allocif the memory for the sheet path list could not be allocated.
Todo:
: Schematic page number is currently a left over relic and is generated as SCH_SHEET_PATH object is pushed to the list. This only has meaning when entire hierarchy is created from the root sheet down.

Definition at line 332 of file sch_sheet_path.cpp.

333 {
334  wxCHECK_RET( aSheet != NULL, wxT( "Cannot build sheet list from undefined sheet." ) );
335 
336  std::vector<SCH_SHEET*> badSheets;
337 
338  if( aSheet == g_RootSheet )
339  m_isRootSheet = true;
340 
341  m_currentSheetPath.push_back( aSheet );
342 
348  m_currentSheetPath.SetPageNumber( size() + 1 );
349  push_back( m_currentSheetPath );
350 
352  {
353  for( auto item : m_currentSheetPath.LastScreen()->Items().OfType( SCH_SHEET_T ) )
354  {
355  auto sheet = static_cast<SCH_SHEET*>( item );
356 
358  sheet->GetFileName(), aSheet->GetFileName() ) )
359  BuildSheetList( sheet );
360  else
361  badSheets.push_back( sheet );
362  }
363  }
364 
365  for( auto sheet : badSheets )
366  {
369  }
370 
372 }
bool TestForRecursion(const wxString &aSrcFileName, const wxString &aDestFileName) const
Function TestForRecursion.
bool Remove(SCH_ITEM *aItem)
Remove aItem from the schematic associated with this screen.
Definition: sch_screen.cpp:238
void SetPageNumber(int aPageNumber)
void push_back(SCH_SHEET *aSheet)
Forwarded method from std::vector.
EE_TYPE OfType(KICAD_T aType)
Definition: sch_rtree.h:219
void pop_back()
Forwarded method from std::vector.
#define NULL
SCH_SHEET_PATH m_currentSheetPath
wxString GetFileName() const
Return the filename corresponding to this sheet.
Definition: sch_sheet.h:491
void BuildSheetList(SCH_SHEET *aSheet)
Function BuildSheetList builds the list of sheets and their sheet path from aSheet.
SCH_SCREEN * LastScreen()
Function LastScreen.
EE_RTREE & Items()
Definition: sch_screen.h:127
SCH_SHEET * g_RootSheet
void SetModify()
Definition: base_screen.h:224

References g_RootSheet, SCH_SHEET::GetFileName(), SCH_SCREEN::Items(), SCH_SHEET_PATH::LastScreen(), m_currentSheetPath, m_isRootSheet, NULL, EE_RTREE::OfType(), SCH_SHEET_PATH::pop_back(), SCH_SHEET_PATH::push_back(), SCH_SCREEN::Remove(), SCH_SHEET_T, BASE_SCREEN::SetModify(), SCH_SHEET_PATH::SetPageNumber(), and SCH_SHEET_PATH::TestForRecursion().

Referenced by DIALOG_PLOT_SCHEMATIC::CreateDXFFile(), DIALOG_PLOT_SCHEMATIC::createHPGLFile(), DIALOG_PLOT_SCHEMATIC::createPDFFile(), DIALOG_PLOT_SCHEMATIC::createPSFile(), DIALOG_PLOT_SCHEMATIC::createSVGFile(), SCH_EDITOR_CONTROL::FindComponentAndItem(), SCH_EDIT_FRAME::FixupJunctions(), and SCH_SHEET_LIST().

◆ ClearModifyStatus()

void SCH_SHEET_LIST::ClearModifyStatus ( )

Definition at line 399 of file sch_sheet_path.cpp.

400 {
401  for( const SCH_SHEET_PATH& sheet : *this )
402  {
403  if( sheet.LastScreen() )
404  sheet.LastScreen()->ClrModify();
405  }
406 }
SCH_SHEET_PATH.
SCH_SCREEN * LastScreen()
Function LastScreen.
void ClrModify()
Definition: base_screen.h:225

References BASE_SCREEN::ClrModify(), and SCH_SHEET_PATH::LastScreen().

Referenced by SCH_EDIT_FRAME::OnCloseWindow().

◆ FindSheetForScreen()

SCH_SHEET_PATH * SCH_SHEET_LIST::FindSheetForScreen ( SCH_SCREEN aScreen)

Function FindSheetForScreen.

returns the first sheetPath (not necessarily the only one) using a particular screen

Definition at line 631 of file sch_sheet_path.cpp.

632 {
633  for( SCH_SHEET_PATH& sheetpath : *this )
634  {
635  if( sheetpath.LastScreen() == aScreen )
636  return &sheetpath;
637  }
638 
639  return nullptr;
640 }
SCH_SHEET_PATH.
SCH_SCREEN * LastScreen()
Function LastScreen.

References SCH_SHEET_PATH::LastScreen().

Referenced by SCH_EDITOR_CONTROL::FindNext().

◆ GetComponents()

void SCH_SHEET_LIST::GetComponents ( SCH_REFERENCE_LIST aReferences,
bool  aIncludePowerSymbols = true,
bool  aForceIncludeOrphanComponents = false 
)

Function GetComponents adds a SCH_REFERENCE() object to aReferences for each component in the list of sheets.

Parameters
aReferencesList of references to populate.
aIncludePowerSymbolsSet to false to only get normal components.
aForceIncludeOrphanComponents: true to include components having no symbol found in lib. ( orphan components) The normal option is false, and set to true only to build the full list of components.

Definition at line 537 of file sch_sheet_path.cpp.

539 {
540  for( SCH_SHEET_PATH& sheet : *this )
541  sheet.GetComponents( aReferences, aIncludePowerSymbols, aForceIncludeOrphanComponents );
542 }
void GetComponents(SCH_REFERENCE_LIST &aReferences, bool aIncludePowerSymbols=true, bool aForceIncludeOrphanComponents=false)
Function GetComponents adds a SCH_REFERENCE() object to aReferences for each component in the sheet.
SCH_SHEET_PATH.

References SCH_SHEET_PATH::GetComponents().

Referenced by SCH_EDIT_FRAME::AnnotateComponents(), SCH_EDITOR_CONTROL::BackAnnotateFootprints(), BACK_ANNOTATE::BackAnnotateSymbols(), SCH_EDIT_FRAME::CheckAnnotate(), DIALOG_FIELDS_EDITOR_GLOBAL::DIALOG_FIELDS_EDITOR_GLOBAL(), DIALOG_EDIT_COMPONENTS_LIBID::initDlg(), mapExistingAnnotation(), and SCH_EDITOR_CONTROL::processCmpToFootprintLinkFile().

◆ GetItem()

SCH_ITEM * SCH_SHEET_LIST::GetItem ( const KIID aID,
SCH_SHEET_PATH aPathOut 
)

Fetch a SCH_ITEM by ID.

Also returns the sheet the item was found on in aPathOut.

Definition at line 409 of file sch_sheet_path.cpp.

410 {
411  for( const SCH_SHEET_PATH& sheet : *this )
412  {
413  SCH_SCREEN* screen = sheet.LastScreen();
414 
415  for( SCH_ITEM* aItem : screen->Items() )
416  {
417  if( aItem->m_Uuid == aID )
418  {
419  *aPathOut = sheet;
420  return aItem;
421  }
422  else if( aItem->Type() == SCH_COMPONENT_T )
423  {
424  SCH_COMPONENT* comp = static_cast<SCH_COMPONENT*>( aItem );
425 
426  for( SCH_FIELD* field : comp->GetFields() )
427  {
428  if( field->m_Uuid == aID )
429  {
430  *aPathOut = sheet;
431  return field;
432  }
433  }
434 
435  for( SCH_PIN* pin : comp->GetSchPins() )
436  {
437  if( pin->m_Uuid == aID )
438  {
439  *aPathOut = sheet;
440  return pin;
441  }
442  }
443  }
444  else if( aItem->Type() == SCH_SHEET_T )
445  {
446  SCH_SHEET* sch_sheet = static_cast<SCH_SHEET*>( aItem );
447 
448  for( SCH_SHEET_PIN* pin : sch_sheet->GetPins() )
449  {
450  if( pin->m_Uuid == aID )
451  {
452  *aPathOut = sheet;
453  return pin;
454  }
455  }
456  }
457  }
458  }
459 
460  return nullptr;
461 }
SCH_FIELD instances are attached to a component and provide a place for the component's value,...
Definition: sch_field.h:52
void GetFields(std::vector< SCH_FIELD * > &aVector, bool aVisibleOnly)
Populates a std::vector with SCH_FIELDs.
Define a sheet pin (label) used in sheets to create hierarchical schematics.
Definition: sch_sheet.h:84
SCH_SHEET_PATH.
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition: sch_sheet.h:215
std::vector< SCH_SHEET_PIN * > & GetPins()
Definition: sch_sheet.h:357
SCH_SCREEN * LastScreen()
Function LastScreen.
EE_RTREE & Items()
Definition: sch_screen.h:127
SCH_COMPONENT describes a real schematic component.
Definition: sch_component.h:99
SCH_ITEM is a base class for any item which can be embedded within the SCHEMATIC container class,...
Definition: sch_item.h:147
SCH_PIN_PTRS GetSchPins(const SCH_SHEET_PATH *aSheet=nullptr) const
Retrieves a list of the SCH_PINs for the given sheet path.

References SCH_COMPONENT::GetFields(), SCH_SHEET::GetPins(), SCH_COMPONENT::GetSchPins(), SCH_SCREEN::Items(), SCH_SHEET_PATH::LastScreen(), SCH_COMPONENT_T, and SCH_SHEET_T.

Referenced by SCH_BASE_FRAME::FocusOnItem().

◆ GetMultiUnitComponents()

void SCH_SHEET_LIST::GetMultiUnitComponents ( SCH_MULTI_UNIT_REFERENCE_MAP aRefList,
bool  aIncludePowerSymbols = true 
)

Function GetMultiUnitComponents adds 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.

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

Definition at line 544 of file sch_sheet_path.cpp.

546 {
547  for( SCH_SHEET_PATHS_ITER it = begin(); it != end(); ++it )
548  {
550  (*it).GetMultiUnitComponents( tempMap );
551 
552  for( SCH_MULTI_UNIT_REFERENCE_MAP::value_type& pair : tempMap )
553  {
554  // Merge this list into the main one
555  unsigned n_refs = pair.second.GetCount();
556 
557  for( unsigned thisRef = 0; thisRef < n_refs; ++thisRef )
558  {
559  aRefList[pair.first].AddItem( pair.second[thisRef] );
560  }
561  }
562  }
563 }
SCH_SHEET_PATHS::iterator SCH_SHEET_PATHS_ITER
std::map< wxString, SCH_REFERENCE_LIST > SCH_MULTI_UNIT_REFERENCE_MAP
Type SCH_MULTI_UNIT_REFERENCE_MAP is used to create a map of reference designators for multi-unit par...

Referenced by SCH_EDIT_FRAME::AnnotateComponents(), BACK_ANNOTATE::BackAnnotateSymbols(), and TestMultiunitFootprints().

◆ IsComplexHierarchy()

bool SCH_SHEET_LIST::IsComplexHierarchy ( ) const

Function IsComplexHierarchy searches all of the sheets for duplicate files names which indicates a complex hierarchy.

Returns
true if the SCH_SHEET_LIST is a complex hierarchy.

Definition at line 578 of file sch_sheet_path.cpp.

579 {
580  wxString fileName;
581 
582  for( unsigned i = 0; i < size(); i++ )
583  {
584  fileName = at( i ).Last()->GetFileName();
585 
586  for( unsigned j = 0; j < size(); j++ )
587  {
588  if( i == j )
589  continue;
590 
591  if( fileName == at( j ).Last()->GetFileName() )
592  return true;
593  }
594  }
595 
596  return false;
597 }

◆ IsModified()

bool SCH_SHEET_LIST::IsModified ( )

Function IsModified checks the entire hierarchy for any modifications.

Returns
True if the hierarchy is modified otherwise false.

Definition at line 387 of file sch_sheet_path.cpp.

388 {
389  for( const SCH_SHEET_PATH& sheet : *this )
390  {
391  if( sheet.LastScreen() && sheet.LastScreen()->IsModify() )
392  return true;
393  }
394 
395  return false;
396 }
bool IsModify() const
Definition: base_screen.h:228
SCH_SHEET_PATH.
SCH_SCREEN * LastScreen()
Function LastScreen.

References BASE_SCREEN::IsModify(), and SCH_SHEET_PATH::LastScreen().

Referenced by SCH_EDIT_FRAME::IsContentModified(), SCH_EDIT_FRAME::OnCloseWindow(), SCH_EDIT_FRAME::OpenProjectFiles(), and SCH_EDIT_FRAME::ReCreateMenuBar().

◆ NameExists()

bool SCH_SHEET_LIST::NameExists ( const wxString &  aSheetName)

Definition at line 375 of file sch_sheet_path.cpp.

376 {
377  for( const SCH_SHEET_PATH& sheet : *this )
378  {
379  if( sheet.Last()->GetName() == aSheetName )
380  return true;
381  }
382 
383  return false;
384 }
SCH_SHEET * Last() const
Function Last returns a pointer to the last sheet of the list One can see the others sheet as the "pa...
wxString GetName() const
Definition: sch_sheet.h:280
SCH_SHEET_PATH.

References SCH_SHEET::GetName(), and SCH_SHEET_PATH::Last().

Referenced by SCH_EDIT_TOOL::Duplicate(), and SCH_EDITOR_CONTROL::Paste().

◆ SetComponentFootprint()

bool SCH_SHEET_LIST::SetComponentFootprint ( const wxString &  aReference,
const wxString &  aFootPrint,
bool  aSetVisible 
)

Function SetFootprintField searches all the sheets for a component with aReference and set the footprint field to aFootPrint if found.

Parameters
aReferenceThe reference designator of the component.
aFootPrintThe value to set the footprint field.
aSetVisibleThe value to set the field visibility flag.
Returns
True if aReference was found otherwise false.

Definition at line 566 of file sch_sheet_path.cpp.

568 {
569  bool found = false;
570 
571  for( SCH_SHEET_PATH& sheet : *this )
572  found = sheet.SetComponentFootprint( aReference, aFootPrint, aSetVisible );
573 
574  return found;
575 }
bool SetComponentFootprint(const wxString &aReference, const wxString &aFootPrint, bool aSetVisible)
Function SetFootprintField searches last sheet in the path for a component with aReference and set th...
SCH_SHEET_PATH.

References SCH_SHEET_PATH::SetComponentFootprint().

◆ TestForRecursion()

bool SCH_SHEET_LIST::TestForRecursion ( const SCH_SHEET_LIST aSrcSheetHierarchy,
const wxString &  aDestFileName 
) const

Function TestForRecursion.

test every SCH_SHEET_PATH in the SCH_SHEET_LIST to verify if adding the sheets stored in aSrcSheetHierarchy to the sheet stored in aDestFileName will cause recursion.

Parameters
aSrcSheetHierarchyis the SCH_SHEET_LIST of the source 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.

Definition at line 600 of file sch_sheet_path.cpp.

602 {
603  wxFileName rootFn = g_RootSheet->GetFileName();
604  wxFileName destFn = aDestFileName;
605 
606  if( destFn.IsRelative() )
607  destFn.MakeAbsolute( rootFn.GetPath() );
608 
609  // Test each SCH_SHEET_PATH in this SCH_SHEET_LIST for potential recursion.
610  for( unsigned i = 0; i < size(); i++ )
611  {
612  // Test each SCH_SHEET_PATH in the source sheet.
613  for( unsigned j = 0; j < aSrcSheetHierarchy.size(); j++ )
614  {
615  const SCH_SHEET_PATH* sheetPath = &aSrcSheetHierarchy[j];
616 
617  for( unsigned k = 0; k < sheetPath->size(); k++ )
618  {
619  if( at( i ).TestForRecursion( sheetPath->GetSheet( k )->GetFileName(),
620  aDestFileName ) )
621  return true;
622  }
623  }
624  }
625 
626  // The source sheet file can safely be added to the destination sheet file.
627  return false;
628 }
size_t size() const
Forwarded method from std::vector.
SCH_SHEET_PATH.
wxString GetFileName() const
Return the filename corresponding to this sheet.
Definition: sch_sheet.h:491
const SCH_SHEET * GetSheet(unsigned aIndex) const
SCH_SHEET * g_RootSheet

References g_RootSheet, SCH_SHEET::GetFileName(), SCH_SHEET_PATH::GetSheet(), and SCH_SHEET_PATH::size().

Referenced by SCH_EDIT_FRAME::CheckSheetForRecursion(), and SCH_EDITOR_CONTROL::Paste().

Member Data Documentation

◆ m_currentSheetPath

SCH_SHEET_PATH SCH_SHEET_LIST::m_currentSheetPath
private

Definition at line 323 of file sch_sheet_path.h.

Referenced by BuildSheetList().

◆ m_isRootSheet

bool SCH_SHEET_LIST::m_isRootSheet
private

Definition at line 322 of file sch_sheet_path.h.

Referenced by BuildSheetList(), and SCH_SHEET_LIST().


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