KiCad PCB EDA Suite
COMPONENT_NET Class Reference

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 &aPinType)
 
const wxString & GetPinName () const
 
const wxString & GetNetName () const
 
const wxString & GetPinFunction () const
 
const wxString & GetPinType () 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
 
wxString m_pinType
 

Detailed Description

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

Definition at line 43 of file pcb_netlist.h.

Constructor & Destructor Documentation

◆ COMPONENT_NET() [1/2]

COMPONENT_NET::COMPONENT_NET ( )
inline

Definition at line 46 of file pcb_netlist.h.

46 {}

◆ COMPONENT_NET() [2/2]

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

Definition at line 48 of file pcb_netlist.h.

49  :
50  m_pinName( aPinName ),
51  m_netName( aNetName ),
52  m_pinFunction( aPinFunction ),
53  m_pinType( aPinType )
54  {
55  }
wxString m_netName
Definition: pcb_netlist.h:73
wxString m_pinFunction
Definition: pcb_netlist.h:74
wxString m_pinType
Definition: pcb_netlist.h:75
wxString m_pinName
Definition: pcb_netlist.h:72

Member Function Documentation

◆ Format()

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

Definition at line 32 of file pcb_netlist.cpp.

33 {
34  return aOut->Print( aNestLevel, "(pin_net %s %s)",
35  aOut->Quotew( m_pinName ).c_str(),
36  aOut->Quotew( m_netName ).c_str() );
37 }
wxString m_netName
Definition: pcb_netlist.h:73
int PRINTF_FUNC Print(int nestLevel, const char *fmt,...)
Format and write text to the output stream.
Definition: richio.cpp:426
wxString m_pinName
Definition: pcb_netlist.h:72
std::string Quotew(const wxString &aWrapee) const
Definition: richio.cpp:494

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 59 of file pcb_netlist.h.

59 { return m_pinFunction; }
wxString m_pinFunction
Definition: pcb_netlist.h:74

References m_pinFunction.

Referenced by BOARD_NETLIST_UPDATER::updateComponentPadConnections().

◆ GetPinName()

const wxString& COMPONENT_NET::GetPinName ( ) const
inline

◆ GetPinType()

const wxString& COMPONENT_NET::GetPinType ( ) const
inline

Definition at line 60 of file pcb_netlist.h.

60 { return m_pinType; }
wxString m_pinType
Definition: pcb_netlist.h:75

References m_pinType.

Referenced by BOARD_NETLIST_UPDATER::updateComponentPadConnections().

◆ IsValid()

bool COMPONENT_NET::IsValid ( ) const
inline

Definition at line 62 of file pcb_netlist.h.

62 { return !m_pinName.IsEmpty(); }
wxString m_pinName
Definition: pcb_netlist.h:72

References m_pinName.

Referenced by BOARD_NETLIST_UPDATER::updateComponentPadConnections().

◆ operator<()

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

Definition at line 64 of file pcb_netlist.h.

65  {
66  return m_pinName < aNet.m_pinName;
67  }
wxString m_pinName
Definition: pcb_netlist.h:72

References m_pinName.

Member Data Documentation

◆ m_netName

wxString COMPONENT_NET::m_netName
private

Definition at line 73 of file pcb_netlist.h.

Referenced by Format(), and GetNetName().

◆ m_pinFunction

wxString COMPONENT_NET::m_pinFunction
private

Definition at line 74 of file pcb_netlist.h.

Referenced by GetPinFunction().

◆ m_pinName

wxString COMPONENT_NET::m_pinName
private

Definition at line 72 of file pcb_netlist.h.

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

◆ m_pinType

wxString COMPONENT_NET::m_pinType
private

Definition at line 75 of file pcb_netlist.h.

Referenced by GetPinType().


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