KiCad PCB EDA Suite
SCH_SCREENS Class Reference

Container class that holds multiple SCH_SCREEN objects in a hierarchy. More...

#include <sch_screen.h>

Public Member Functions

 SCH_SCREENS (SCH_SHEET *aSheet=NULL)
 
 ~SCH_SCREENS ()
 
int GetCount () const
 
SCH_SCREENGetFirst ()
 
SCH_SCREENGetNext ()
 
SCH_SCREENGetScreen (unsigned int aIndex) const
 
void ClearAnnotation ()
 Clear the annotation for all components in the hierarchy. More...
 
void ClearAnnotationOfNewSheetPaths (SCH_SHEET_LIST &aInitialSheetPathList)
 Clear the annotation for the components inside new sheetpaths when a complex hierarchy is modified and new sheetpaths added when a screen shares more than one sheet path, missing alternate references are added and alternate references of new sheet paths are cleared. More...
 
int ReplaceDuplicateTimeStamps ()
 Test all sheet and component objects in the schematic for duplicate time stamps and replaces them as necessary. More...
 
void DeleteAllMarkers (enum MARKER_BASE::TYPEMARKER aMarkerType)
 Delete all electronic rules check markers of aMarkerType from all the screens in the list. More...
 
int GetMarkerCount (enum MARKER_BASE::TYPEMARKER aMarkerType, enum MARKER_BASE::MARKER_SEVERITY aSeverity)
 Return the number of ERC markers of aMarkerType from all of the screens in the list. More...
 
void UpdateSymbolLinks (bool aForce=false)
 Initialize or reinitialize the weak reference to the LIB_PART for each SCH_COMPONENT found in the full schematic. More...
 
void TestDanglingEnds ()
 
bool HasNoFullyDefinedLibIds ()
 Test all of the schematic symbols to see if all LIB_ID objects library nickname is not set. More...
 
size_t GetLibNicknames (wxArrayString &aLibNicknames)
 Fetch all of the symbol library nickames into aLibNicknames. More...
 
int ChangeSymbolLibNickname (const wxString &aFrom, const wxString &aTo)
 Change all of the symbol library nicknames. More...
 
void BuildClientSheetPathList ()
 built the list of sheet paths sharing a screen for each screen in use More...
 

Private Member Functions

void addScreenToList (SCH_SCREEN *aScreen)
 
void buildScreenList (SCH_SHEET *aSheet)
 

Private Attributes

std::vector< SCH_SCREEN * > m_screens
 
unsigned int m_index
 

Detailed Description

Container class that holds multiple SCH_SCREEN objects in a hierarchy.

Individual SCH_SCREEN objects are unique and correspond to .sch files.

Definition at line 523 of file sch_screen.h.

Constructor & Destructor Documentation

SCH_SCREENS::SCH_SCREENS ( SCH_SHEET aSheet = NULL)

Definition at line 1244 of file sch_screen.cpp.

References g_RootSheet.

1245 {
1246  m_index = 0;
1247  buildScreenList( ( !aSheet ) ? g_RootSheet : aSheet );
1248 }
unsigned int m_index
Definition: sch_screen.h:527
SCH_SHEET * g_RootSheet
Definition: eeschema.cpp:56
void buildScreenList(SCH_SHEET *aSheet)
SCH_SCREENS::~SCH_SCREENS ( )

Definition at line 1251 of file sch_screen.cpp.

1252 {
1253 }

Member Function Documentation

void SCH_SCREENS::addScreenToList ( SCH_SCREEN aScreen)
private

Definition at line 1285 of file sch_screen.cpp.

References i.

1286 {
1287  if( aScreen == NULL )
1288  return;
1289 
1290  for( unsigned int i = 0; i < m_screens.size(); i++ )
1291  {
1292  if( m_screens[i] == aScreen )
1293  return;
1294  }
1295 
1296  m_screens.push_back( aScreen );
1297 }
std::vector< SCH_SCREEN * > m_screens
Definition: sch_screen.h:526
size_t i
Definition: json11.cpp:597
void SCH_SCREENS::BuildClientSheetPathList ( )

