KiCad PCB EDA Suite
sch_sheet_path.cpp
Go to the documentation of this file.
1 /*
2  * This program source code file is part of KiCad, a free EDA CAD application.
3  *
4  * Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
5  * Copyright (C) 2011 Wayne Stambaugh <stambaughw@gmail.com>
6  * Copyright (C) 1992-2017 KiCad Developers, see AUTHORS.txt for contributors.
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, you may find one here:
20  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21  * or you may search the http://www.gnu.org website for the version 2 license,
22  * or you may write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24  */
25 
26 #include <fctsys.h>
27 
28 #include <sch_screen.h>
29 #include <sch_item.h>
30 
31 #include <sch_reference_list.h>
32 #include <class_library.h>
33 #include <sch_sheet_path.h>
34 #include <sch_component.h>
35 #include <sch_sheet.h>
36 #include <template_fieldnames.h>
37 #include <boost/functional/hash.hpp>
38 #include <wx/filename.h>
39 
40 
41 namespace std
42 {
44  {
45  return path.GetCurrentHash();
46  }
47 }
48 
49 
51 {
52  m_pageNumber = 0;
53  m_current_hash = 0;
54 }
55 
56 
58 {
59  m_current_hash = 0;
60 
61  for( auto sheet : m_sheets )
62  boost::hash_combine( m_current_hash, sheet->m_Uuid.Hash() );
63 }
64 
65 
66 int SCH_SHEET_PATH::Cmp( const SCH_SHEET_PATH& aSheetPathToTest ) const
67 {
68  if( size() > aSheetPathToTest.size() )
69  return 1;
70 
71  if( size() < aSheetPathToTest.size() )
72  return -1;
73 
74  //otherwise, same number of sheets.
75  for( unsigned i = 0; i < size(); i++ )
76  {
77  if( at( i )->m_Uuid < aSheetPathToTest.at( i )->m_Uuid )
78  return -1;
79 
80  if( at( i )->m_Uuid != aSheetPathToTest.at( i )->m_Uuid )
81  return 1;
82  }
83 
84  return 0;
85 }
86 
87 
89 {
90  if( !empty() )
91  return m_sheets.back();
92 
93  return nullptr;
94 }
95 
96 
98 {
99  SCH_SHEET* lastSheet = Last();
100 
101  if( lastSheet )
102  return lastSheet->GetScreen();
103 
104  return nullptr;
105 }
106 
107 
109 {
110  SCH_SHEET* lastSheet = Last();
111 
112  if( lastSheet )
113  return lastSheet->GetScreen();
114 
115  return nullptr;
116 }
117 
118 
120 {
121  wxString s;
122 
123  s = wxT( "/" ); // This is the root path
124 
125  // Start at 1 to avoid the root sheet, which does not need to be added to the path.
126  // It's timestamp changes anyway.
127  for( unsigned i = 1; i < size(); i++ )
128  s += at( i )->m_Uuid.AsString() + "/";
129 
130  return s;
131 }
132 
133 
135 {
136  KIID_PATH path;
137 
138  for( const SCH_SHEET* sheet : m_sheets )
139  path.push_back( sheet->m_Uuid );
140 
141  return path;
142 }
143 
144 
145 wxString SCH_SHEET_PATH::GetRootPathName( bool aUseShortName )
146 {
147  // return a PathName for the root sheet (like "/" or "<root>"
148  // DO NOT use it in netlists, because it can easily break these netlists
149  // especially after translation, because many netlists (i.e. spice) do not accept any char
150  // Use only the short name ("/") and the full name only in messages
151  return aUseShortName ? wxT( "/" ) : _( "<root_sheet>" );
152 }
153 
154 
156 {
157  wxString s;
158 
159  if( size() == 1 )
160  return GetRootPathName( true ); // Use only the short name in netlists
161 
162  s = wxT( "/" );
163 
164  // Start at 1 to avoid the root sheet, as above.
165  for( unsigned i = 1; i < size(); i++ )
166  s = s + at( i )->GetName() + wxT( "/" );
167 
168  return s;
169 }
170 
171 
173 {
174  for( auto item : LastScreen()->Items().OfType( SCH_COMPONENT_T ) )
175  {
176  auto component = static_cast<SCH_COMPONENT*>( item );
177  component->GetField( REFERENCE )->SetText( component->GetRef( this ) );
178  component->UpdateUnit( component->GetUnitSelection( this ) );
179  }
180 }
181 
182 
183 
184 void SCH_SHEET_PATH::GetComponents( SCH_REFERENCE_LIST& aReferences, bool aIncludePowerSymbols,
185  bool aForceIncludeOrphanComponents )
186 {
187  for( auto item : LastScreen()->Items().OfType( SCH_COMPONENT_T ) )
188  {
189  auto component = static_cast<SCH_COMPONENT*>( item );
190 
191  // Skip pseudo components, which have a reference starting with #. This mainly
192  // affects power symbols.
193  if( aIncludePowerSymbols || component->GetRef( this )[0] != wxT( '#' ) )
194  {
195  LIB_PART* part = component->GetPartRef().get();
196 
197  if( part || aForceIncludeOrphanComponents )
198  {
199  SCH_REFERENCE schReference( component, part, *this );
200 
201  schReference.SetSheetNumber( m_pageNumber );
202  aReferences.AddItem( schReference );
203  }
204  }
205  }
206 }
207 
208 
210  bool aIncludePowerSymbols )
211 {
212  for( auto item : LastScreen()->Items().OfType( SCH_COMPONENT_T ) )
213  {
214  auto component = static_cast<SCH_COMPONENT*>( item );
215 
216  // Skip pseudo components, which have a reference starting with #. This mainly
217  // affects power symbols.
218  if( !aIncludePowerSymbols && component->GetRef( this )[0] == wxT( '#' ) )
219  continue;
220 
221  LIB_PART* part = component->GetPartRef().get();
222 
223  if( part && part->GetUnitCount() > 1 )
224  {
225  SCH_REFERENCE schReference = SCH_REFERENCE( component, part, *this );
226  schReference.SetSheetNumber( m_pageNumber );
227  wxString reference_str = schReference.GetRef();
228 
229  // Never lock unassigned references
230  if( reference_str[reference_str.Len() - 1] == '?' )
231  continue;
232 
233  aRefList[reference_str].AddItem( schReference );
234  }
235  }
236 }
237 
238 
239 bool SCH_SHEET_PATH::SetComponentFootprint( const wxString& aReference, const wxString& aFootPrint,
240  bool aSetVisible )
241 {
242  SCH_SCREEN* screen = LastScreen();
243 
244  if( screen == NULL )
245  return false;
246 
247  return screen->SetComponentFootprint( this, aReference, aFootPrint, aSetVisible );
248 }
249 
250 
252 {
253  return m_current_hash == d1.GetCurrentHash();
254 }
255 
256 
257 bool SCH_SHEET_PATH::TestForRecursion( const wxString& aSrcFileName,
258  const wxString& aDestFileName ) const
259 {
260  wxFileName rootFn = g_RootSheet->GetFileName();
261  wxFileName srcFn = aSrcFileName;
262  wxFileName destFn = aDestFileName;
263 
264  if( srcFn.IsRelative() )
265  srcFn.MakeAbsolute( rootFn.GetPath() );
266 
267  if( destFn.IsRelative() )
268  destFn.MakeAbsolute( rootFn.GetPath() );
269 
270 
271  // The source and destination sheet file names cannot be the same.
272  if( srcFn == destFn )
273  return true;
274 
278  unsigned i = 0;
279 
280  while( i < size() )
281  {
282  wxFileName cmpFn = at( i )->GetFileName();
283 
284  if( cmpFn.IsRelative() )
285  cmpFn.MakeAbsolute( rootFn.GetPath() );
286 
287  // Test if the file name of the destination sheet is in anywhere in this sheet path.
288  if( cmpFn == destFn )
289  break;
290 
291  i++;
292  }
293 
294  // The destination sheet file name was not found in the sheet path or the destination
295  // sheet file name is the root sheet so no recursion is possible.
296  if( i >= size() || i == 0 )
297  return false;
298 
299  // Walk back up to the root sheet to see if the source file name is already a parent in
300  // the sheet path. If so, recursion will occur.
301  do
302  {
303  i -= 1;
304 
305  wxFileName cmpFn = at( i )->GetFileName();
306 
307  if( cmpFn.IsRelative() )
308  cmpFn.MakeAbsolute( rootFn.GetPath() );
309 
310  if( cmpFn == srcFn )
311  return true;
312 
313  } while( i != 0 );
314 
315  // The source sheet file name is not a parent of the destination sheet file name.
316  return false;
317 }
318 
319 
320 /********************************************************************/
321 /* Class SCH_SHEET_LIST to handle the list of Sheets in a hierarchy */
322 /********************************************************************/
324 {
325  m_isRootSheet = false;
326 
327  if( aSheet != NULL )
328  BuildSheetList( aSheet );
329 }
330 
331 
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 }
373 
374 
375 bool SCH_SHEET_LIST::NameExists( const wxString& aSheetName )
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 }
385 
386 
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 }
397 
398 
400 {
401  for( const SCH_SHEET_PATH& sheet : *this )
402  {
403  if( sheet.LastScreen() )
404  sheet.LastScreen()->ClrModify();
405  }
406 }
407 
408 
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 }
462 
463 
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 }
535 
536 
537 void SCH_SHEET_LIST::GetComponents( SCH_REFERENCE_LIST& aReferences, bool aIncludePowerSymbols,
538  bool aForceIncludeOrphanComponents )
539 {
540  for( SCH_SHEET_PATH& sheet : *this )
541  sheet.GetComponents( aReferences, aIncludePowerSymbols, aForceIncludeOrphanComponents );
542 }
543 
545  bool aIncludePowerSymbols )
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 }
564 
565 
566 bool SCH_SHEET_LIST::SetComponentFootprint( const wxString& aReference,
567  const wxString& aFootPrint, bool aSetVisible )
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 }
576 
577 
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 }
598 
599 
600 bool SCH_SHEET_LIST::TestForRecursion( const SCH_SHEET_LIST& aSrcSheetHierarchy,
601  const wxString& aDestFileName ) const
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 }
629 
630 
632 {
633  for( SCH_SHEET_PATH& sheetpath : *this )
634  {
635  if( sheetpath.LastScreen() == aScreen )
636  return &sheetpath;
637  }
638 
639  return nullptr;
640 }
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.
void SetSheetNumber(int aSheetNumber)
SCH_SHEET_LIST.
SCH_FIELD instances are attached to a component and provide a place for the component's value,...
Definition: sch_field.h:52
bool TestForRecursion(const wxString &aSrcFileName, const wxString &aDestFileName) const
Function TestForRecursion.
bool IsModified()
Function IsModified checks the entire hierarchy for any modifications.
bool Remove(SCH_ITEM *aItem)
Remove aItem from the schematic associated with this screen.
Definition: sch_screen.cpp:238
SCH_SHEET_PATHS::iterator SCH_SHEET_PATHS_ITER
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...
bool operator==(const SCH_SHEET_PATH &d1) const
void SetPageNumber(int aPageNumber)
void push_back(SCH_SHEET *aSheet)
Forwarded method from std::vector.
KIID_PATH Path() const
Get the sheet path as an KIID_PATH.
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
wxString AsString() const
Definition: common.cpp:170
Template specialization to enable wxStrings for certain containers (e.g. unordered_map)
Definition: bitmap.cpp:56
wxString PathAsString() const
Function PathAsString the path uses the time stamps which do not changes even when editing sheet para...
void UpdateAllScreenReferences()
Function UpdateAllScreenReferences updates the reference and the m_Multi parameter (part selection) f...
SCH_SCREEN * GetScreen()
Definition: sch_sheet.h:282
SCH_SHEET_PATH * FindSheetForScreen(SCH_SCREEN *aScreen)
Function FindSheetForScreen.
Field Reference of part, i.e. "IC21".
SCH_SHEET_LIST(SCH_SHEET *aSheet=NULL)
Constructor build a flattened list of SCH_SHEET_PATH objects from aSheet.
SCH_REFERENCE_LIST is used to create a flattened list of components because in a complex hierarchy,...
void GetFields(std::vector< SCH_FIELD * > &aVector, bool aVisibleOnly)
Populates a std::vector with SCH_FIELDs.
void pop_back()
Forwarded method from std::vector.
wxString GetRef() const
Definition: common.h:65
void UpdateAnnotation()
function UpdateAnnotation Updates the reference components for the schematic project (or the current ...
static wxString GetRootPathName(bool aUseShortName=true)
#define NULL
wxString GetName() const
Definition: sch_sheet.h:280
int GetUnitCount() const override
For items with units, return the number of units.
size_t size() const
Forwarded method from std::vector.
SCH_SHEET_PATH m_currentSheetPath
bool SetComponentFootprint(const wxString &aReference, const wxString &aFootPrint, bool aSetVisible)
Function SetFootprintField searches all the sheets for a component with aReference and set the footpr...
std::vector< SCH_SHEET * > m_sheets
size_t operator()(const SCH_SHEET_PATH &path) const
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...
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()
Page numbers are maintained by the sheet load order.
bool IsModify() const
Definition: base_screen.h:228
Define a sheet pin (label) used in sheets to create hierarchical schematics.
Definition: sch_sheet.h:84
SCH_SHEET_PATH.
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.
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 NameExists(const wxString &aSheetName)
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition: sch_sheet.h:215
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 ...
const KIID m_Uuid
Definition: base_struct.h:169
SCH_ITEM * GetItem(const KIID &aID, SCH_SHEET_PATH *aPathOut)
Fetch a SCH_ITEM by ID.
std::vector< SCH_SHEET_PIN * > & GetPins()
Definition: sch_sheet.h:357
const SCH_SHEET * GetSheet(unsigned aIndex) const
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).
#define _(s)
Definition: 3d_actions.cpp:33
size_t GetCurrentHash() const
EE_RTREE & Items()
Definition: sch_screen.h:127
SCH_SHEET * at(size_t aIndex) const
Forwarded method from std::vector.
bool IsComplexHierarchy() const
Function IsComplexHierarchy searches all of the sheets for duplicate files names which indicates a co...
void ClrModify()
Definition: base_screen.h:225
SCH_COMPONENT describes a real schematic component.
Definition: sch_component.h:99
bool empty() const
Forwarded method from std::vector.
void AnnotatePowerSymbols()
Function AnnotatePowerSymbols Silently annotates the not yet annotated power symbols of the entire hi...
SCH_SHEET * g_RootSheet
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 ...
Definition for part library class.
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...
wxString PathHumanReadable() const
Function PathHumanReadable returns the sheet path in a human readable form, i.e.
void SetModify()
Definition: base_screen.h:224
Definition of the SCH_SHEET_PATH and SCH_SHEET_LIST classes for Eeschema.
unsigned GetCount()
Function GetCount.
bool TestForRecursion(const SCH_SHEET_LIST &aSrcSheetHierarchy, const wxString &aDestFileName) const
Function TestForRecursion.
SCH_ITEM is a base class for any item which can be embedded within the SCHEMATIC container class,...
Definition: sch_item.h:147
int Cmp(const SCH_SHEET_PATH &aSheetPathToTest) const
Function Cmp Compare if this is the same sheet path as aSheetPathToTest.
SCH_PIN_PTRS GetSchPins(const SCH_SHEET_PATH *aSheet=nullptr) const
Retrieves a list of the SCH_PINs for the given sheet path.
SCH_REFERENCE is used as a helper to define a component's reference designator in a schematic.
bool SetComponentFootprint(SCH_SHEET_PATH *aSheetPath, const wxString &aReference, const wxString &aFootPrint, bool aSetVisible)
Search this screen for a symbol with aReference and set the footprint field to aFootPrint if found.
Definition: sch_screen.cpp:848