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

A net chain is a collection of nets that are connected together through passive components. More...

#include <sch_netchain.h>

Public Member Functions

 SCH_NETCHAIN ()
 
void SetName (const wxString &aName)
 
const wxString & GetName () const
 
void AddNet (const wxString &aNet)
 
void RemoveNet (const wxString &aNet)
 
void ReplaceNets (const std::set< wxString > &aNew)
 
void AddSymbol (class SCH_SYMBOL *aSymbol)
 
const std::set< class SCH_SYMBOL * > & GetSymbols () const
 
void AbsorbSymbolsFrom (const SCH_NETCHAIN &aOther)
 
void ClearSymbols ()
 
const std::set< wxString > & GetNets () const
 
void SetTerminalPins (const KIID &aPinA, const KIID &aPinB)
 
const KIIDGetTerminalPinA () const
 
const KIIDGetTerminalPinB () const
 
void ReplaceTerminalPin (const KIID &aPrev, const KIID &aNew)
 
void SetNetClass (const wxString &aNetClass)
 Net chains may override the netclass applied to every member net.
 
const wxString & GetNetClass () const
 
void SetColor (const KIGFX::COLOR4D &aColor)
 Optional display color for the chain.
 
const KIGFX::COLOR4DGetColor () const
 
void SetTerminalRefs (const wxString &aRefA, const wxString &aPinA, const wxString &aRefB, const wxString &aPinB)
 
const wxString & GetTerminalRef (int aIdx) const
 
const wxString & GetTerminalPinNum (int aIdx) const
 

Static Public Member Functions

static bool IsValidName (const wxString &aName)
 

Static Public Attributes

static constexpr char SYNTHETIC_NET_PREFIX [] = "__SG_"
 Prefix used when synthesising net names for unnamed subgraphs.
 

Private Attributes

wxString m_name
 
std::set< wxString > m_nets
 
std::set< class SCH_SYMBOL * > m_symbols
 
KIID m_terminalPins [2]
 
wxString m_terminalRef [2]
 
wxString m_terminalPinNum [2]
 
wxString m_netClass
 
KIGFX::COLOR4D m_color = KIGFX::COLOR4D::UNSPECIFIED
 

Detailed Description

A net chain is a collection of nets that are connected together through passive components.

Definition at line 33 of file sch_netchain.h.

Constructor & Destructor Documentation

◆ SCH_NETCHAIN()

SCH_NETCHAIN::SCH_NETCHAIN ( )
inline

Definition at line 40 of file sch_netchain.h.

Referenced by AbsorbSymbolsFrom().

Member Function Documentation

◆ AbsorbSymbolsFrom()

void SCH_NETCHAIN::AbsorbSymbolsFrom ( const SCH_NETCHAIN & aOther)
inline

Definition at line 64 of file sch_netchain.h.

References m_symbols, and SCH_NETCHAIN().

◆ AddNet()

void SCH_NETCHAIN::AddNet ( const wxString & aNet)
inline

Definition at line 57 of file sch_netchain.h.

References m_nets.

◆ AddSymbol()

void SCH_NETCHAIN::AddSymbol ( class SCH_SYMBOL * aSymbol)
inline

Definition at line 62 of file sch_netchain.h.

References m_symbols.

Referenced by CONNECTION_GRAPH::refreshCommittedChainPayload().

◆ ClearSymbols()

void SCH_NETCHAIN::ClearSymbols ( )
inline

Definition at line 71 of file sch_netchain.h.

References m_symbols.

Referenced by CONNECTION_GRAPH::refreshCommittedChainPayload().

◆ GetColor()

const KIGFX::COLOR4D & SCH_NETCHAIN::GetColor ( ) const
inline

◆ GetName()

◆ GetNetClass()

const wxString & SCH_NETCHAIN::GetNetClass ( ) const
inline

◆ GetNets()

◆ GetSymbols()

◆ GetTerminalPinA()

const KIID & SCH_NETCHAIN::GetTerminalPinA ( ) const
inline

◆ GetTerminalPinB()

const KIID & SCH_NETCHAIN::GetTerminalPinB ( ) const
inline

◆ GetTerminalPinNum()

◆ GetTerminalRef()

◆ IsValidName()

static bool SCH_NETCHAIN::IsValidName ( const wxString & aName)
inlinestatic

◆ RemoveNet()

void SCH_NETCHAIN::RemoveNet ( const wxString & aNet)
inline

Definition at line 58 of file sch_netchain.h.

References m_nets.

◆ ReplaceNets()