built the list of sheet paths sharing a screen for each screen in use

Definition at line 1580 of file sch_screen.cpp.

References g_RootSheet, and SCH_SCREEN::GetClientSheetPaths().

Referenced by ClearAnnotationOfNewSheetPaths().

1581 {
1582  SCH_SHEET_LIST sheetList( g_RootSheet );
1583 
1584  for( SCH_SCREEN* curr_screen = GetFirst(); curr_screen; curr_screen = GetNext() )
1585  curr_screen->GetClientSheetPaths().Clear();
1586 
1587  for( SCH_SHEET_PATH& sheetpath: sheetList )
1588  {
1589  SCH_SCREEN* used_screen = sheetpath.LastScreen();
1590 
1591  // SEarch for the used_screen in list and add this unique sheet path:
1592  for( SCH_SCREEN* curr_screen = GetFirst(); curr_screen; curr_screen = GetNext() )
1593  {
1594  if( used_screen == curr_screen )
1595  {
1596  curr_screen->GetClientSheetPaths().Add( sheetpath.Path() );
1597  break;
1598  }
1599  }
1600  }
1601 }
Class SCH_SHEET_LIST.
SCH_SCREEN * GetNext()
wxArrayString & GetClientSheetPaths()
Definition: sch_screen.h:155
SCH_SHEET * g_RootSheet
Definition: eeschema.cpp:56
Class SCH_SHEET_PATH.
SCH_SCREEN * GetFirst()
void SCH_SCREENS::buildScreenList ( SCH_SHEET aSheet)
private

Definition at line 1300 of file sch_screen.cpp.

References SCH_SCREEN::GetDrawItems(), SCH_SHEET::GetScreen(), EDA_ITEM::Next(), SCH_SHEET_T, and EDA_ITEM::Type().

1301 {
1302  if( aSheet && aSheet->Type() == SCH_SHEET_T )
1303  {
1304  SCH_SCREEN* screen = aSheet->GetScreen();
1305 
1306  addScreenToList( screen );
1307 
1308  EDA_ITEM* strct = screen->GetDrawItems();
1309 
1310  while( strct )
1311  {
1312  if( strct->Type() == SCH_SHEET_T )
1313  {
1314  buildScreenList( ( SCH_SHEET* )strct );
1315  }
1316 
1317  strct = strct->Next();
1318  }
1319  }
1320 }
KICAD_T Type() const
Function Type()
Definition: base_struct.h:201
EDA_ITEM * Next() const
Definition: base_struct.h:209
SCH_SCREEN * GetScreen()
Definition: sch_sheet.h:279
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition: sch_sheet.h:209
void buildScreenList(SCH_SHEET *aSheet)
SCH_ITEM * GetDrawItems() const
Definition: sch_screen.h:160
void addScreenToList(SCH_SCREEN *aScreen)
Class EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boa...
Definition: base_struct.h:154
int SCH_SCREENS::ChangeSymbolLibNickname ( const wxString &  aFrom,
const wxString &  aTo 
)

Change all of the symbol library nicknames.

Parameters
aFromthe current symbol library name to change.
aTothe new symbol library name.
Returns
the number of symbol library nicknames that were changed.

Definition at line 1546 of file sch_screen.cpp.

References SCH_SCREEN::GetDrawItems(), SCH_COMPONENT::GetLibId(), LIB_ID::GetLibNickname(), SCH_ITEM::Next(), SCH_COMPONENT_T, SCH_COMPONENT::SetLibId(), LIB_ID::SetLibNickname(), and EDA_ITEM::Type().

