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
 

Functions

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

Function Documentation

◆ CollectOtherUnits()

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

Definition at line 236 of file ee_collectors.cpp.

238 {
239  SCH_REFERENCE_LIST symbols;
240  aSheet.GetSymbols( symbols );
241 
242  for( unsigned i = 0; i < symbols.GetCount(); i++ )
243  {
244  SCH_REFERENCE symbol = symbols[i];
245 
246  if( symbol.GetRef() == aRef && symbol.GetSymbol()->GetLibId() == aLibId
247  && symbol.GetUnit() != aUnit )
248  otherUnits->push_back( symbol.GetSymbol() );
249  }
250 }
int GetUnit() const
SCH_SYMBOL * GetSymbol() const
Container to create a flattened list of symbols because in a complex hierarchy, a symbol can be used ...
wxString GetRef() const
size_t GetCount() const
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.
A helper to define a symbol's reference designator in a schematic.
const LIB_ID & GetLibId() const
Definition: sch_symbol.h:147

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

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