KiCad PCB EDA Suite
COMPONENT_NET Class Reference

COMPONENT_NET is used to store the component pin name to net name (and pin function) associations stored in a netlist. More...

#include <pcb_netlist.h>

Public Member Functions

 COMPONENT_NET ()
 
 COMPONENT_NET (const wxString &aPinName, const wxString &aNetName, const wxString &aPinFunction)
 
const wxString & GetPinName () const
 
const wxString & GetNetName () const
 
const wxString & GetPinFunction () const
 
bool IsValid () const
 
bool operator< (const COMPONENT_NET &aNet) const
 
int Format (OUTPUTFORMATTER *aOut, int aNestLevel, int aCtl)
 

Private Attributes

wxString m_pinName
 
wxString m_netName
 
wxString m_pinFunction
 

Detailed Description

COMPONENT_NET is used to store the component pin name to net name (and pin function) associations stored in a netlist.

Definition at line 49 of file pcb_netlist.h.

Constructor & Destructor Documentation

◆ COMPONENT_NET() [1/2]

COMPONENT_NET::COMPONENT_NET ( )
inline

Definition at line 56 of file pcb_netlist.h.

56 {}

◆ COMPONENT_NET() [2/2]

COMPONENT_NET::COMPONENT_NET ( const wxString &  aPinName,
const wxString &  aNetName,
const wxString &  aPinFunction 
)
inline

Definition at line 58 of file pcb_netlist.h.

59  :
60  m_pinName( aPinName ), m_netName( aNetName ), m_pinFunction( aPinFunction )
61  {
62  }
wxString m_netName
Definition: pcb_netlist.h:52
wxString m_pinFunction
Definition: pcb_netlist.h:53
wxString m_pinName
Definition: pcb_netlist.h:51

Member Function Documentation

◆ Format()

int COMPONENT_NET::Format ( OUTPUTFORMATTER aOut,
int  aNestLevel,
int  aCtl 
)

Definition at line 39 of file pcb_netlist.cpp.

40 {
41  return aOut->Print( aNestLevel, "(pin_net %s %s)",
42  aOut->Quotew( m_pinName ).c_str(),
43  aOut->Quotew( m_netName ).c_str() );
44 }
std::string Quotew(const wxString &aWrapee)
Definition: richio.cpp:472
wxString m_netName
Definition: pcb_netlist.h:52
int PRINTF_FUNC Print(int nestLevel, const char *fmt,...)
Function Print formats and writes text to the output stream.
Definition: richio.cpp:404
wxString m_pinName
Definition: pcb_netlist.h:51

References m_netName, m_pinName, OUTPUTFORMATTER::Print(), and OUTPUTFORMATTER::Quotew().

◆ GetNetName()

const wxString& COMPONENT_NET::GetNetName ( ) const
inline

◆ GetPinFunction()

const wxString& COMPONENT_NET::GetPinFunction ( ) const
inline

Definition at line 66 of file pcb_netlist.h.

66 { return m_pinFunction; }
wxString m_pinFunction
Definition: pcb_netlist.h:53

References m_pinFunction.

Referenced by BOARD_NETLIST_UPDATER::updateComponentPadConnections().

◆ GetPinName()

const wxString& COMPONENT_NET::GetPinName ( ) const
inline

Definition at line 64 of file pcb_netlist.h.

64 { return m_pinName; }
wxString m_pinName
Definition: pcb_netlist.h:51

References m_pinName.

Referenced by BOARD_NETLIST_UPDATER::testConnectivity().

◆ IsValid()

bool COMPONENT_NET::IsValid ( ) const
inline

Definition at line 68 of file pcb_netlist.h.

68 { return !m_pinName.IsEmpty(); }
wxString m_pinName
Definition: pcb_netlist.h:51

References m_pinName.

Referenced by BOARD_NETLIST_UPDATER::updateComponentPadConnections().

◆ operator<()

bool COMPONENT_NET::operator< ( const COMPONENT_NET aNet) const
inline

Definition at line 70 of file pcb_netlist.h.

71  {
72  return m_pinName < aNet.m_pinName;
73  }
wxString m_pinName
Definition: pcb_netlist.h:51

References m_pinName.

Member Data Documentation

◆ m_netName

wxString COMPONENT_NET::m_netName
private

Definition at line 52 of file pcb_netlist.h.

Referenced by Format(), and GetNetName().

◆ m_pinFunction

wxString COMPONENT_NET::m_pinFunction
private

Definition at line 53 of file pcb_netlist.h.

Referenced by GetPinFunction().

◆ m_pinName

wxString COMPONENT_NET::m_pinName
private

Definition at line 51 of file pcb_netlist.h.

Referenced by Format(), GetPinName(), IsValid(), and operator<().


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