1547 {
1548  SCH_COMPONENT* symbol;
1549  SCH_ITEM* item;
1550  SCH_ITEM* nextItem;
1551  SCH_SCREEN* screen;
1552  int cnt = 0;
1553 
1554  for( screen = GetFirst(); screen; screen = GetNext() )
1555  {
1556  for( item = screen->GetDrawItems(); item; item = nextItem )
1557  {
1558  nextItem = item->Next();
1559 
1560  if( item->Type() != SCH_COMPONENT_T )
1561  continue;
1562 
1563  symbol = dynamic_cast< SCH_COMPONENT* >( item );
1564  wxASSERT( symbol );
1565 
1566  if( symbol->GetLibId().GetLibNickname() != aFrom )
1567  continue;
1568 
1569  LIB_ID id = symbol->GetLibId();
1570  id.SetLibNickname( aTo );
1571  symbol->SetLibId( id );
1572  cnt++;
1573  }
1574  }
1575 
1576  return cnt;
1577 }
KICAD_T Type() const
Function Type()
Definition: base_struct.h:201
SCH_SCREEN * GetNext()
A logical library item identifier and consists of various portions much like a URI.
Definition: lib_id.h:51
SCH_ITEM * Next() const
void SetLibId(const LIB_ID &aName, PART_LIBS *aLibs=NULL)
int SetLibNickname(const UTF8 &aNickname)
Override the logical library name portion of the LIB_ID to aNickname.
Definition: lib_id.cpp:193
SCH_ITEM * GetDrawItems() const
Definition: sch_screen.h:160
Class SCH_COMPONENT describes a real schematic component.
Definition: sch_component.h:69
const LIB_ID & GetLibId() const
SCH_SCREEN * GetFirst()
const UTF8 & GetLibNickname() const
Return the logical library name portion of a LIB_ID.
Definition: lib_id.h:97
Class SCH_ITEM is a base class for any item which can be embedded within the SCHEMATIC container clas...
void SCH_SCREENS::ClearAnnotation ( )

Clear the annotation for all components in the hierarchy.

Definition at line 1323 of file sch_screen.cpp.

References SCH_SCREEN::ClearAnnotation(), and i.

Referenced by SCH_EDIT_FRAME::AppendSchematic(), and SCH_EDIT_FRAME::DeleteAnnotation().

1324 {
1325  for( size_t i = 0; i < m_screens.size(); i++ )
1326  m_screens[i]->ClearAnnotation( NULL );
1327 }
std::vector< SCH_SCREEN * > m_screens
Definition: sch_screen.h:526
void ClearAnnotation()
Clear the annotation for all components in the hierarchy.
size_t i
Definition: json11.cpp:597
void SCH_SCREENS::ClearAnnotationOfNewSheetPaths ( SCH_SHEET_LIST aInitialSheetPathList)

Clear the annotation for the components inside new sheetpaths when a complex hierarchy is modified and new sheetpaths added when a screen shares more than one sheet path, missing alternate references are added and alternate references of new sheet paths are cleared.

Parameters
aInitialSheetPathListis the initial sheet paths list of hierarchy before changes.

Definition at line 1330 of file sch_screen.cpp.

References BuildClientSheetPathList(), SCH_SCREEN::ClearAnnotation(), SCH_SCREEN::EnsureAlternateReferencesExist(), and g_RootSheet.

Referenced by SCH_EDIT_FRAME::addCurrentItemToScreen(), SCH_EDIT_FRAME::DuplicateItemsInList(), SCH_EDIT_FRAME::OnEditItem(), and SCH_EDIT_FRAME::PasteListOfItems().

