KiCad PCB EDA Suite
COMPONENT_NET Class Reference

Class COMPONENT_NET is used to store the component pin name to net name 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 & GetPinName () const
 
const wxString & GetNetName () 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
 

Detailed Description

Class COMPONENT_NET is used to store the component pin name to net name associations stored in a netlist.

Definition at line 48 of file pcb_netlist.h.

Constructor & Destructor Documentation

COMPONENT_NET::COMPONENT_NET ( )
inline

Definition at line 54 of file pcb_netlist.h.

54 {}
COMPONENT_NET::COMPONENT_NET ( const wxString &  aPinName,
const wxString &  aNetName 
)
inline

Definition at line 56 of file pcb_netlist.h.

56  :
57  m_pinName( aPinName ), m_netName( aNetName )
58  {
59  }
wxString m_netName
Definition: pcb_netlist.h:51
wxString m_pinName
Definition: pcb_netlist.h:50

Member Function Documentation

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

Definition at line 39 of file pcb_netlist.cpp.

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

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:482
wxString m_netName
Definition: pcb_netlist.h:51
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:50
const wxString& COMPONENT_NET::GetNetName ( ) const
inline

Definition at line 63 of file pcb_netlist.h.

References m_netName.

Referenced by BOARD::ReplaceNetlist(), and BOARD_NETLIST_UPDATER::updateComponentPadConnections().

63 { return m_netName; }
wxString m_netName
Definition: pcb_netlist.h:51
const wxString& COMPONENT_NET::GetPinName ( ) const
inline

Definition at line 61 of file pcb_netlist.h.

References m_pinName.

Referenced by BOARD::ReplaceNetlist(), and BOARD_NETLIST_UPDATER::testConnectivity().

61 { return m_pinName; }
wxString m_pinName
Definition: pcb_netlist.h:50
bool COMPONENT_NET::IsValid ( ) const
inline

Definition at line 65 of file pcb_netlist.h.

Referenced by BOARD::ReplaceNetlist(), and BOARD_NETLIST_UPDATER::updateComponentPadConnections().

65 { return !m_pinName.IsEmpty(); }
wxString m_pinName
Definition: pcb_netlist.h:50
bool COMPONENT_NET::operator< ( const COMPONENT_NET aNet) const
inline

Definition at line 67 of file pcb_netlist.h.

References m_pinName.

68  {
69  return m_pinName < aNet.m_pinName;
70  }
wxString m_pinName
Definition: pcb_netlist.h:50

Member Data Documentation

wxString COMPONENT_NET::m_netName
private

Definition at line 51 of file pcb_netlist.h.

Referenced by Format(), and GetNetName().

wxString COMPONENT_NET::m_pinName
private

Definition at line 50 of file pcb_netlist.h.

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


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