KiCad PCB EDA Suite
Loading...
Searching...
No Matches
COMPONENT Class Reference

Store all of the related footprint information found in a netlist. More...

#include <pcb_netlist.h>

Public Member Functions

 COMPONENT (const LIB_ID &aFPID, const wxString &aReference, const wxString &aValue, const KIID_PATH &aPath, const std::vector< KIID > &aKiids)
 
virtual ~COMPONENT ()
 
void AddNet (const wxString &aPinName, const wxString &aNetName, const wxString &aPinFunction, const wxString &aPinType)
 
unsigned GetNetCount () const
 
const COMPONENT_NETGetNet (unsigned aIndex) const
 
const COMPONENT_NETGetNet (const wxString &aPinName) const
 
void ClearNets ()
 
void SortPins ()
 
void SetName (const wxString &aName)
 
const wxString & GetName () const
 
void SetLibrary (const wxString &aLibrary)
 
const wxString & GetLibrary () const
 
void SetReference (const wxString &aReference)
 
const wxString & GetReference () const
 
void SetValue (const wxString &aValue)
 
const wxString & GetValue () const
 
void SetFields (nlohmann::ordered_map< wxString, wxString > &aFields)
 
const nlohmann::ordered_map< wxString, wxString > & GetFields () const
 
void SetProperties (std::map< wxString, wxString > &aProps)
 
const std::map< wxString, wxString > & GetProperties () const
 
void SetFPID (const LIB_ID &aFPID)
 
const LIB_IDGetFPID () const
 
void SetAltFPID (const LIB_ID &aFPID)
 
const LIB_IDGetAltFPID () const
 
const KIID_PATHGetPath () const
 
const std::vector< KIID > & GetKIIDs () const
 
void SetFootprintFilters (const wxArrayString &aFilters)
 
const wxArrayString & GetFootprintFilters () const
 
void SetPinCount (int aPinCount)
 
int GetPinCount () const
 
FOOTPRINTGetFootprint (bool aRelease=false)
 
void SetFootprint (FOOTPRINT *aFootprint)
 
bool IsLibSource (const wxString &aLibrary, const wxString &aName) const
 
void Format (OUTPUTFORMATTER *aOut, int aNestLevel, int aCtl)
 

Private Attributes

std::vector< COMPONENT_NETm_nets
 list of nets shared by the component pins More...
 
wxArrayString m_footprintFilters
 
int m_pinCount
 
wxString m_reference
 
wxString m_value
 