1331 {
1332  // Clear the annotation for the components inside new sheetpaths
1333  // not already in aInitialSheetList
1334  SCH_SCREENS screensList( g_RootSheet ); // The list of screens, shared by sheet paths
1335  screensList.BuildClientSheetPathList(); // build the shared by sheet paths, by screen
1336 
1337  // Search for new sheet paths, not existing in aInitialSheetPathList
1338  // and existing in sheetpathList
1339  SCH_SHEET_LIST sheetpathList( g_RootSheet );
1340 
1341  for( SCH_SHEET_PATH& sheetpath: sheetpathList )
1342  {
1343  bool path_exists = false;
1344 
1345  for( const SCH_SHEET_PATH& existing_sheetpath: aInitialSheetPathList )
1346  {
1347  if( existing_sheetpath.Path() == sheetpath.Path() )
1348  {
1349  path_exists = true;
1350  break;
1351  }
1352  }
1353 
1354  if( !path_exists )
1355  {
1356  // A new sheet path is found: clear the annotation corresponding to this new path:
1357  SCH_SCREEN* curr_screen = sheetpath.LastScreen();
1358 
1359  // Clear annotation and create the AR for this path, if not exists,
1360  // when the screen is shared by sheet paths.
1361  // Otherwise ClearAnnotation do nothing, because the F1 field is used as
1362  // reference default value and takes the latest displayed value
1363  curr_screen->EnsureAlternateReferencesExist();
1364  curr_screen->ClearAnnotation( &sheetpath );
1365  }
1366  }
1367 }
Class SCH_SHEET_LIST.
void EnsureAlternateReferencesExist()
For screens shared by many sheetpaths (complex hierarchies): to be able to clear or modify any refere...
Definition: sch_screen.cpp:698
SCH_SHEET * g_RootSheet
Definition: eeschema.cpp:56
Class SCH_SHEET_PATH.
void ClearAnnotation(SCH_SHEET_PATH *aSheetPath)
Clear the annotation for the components in aSheetPath on the screen.
Definition: sch_screen.cpp:679
Container class that holds multiple SCH_SCREEN objects in a hierarchy.
Definition: sch_screen.h:523
void SCH_SCREENS::DeleteAllMarkers ( enum MARKER_BASE::TYPEMARKER  aMarkerType)

Delete all electronic rules check markers of aMarkerType from all the screens in the list.

Parameters
aMarkerTypeType of markers to be deleted.

Definition at line 1413 of file sch_screen.cpp.

References SCH_SCREEN::DeleteItem(), SCH_SCREEN::GetDrawItems(), MARKER_BASE::GetMarkerType(), SCH_ITEM::Next(), SCH_MARKER_T, and EDA_ITEM::Type().

Referenced by DIALOG_ERC::OnEraseDrcMarkersClick(), and DIALOG_ERC::TestErc().

1414 {
1415  SCH_ITEM* item;
1416  SCH_ITEM* nextItem;
1417  SCH_MARKER* marker;
1418  SCH_SCREEN* screen;
1419 
1420  for( screen = GetFirst(); screen; screen = GetNext() )
1421  {
1422  for( item = screen->GetDrawItems(); item; item = nextItem )
1423  {
1424  nextItem = item->Next();
1425 
1426  if( item->Type() != SCH_MARKER_T )
1427  continue;
1428 
1429  marker = (SCH_MARKER*) item;
1430 
1431  if( marker->GetMarkerType() != aMarkerType )
1432  continue;
1433 
1434  screen->DeleteItem( marker );
1435  }
1436  }
1437 }
KICAD_T Type() const
Function Type()
Definition: base_struct.h:201
SCH_SCREEN * GetNext()
SCH_ITEM * Next() const
enum TYPEMARKER GetMarkerType() const
Definition: marker_base.h:164
void DeleteItem(SCH_ITEM *aItem)
Removes aItem from the linked list and deletes the object.
Definition: sch_screen.cpp:182
SCH_ITEM * GetDrawItems() const
Definition: sch_screen.h:160
SCH_SCREEN * GetFirst()
Class SCH_ITEM is a base class for any item which can be embedded within the SCHEMATIC container clas...
int SCH_SCREENS::GetCount ( ) const
inline

Definition at line 532 of file sch_screen.h.

References SCH_SCREEN::ClearAnnotation(), SCH_SCREEN::TestDanglingEnds(), and SCH_SCREEN::UpdateSymbolLinks().

532 { return m_screens.size(); }
std::vector< SCH_SCREEN * > m_screens
Definition: sch_screen.h:526
size_t SCH_SCREENS::GetLibNicknames ( wxArrayString &  aLibNicknames)

Fetch all of the symbol library nickames into aLibNicknames.

Parameters
aLibNicknamesis the array to populate with all of the unique library nicknames.
Returns
the number of symbol library nicknames found.

Definition at line 1515 of file sch_screen.cpp.

References SCH_SCREEN::GetDrawItems(), SCH_COMPONENT::GetLibId(), LIB_ID::GetLibNickname(), SCH_ITEM::Next(), SCH_COMPONENT_T, and EDA_ITEM::Type().