void SCH_NETCHAIN::ReplaceNets ( const std::set< wxString > & aNew)
inline

Definition at line 59 of file sch_netchain.h.

References m_nets.

Referenced by CONNECTION_GRAPH::refreshCommittedChainPayload().

◆ ReplaceTerminalPin()

void SCH_NETCHAIN::ReplaceTerminalPin ( const KIID & aPrev,
const KIID & aNew )
inline

Definition at line 84 of file sch_netchain.h.

References m_terminalPins.

◆ SetColor()

void SCH_NETCHAIN::SetColor ( const KIGFX::COLOR4D & aColor)
inline

Optional display color for the chain.

When set to an opaque colour, the PCB and schematic painters prefer it over the default chain highlight emphasis. UNSPECIFIED / fully-transparent means "use the default scheme".

Definition at line 106 of file sch_netchain.h.

References m_color.

Referenced by BOOST_FIXTURE_TEST_CASE().

◆ SetName()

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

Definition at line 42 of file sch_netchain.h.

References m_name.

Referenced by CONNECTION_GRAPH::RenameCommittedNetChain().

◆ SetNetClass()

void SCH_NETCHAIN::SetNetClass ( const wxString & aNetClass)
inline

Net chains may override the netclass applied to every member net.

Empty string means "do not override". The active netclass is propagated to every member when the PCB is updated from the netlist.

Definition at line 97 of file sch_netchain.h.

References m_netClass.

Referenced by BOOST_FIXTURE_TEST_CASE(), and BOOST_FIXTURE_TEST_CASE().

◆ SetTerminalPins()

void SCH_NETCHAIN::SetTerminalPins ( const KIID & aPinA,
const KIID & aPinB )
inline

Definition at line 75 of file sch_netchain.h.

References m_terminalPins.

Referenced by CONNECTION_GRAPH::refreshCommittedChainPayload().

◆ SetTerminalRefs()

void SCH_NETCHAIN::SetTerminalRefs ( const wxString & aRefA,
const wxString & aPinA,
const wxString & aRefB,
const wxString & aPinB )
inline

Definition at line 109 of file sch_netchain.h.

References m_terminalPinNum, and m_terminalRef.

Referenced by CONNECTION_GRAPH::refreshCommittedChainPayload().

Member Data Documentation

◆ m_color

KIGFX::COLOR4D SCH_NETCHAIN::m_color = KIGFX::COLOR4D::UNSPECIFIED
private

Definition at line 137 of file sch_netchain.h.

Referenced by GetColor(), and SetColor().

◆ m_name

wxString SCH_NETCHAIN::m_name
private

Definition at line 130 of file sch_netchain.h.

Referenced by GetName(), and SetName().

◆ m_netClass

wxString SCH_NETCHAIN::m_netClass
private

Definition at line 136 of file sch_netchain.h.

Referenced by GetNetClass(), and SetNetClass().

◆ m_nets

std::set<wxString> SCH_NETCHAIN::m_nets
private

Definition at line 131 of file sch_netchain.h.

Referenced by AddNet(), GetNets(), RemoveNet(), and ReplaceNets().

◆ m_symbols

std::set<class SCH_SYMBOL*> SCH_NETCHAIN::m_symbols
private

Definition at line 132 of file sch_netchain.h.

Referenced by AbsorbSymbolsFrom(), AddSymbol(), ClearSymbols(), and GetSymbols().

◆ m_terminalPinNum

wxString SCH_NETCHAIN::m_terminalPinNum[2]
private

Definition at line 135 of file sch_netchain.h.

Referenced by GetTerminalPinNum(), and SetTerminalRefs().

◆ m_terminalPins

KIID SCH_NETCHAIN::m_terminalPins[2]
private

◆ m_terminalRef

wxString SCH_NETCHAIN::m_terminalRef[2]
private

Definition at line 134 of file sch_netchain.h.

Referenced by GetTerminalRef(), and SetTerminalRefs().

◆ SYNTHETIC_NET_PREFIX

char SCH_NETCHAIN::SYNTHETIC_NET_PREFIX[] = "__SG_"
staticconstexpr

Prefix used when synthesising net names for unnamed subgraphs.

Such names embed the per-run subgraph code and so are not stable across reloads.

Definition at line 38 of file sch_netchain.h.

Referenced by BOOST_FIXTURE_TEST_CASE(), CONNECTION_GRAPH::CreateNetChainFromPotential(), SCH_IO_KICAD_SEXPR::Format(), NETLIST_EXPORTER_XML::makeNetChains(), and netChainKeyFor().


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