KIID_PATH m_path
 A fully specified path to the component (but not the component: [ sheetUUID, sheetUUID, .. ]. More...
 
std::vector< KIIDm_kiids
 A vector of possible KIIDs corresponding to all units in a symbol. More...
 
wxString m_name
 The name of the component in m_library used when it was placed on the schematic. More...
 
wxString m_library
 The name of the component library where m_name was found. More...
 
LIB_ID m_fpid
 The LIB_ID of the footprint assigned to the component. More...
 
LIB_ID m_altFpid
 The alt LIB_ID of the footprint, when there are 2 different assigned footprints, One from the netlist, the other from the .cmp file. More...
 
std::unique_ptr< FOOTPRINTm_footprint
 The FOOTPRINT loaded for #m_FPID. More...
 
std::map< wxString, wxString > m_properties
 Component-specific properties found in the netlist. More...
 
nlohmann::ordered_map< wxString, wxString > m_fields
 Component-specific user fields found in the netlist. More...
 

Static Private Attributes

static COMPONENT_NET m_emptyNet
 

Detailed Description

Store all of the related footprint information found in a netlist.

Definition at line 85 of file pcb_netlist.h.

Constructor & Destructor Documentation

◆ COMPONENT()

COMPONENT::COMPONENT ( const LIB_ID aFPID,
const wxString &  aReference,
const wxString &  aValue,
const KIID_PATH aPath,
const std::vector< KIID > &  aKiids 
)
inline

Definition at line 88 of file pcb_netlist.h.

References m_fpid, m_kiids, m_path, m_pinCount, m_reference, and m_value.

◆ ~COMPONENT()

virtual COMPONENT::~COMPONENT ( )
inlinevirtual

Definition at line 102 of file pcb_netlist.h.

Member Function Documentation

◆ AddNet()

void COMPONENT::AddNet ( const wxString &  aPinName,
const wxString &  aNetName,
const wxString &  aPinFunction,
const wxString &  aPinType 
)
inline

◆ ClearNets()

void COMPONENT::ClearNets ( )
inline

Definition at line 116 of file pcb_netlist.h.

References m_nets.

◆ Format()

◆ GetAltFPID()

const LIB_ID & COMPONENT::GetAltFPID ( ) const
inline

Definition at line 148 of file pcb_netlist.h.

References m_altFpid.

Referenced by CVPCB_MAINFRAME::readNetListAndFpFiles().

◆ GetFields()

const nlohmann::ordered_map< wxString, wxString > & COMPONENT::GetFields ( ) const
inline

Definition at line 136 of file pcb_netlist.h.

References m_fields.

Referenced by BOARD_NETLIST_UPDATER::updateFootprintParameters().

◆ GetFootprint()

FOOTPRINT * COMPONENT::GetFootprint ( bool  aRelease = false)
inline

Definition at line 160 of file pcb_netlist.h.

References m_footprint.

◆ GetFootprintFilters()

const wxArrayString & COMPONENT::GetFootprintFilters ( ) const
inline

◆ GetFPID()

◆ GetKIIDs()

◆ GetLibrary()

const wxString & COMPONENT::GetLibrary ( ) const
inline

Definition at line 124 of file pcb_netlist.h.

References m_library.

◆ GetName()

const wxString & COMPONENT::GetName ( ) const
inline

Definition at line 121 of file pcb_netlist.h.

References m_name.

◆ GetNet() [1/2]

const COMPONENT_NET & COMPONENT::GetNet ( const wxString &  aPinName) const

Definition at line 61 of file pcb_netlist.cpp.

References m_emptyNet, and m_nets.

◆ GetNet() [2/2]

◆ GetNetCount()

◆ GetPath()

◆ GetPinCount()

int COMPONENT::GetPinCount ( ) const
inline

Definition at line 158 of file pcb_netlist.h.

References m_pinCount.

Referenced by CVPCB_MAINFRAME::DisplayStatus(), and FOOTPRINTS_LISTBOX::SetFootprints().

◆ GetProperties()

const std::map< wxString, wxString > & COMPONENT::GetProperties ( ) const
inline

◆ GetReference()

◆ GetValue()

◆ IsLibSource()

bool COMPONENT::IsLibSource ( const wxString &  aLibrary,
const wxString &  aName 
) const
inline

Definition at line 167 of file pcb_netlist.h.

References m_library, and m_name.

Referenced by KICAD_NETLIST_PARSER::parseLibPartList().

◆ SetAltFPID()

void COMPONENT::SetAltFPID ( const LIB_ID aFPID)
inline

Definition at line 147 of file pcb_netlist.h.

References m_altFpid.

Referenced by CMP_READER::Load().

◆ SetFields()

void COMPONENT::SetFields ( nlohmann::ordered_map< wxString, wxString > &  aFields)
inline

◆ SetFootprint()

void COMPONENT::SetFootprint ( FOOTPRINT aFootprint)

◆ SetFootprintFilters()

void COMPONENT::SetFootprintFilters ( const wxArrayString &  aFilters)
inline

◆ SetFPID()

void COMPONENT::SetFPID ( const LIB_ID aFPID)
inline

◆ SetLibrary()

void COMPONENT::SetLibrary ( const wxString &  aLibrary)
inline

Definition at line 123 of file pcb_netlist.h.

References m_library.

Referenced by KICAD_NETLIST_PARSER::parseComponent().

◆ SetName()

void COMPONENT::SetName ( const wxString &  aName)
inline

Definition at line 120 of file pcb_netlist.h.

References m_name.

Referenced by LEGACY_NETLIST_READER::loadComponent(), and KICAD_NETLIST_PARSER::parseComponent().

◆ SetPinCount()

void COMPONENT::SetPinCount ( int  aPinCount)
inline

Definition at line 157 of file pcb_netlist.h.

References m_pinCount.

Referenced by KICAD_NETLIST_PARSER::parseLibPartList().

◆ SetProperties()

void COMPONENT::SetProperties ( std::map< wxString, wxString > &  aProps)
inline

Definition at line 138 of file pcb_netlist.h.

References m_properties.

Referenced by PCB_EDIT_FRAME::KiwayMailIn(), and KICAD_NETLIST_PARSER::parseComponent().

◆ SetReference()

void COMPONENT::SetReference ( const wxString &  aReference)
inline

Definition at line 126 of file pcb_netlist.h.

References m_reference.

◆ SetValue()

void COMPONENT::SetValue ( const wxString &  aValue)
inline

Definition at line 129 of file pcb_netlist.h.

References m_value.

◆ SortPins()

void COMPONENT::SortPins ( )
inline

Definition at line 118 of file pcb_netlist.h.

References m_nets.

Referenced by KICAD_NETLIST_READER::LoadNetlist().

Member Data Documentation

◆ m_altFpid

LIB_ID COMPONENT::m_altFpid
private

The alt LIB_ID of the footprint, when there are 2 different assigned footprints, One from the netlist, the other from the .cmp file.

this one is a copy of the netlist footprint assignment

Definition at line 200 of file pcb_netlist.h.

Referenced by GetAltFPID(), and SetAltFPID().

◆ m_emptyNet

COMPONENT_NET COMPONENT::m_emptyNet
staticprivate

Definition at line 211 of file pcb_netlist.h.

Referenced by GetNet().

◆ m_fields

nlohmann::ordered_map<wxString, wxString> COMPONENT::m_fields
private

Component-specific user fields found in the netlist.

Definition at line 209 of file pcb_netlist.h.

Referenced by Format(), GetFields(), and SetFields().

◆ m_footprint

std::unique_ptr<FOOTPRINT> COMPONENT::m_footprint
private

The FOOTPRINT loaded for #m_FPID.

Definition at line 203 of file pcb_netlist.h.

Referenced by GetFootprint(), and SetFootprint().

◆ m_footprintFilters

wxArrayString COMPONENT::m_footprintFilters
private

Definition at line 177 of file pcb_netlist.h.

Referenced by Format(), GetFootprintFilters(), and SetFootprintFilters().

◆ m_fpid

LIB_ID COMPONENT::m_fpid
private

The LIB_ID of the footprint assigned to the component.

Definition at line 195 of file pcb_netlist.h.

Referenced by COMPONENT(), Format(), GetFPID(), SetFootprint(), and SetFPID().

◆ m_kiids

std::vector<KIID> COMPONENT::m_kiids
private

A vector of possible KIIDs corresponding to all units in a symbol.

Definition at line 186 of file pcb_netlist.h.

Referenced by COMPONENT(), Format(), GetKIIDs(), and SetFootprint().

◆ m_library

wxString COMPONENT::m_library
private

The name of the component library where m_name was found.

Definition at line 192 of file pcb_netlist.h.

Referenced by Format(), GetLibrary(), IsLibSource(), and SetLibrary().

◆ m_name

wxString COMPONENT::m_name
private

The name of the component in m_library used when it was placed on the schematic.

Definition at line 189 of file pcb_netlist.h.

Referenced by Format(), GetName(), IsLibSource(), and SetName().

◆ m_nets

std::vector<COMPONENT_NET> COMPONENT::m_nets
private

list of nets shared by the component pins

Definition at line 175 of file pcb_netlist.h.

Referenced by AddNet(), ClearNets(), Format(), GetNet(), GetNetCount(), and SortPins().

◆ m_path

KIID_PATH COMPONENT::m_path
private

A fully specified path to the component (but not the component: [ sheetUUID, sheetUUID, .. ].

Definition at line 183 of file pcb_netlist.h.

Referenced by COMPONENT(), Format(), GetPath(), and SetFootprint().

◆ m_pinCount

int COMPONENT::m_pinCount
private

Definition at line 178 of file pcb_netlist.h.

Referenced by COMPONENT(), GetPinCount(), and SetPinCount().

◆ m_properties

std::map<wxString, wxString> COMPONENT::m_properties
private

Component-specific properties found in the netlist.

Definition at line 206 of file pcb_netlist.h.

Referenced by Format(), GetProperties(), and SetProperties().

◆ m_reference

wxString COMPONENT::m_reference
private

Definition at line 179 of file pcb_netlist.h.

Referenced by COMPONENT(), Format(), GetReference(), SetFootprint(), and SetReference().

◆ m_value

wxString COMPONENT::m_value
private

Definition at line 180 of file pcb_netlist.h.

Referenced by COMPONENT(), Format(), GetValue(), SetFootprint(), and SetValue().


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