1516 {
1517  SCH_COMPONENT* symbol;
1518  SCH_ITEM* item;
1519  SCH_ITEM* nextItem;
1520  SCH_SCREEN* screen;
1521  wxString nickname;
1522 
1523  for( screen = GetFirst(); screen; screen = GetNext() )
1524  {
1525  for( item = screen->GetDrawItems(); item; item = nextItem )
1526  {
1527  nextItem = item->Next();
1528 
1529  if( item->Type() != SCH_COMPONENT_T )
1530  continue;
1531 
1532  symbol = dynamic_cast< SCH_COMPONENT* >( item );
1533  wxASSERT( symbol );
1534 
1535  nickname = symbol->GetLibId().GetLibNickname();
1536 
1537  if( !nickname.empty() && ( aLibNicknames.Index( nickname ) == wxNOT_FOUND ) )
1538  aLibNicknames.Add( nickname );;
1539  }
1540  }
1541 
1542  return aLibNicknames.GetCount();
1543 }
KICAD_T Type() const
Function Type()
Definition: base_struct.h:201
SCH_SCREEN * GetNext()
SCH_ITEM * Next() const
SCH_ITEM * GetDrawItems() const
Definition: sch_screen.h:160
Class SCH_COMPONENT describes a real schematic component.
Definition: sch_component.h:69
const LIB_ID & GetLibId() const
SCH_SCREEN * GetFirst()
const UTF8 & GetLibNickname() const
Return the logical library name portion of a LIB_ID.
Definition: lib_id.h:97
Class SCH_ITEM is a base class for any item which can be embedded within the SCHEMATIC container clas...
int SCH_SCREENS::GetMarkerCount ( enum MARKER_BASE::TYPEMARKER  aMarkerType,
enum MARKER_BASE::MARKER_SEVERITY  aSeverity 
)

Return the number of ERC markers of aMarkerType from all of the screens in the list.

Parameters
aMarkerTypeIndicates the type of marker to count. if MARKER_UNSPEC all markers are counted.
aSeverityIndicates the error level of marker to count. useMARKER_SEVERITY_UNSPEC to count all markersof the specified type
Returns
int count of the markers found.

Definition at line 1440 of file sch_screen.cpp.

References MARKER_BASE::GetErrorLevel(), MARKER_BASE::GetMarkerType(), MARKER_BASE::MARKER_SEVERITY_UNSPEC, MARKER_BASE::MARKER_UNSPEC, SCH_ITEM::Next(), and SCH_MARKER_T.

Referenced by DIALOG_ERC::updateMarkerCounts().

1442 {
1443  int count = 0;
1444 
1445  for( SCH_SCREEN* screen = GetFirst(); screen; screen = GetNext() )
1446  {
1447  for( SCH_ITEM* item = screen->GetDrawItems(); item; item = item->Next() )
1448  {
1449  if( item->Type() != SCH_MARKER_T )
1450  continue;
1451 
1452  SCH_MARKER* marker = (SCH_MARKER*) item;
1453 
1454  if( ( aMarkerType != MARKER_BASE::MARKER_UNSPEC ) &&
1455  ( marker->GetMarkerType() != aMarkerType ) )
1456  continue;
1457 
1458  if( aSeverity == MARKER_BASE::MARKER_SEVERITY_UNSPEC ||
1459  aSeverity == marker->GetErrorLevel() )
1460  count++;
1461  }
1462  }
1463 
1464  return count;
1465 }
SCH_SCREEN * GetNext()
SCH_ITEM * Next() const
enum TYPEMARKER GetMarkerType() const
Definition: marker_base.h:164
MARKER_SEVERITY GetErrorLevel() const
Definition: marker_base.h:152
SCH_SCREEN * GetFirst()
Class SCH_ITEM is a base class for any item which can be embedded within the SCHEMATIC container clas...
SCH_SCREEN * SCH_SCREENS::GetScreen ( unsigned int  aIndex) const

Definition at line 1276 of file sch_screen.cpp.

