KiCad PCB EDA Suite
ee_collectors.h File Reference
#include <lib_symbol.h>
#include <collector.h>
#include <dialogs/dialog_schematic_find.h>
#include <sch_item.h>

Go to the source code of this file.

Classes

class  EE_COLLECTOR
 EE_COLLECTOR. More...
 

Functions

void CollectOtherUnits (const wxString &thisRef, int thisUnit, SCH_SHEET_PATH &aSheet, std::vector< SCH_COMPONENT * > *otherUnits)
 

Function Documentation

◆ CollectOtherUnits()

void CollectOtherUnits ( const wxString &  thisRef,
int  thisUnit,
SCH_SHEET_PATH aSheet,
std::vector< SCH_COMPONENT * > *  otherUnits 
)

Definition at line 234 of file ee_collectors.cpp.

236 {
237  SCH_REFERENCE_LIST components;
238  aSheet.GetSymbols( components );
239 
240  for( unsigned i = 0; i < components.GetCount(); i++ )
241  {
242  SCH_REFERENCE component = components[i];
243 
244  if( component.GetRef() == aRef && component.GetUnit() != aUnit )
245  otherUnits->push_back( component.GetSymbol() );
246  }
247 }
int GetUnit() const
Container to create a flattened list of symbols because in a complex hierarchy, a symbol can be used ...
wxString GetRef() const
SCH_COMPONENT * GetSymbol() const
unsigned GetCount() const
A helper to define a symbol's reference designator in a schematic.
void GetSymbols(SCH_REFERENCE_LIST &aReferences, bool aIncludePowerSymbols=true, bool aForceIncludeOrphanComponents=false) const
Adds SCH_REFERENCE object to aReferences for each component in the sheet.

References SCH_REFERENCE_LIST::GetCount(), SCH_REFERENCE::GetRef(), SCH_REFERENCE::GetSymbol(), SCH_SHEET_PATH::GetSymbols(), and SCH_REFERENCE::GetUnit().

Referenced by DIALOG_SYMBOL_PROPERTIES::TransferDataFromWindow(), and DIALOG_SCH_EDIT_ONE_FIELD::UpdateField().