1277 {
1278  if( aIndex < m_screens.size() )
1279  return m_screens[ aIndex ];
1280 
1281  return NULL;
1282 }
std::vector< SCH_SCREEN * > m_screens
Definition: sch_screen.h:526
bool SCH_SCREENS::HasNoFullyDefinedLibIds ( )

Test all of the schematic symbols to see if all LIB_ID objects library nickname is not set.

If none of the LIB_ID object library nicknames are not set, this indicates that the project was created before the symbol library implementation.

Returns
true in there are any symbols and if all of the LIB_ID object library nicknames are empty, otherwise false.

Definition at line 1482 of file sch_screen.cpp.

References UTF8::empty(), SCH_SCREEN::GetDrawItems(), SCH_COMPONENT::GetLibId(), LIB_ID::GetLibNickname(), SCH_ITEM::Next(), SCH_COMPONENT_T, and EDA_ITEM::Type().

Referenced by SCH_EDIT_FRAME::EditSheet(), SCH_EDIT_FRAME::OnRescueProject(), SCH_EDIT_FRAME::OnUpdateRemapSymbols(), and SCH_EDIT_FRAME::OpenProjectFiles().

1483 {
1484  SCH_COMPONENT* symbol;
1485  SCH_ITEM* item;
1486  SCH_ITEM* nextItem;
1487  SCH_SCREEN* screen;
1488  unsigned cnt = 0;
1489 
1490  for( screen = GetFirst(); screen; screen = GetNext() )
1491  {
1492  for( item = screen->GetDrawItems(); item; item = nextItem )
1493  {
1494  nextItem = item->Next();
1495 
1496  if( item->Type() != SCH_COMPONENT_T )
1497  continue;
1498 
1499  cnt += 1;
1500  symbol = dynamic_cast< SCH_COMPONENT* >( item );
1501  wxASSERT( symbol );
1502 
1503  if( !symbol->GetLibId().GetLibNickname().empty() )
1504  return false;
1505  }
1506  }
1507 
1508  if( cnt == 0 )
1509  return false;
1510 
1511  return true;
1512 }
KICAD_T Type() const
Function Type()
Definition: base_struct.h:201
SCH_SCREEN * GetNext()
SCH_ITEM * Next() const
bool empty() const
Definition: utf8.h:108
SCH_ITEM * GetDrawItems() const
Definition: sch_screen.h:160
Class SCH_COMPONENT describes a real schematic component.
Definition: sch_component.h:69
const LIB_ID & GetLibId() const
SCH_SCREEN * GetFirst()
const UTF8 & GetLibNickname() const
Return the logical library name portion of a LIB_ID.
Definition: lib_id.h:97
Class SCH_ITEM is a base class for any item which can be embedded within the SCHEMATIC container clas...
int SCH_SCREENS::ReplaceDuplicateTimeStamps ( )

Test all sheet and component objects in the schematic for duplicate time stamps and replaces them as necessary.

Time stamps must be unique in order for complex hierarchies know which components go to which sheets.

Returns
The number of duplicate time stamps replaced.

Definition at line 1370 of file sch_screen.cpp.

References SCH_SCREEN::GetHierarchicalItems(), GetNewTimeStamp(), EDA_ITEM::GetTimeStamp(), i, SCH_COMPONENT_T, EDA_ITEM::SetTimeStamp(), SortByTimeStamp(), and EDA_ITEM::Type().

Referenced by SCH_EDIT_FRAME::AnnotateComponents(), and SCH_EDIT_FRAME::AppendSchematic().

1371 {
1372  EDA_ITEMS items;
1373  SCH_ITEM* item;
1374 
1375  for( size_t i = 0; i < m_screens.size(); i++ )
1376  m_screens[i]->GetHierarchicalItems( items );
1377 
1378  if( items.size() < 2 )
1379  return 0;
1380 
1381  sort( items.begin(), items.end(), SortByTimeStamp );
1382 
1383  int count = 0;
1384 
1385  for( size_t ii = 0; ii < items.size() - 1; ii++ )
1386  {
1387  item = (SCH_ITEM*)items[ii];
1388 
1389  SCH_ITEM* nextItem = (SCH_ITEM*)items[ii + 1];
1390 
1391  if( item->GetTimeStamp() == nextItem->GetTimeStamp() )
1392  {
1393  count++;
1394 
1395  // for a component, update its Time stamp and its paths
1396  // (m_PathsAndReferences field)
1397  if( item->Type() == SCH_COMPONENT_T )
1398  ( (SCH_COMPONENT*) item )->SetTimeStamp( GetNewTimeStamp() );
1399 
1400  // for a sheet, update only its time stamp (annotation of its
1401  // components will be lost)
1402  // @todo: see how to change sheet paths for its cmp list (can
1403  // be possible in most cases)
1404  else
1405  item->SetTimeStamp( GetNewTimeStamp() );
1406  }
1407  }
1408 
1409  return count;
1410 }
KICAD_T Type() const
Function Type()
Definition: base_struct.h:201
timestamp_t GetNewTimeStamp()
Definition: common.cpp:212
std::vector< EDA_ITEM * > EDA_ITEMS
Define list of drawing items for screens.
Definition: base_struct.h:550
std::vector< SCH_SCREEN * > m_screens
Definition: sch_screen.h:526
size_t i
Definition: json11.cpp:597
Class SCH_COMPONENT describes a real schematic component.
Definition: sch_component.h:69
static bool SortByTimeStamp(const EDA_ITEM *item1, const EDA_ITEM *item2)
Sort a list of schematic items by time stamp and type.
Class SCH_ITEM is a base class for any item which can be embedded within the SCHEMATIC container clas...
timestamp_t GetTimeStamp() const
Definition: base_struct.h:207
void SetTimeStamp(timestamp_t aNewTimeStamp)
Definition: base_struct.h:206
void SCH_SCREENS::TestDanglingEnds ( )

Definition at line 1475 of file sch_screen.cpp.

Referenced by LIB_EDIT_FRAME::refreshSchematic().

1476 {
1477  for( SCH_SCREEN* screen = GetFirst(); screen; screen = GetNext() )
1478  screen->TestDanglingEnds();
1479 }
SCH_SCREEN * GetNext()
SCH_SCREEN * GetFirst()
void SCH_SCREENS::UpdateSymbolLinks ( bool  aForce = false)

Initialize or reinitialize the weak reference to the LIB_PART for each SCH_COMPONENT found in the full schematic.

It must be called from:

  • draw functions
  • when loading a schematic file
  • before creating a netlist (in case a library is modified)
  • whenever any of the libraries are modified.

Definition at line 1468 of file sch_screen.cpp.

Referenced by SCH_EDIT_FRAME::AppendSchematic(), SCH_EDIT_FRAME::CreateArchiveLibraryCacheFile(), SCH_EDIT_FRAME::CreateNetlist(), SCH_EDIT_FRAME::doUpdatePcb(), SCH_EDIT_FRAME::importFile(), SCH_EDIT_FRAME::OpenProjectFiles(), SCH_EDIT_FRAME::prepareForNetlist(), LIB_EDIT_FRAME::refreshSchematic(), DIALOG_SYMBOL_REMAP::remapSymbolsToLibTable(), DIALOG_EDIT_COMPONENTS_LIBID::revertChanges(), DIALOG_EDIT_COMPONENTS_LIBID::TransferDataFromWindow(), LEGACY_RESCUER::WriteRescueLibrary(), and SYMBOL_LIB_TABLE_RESCUER::WriteRescueLibrary().

1469 {
1470  for( SCH_SCREEN* screen = GetFirst(); screen; screen = GetNext() )
1471  screen->UpdateSymbolLinks( aForce );
1472 }
SCH_SCREEN * GetNext()
SCH_SCREEN * GetFirst()

Member Data Documentation

unsigned int SCH_SCREENS::m_index
private

Definition at line 527 of file sch_screen.h.

std::vector< SCH_SCREEN* > SCH_SCREENS::m_screens
private

Definition at line 526 of file sch_screen.h.


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