|
KiCad PCB EDA Suite
|
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 KIID & | GetTerminalPinA () const |
| const KIID & | GetTerminalPinB () const |
| const KIID_PATH & | GetTerminalPath (int aIdx) const |
| void | SetTerminalPaths (const KIID_PATH &aPathA, const KIID_PATH &aPathB) |
| bool | IsTerminal (const KIID &aPin, const KIID_PATH &aSheet) const |
| 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::COLOR4D & | GetColor () 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 wxString | MakeKey (const wxString &aName, uint32_t aComponent) |
| static bool | IsPersistableNet (const wxString &aNet) |
| Synthetic keys do not survive a reload, so only named nets are written out. | |
| static bool | IsValidName (const wxString &aName) |
Static Public Attributes | |
| static constexpr wxStringCharType | SYNTHETIC_NET_PREFIX [] = wxS( "__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] |
| KIID_PATH | m_terminalPaths [2] |
| wxString | m_terminalRef [2] |
| wxString | m_terminalPinNum [2] |
| wxString | m_netClass |
| KIGFX::COLOR4D | m_color = KIGFX::COLOR4D::UNSPECIFIED |
Friends | |
| void | swap (SCH_NETCHAIN &aLeft, SCH_NETCHAIN &aRight) noexcept |
A net chain is a collection of nets that are connected together through passive components.
Definition at line 35 of file sch_netchain.h.
|
inline |
Definition at line 50 of file sch_netchain.h.
Referenced by AbsorbSymbolsFrom(), and swap.
|
inline |
Definition at line 110 of file sch_netchain.h.
References m_symbols, and SCH_NETCHAIN().
|
inline |
Definition at line 87 of file sch_netchain.h.
References m_nets.
|
inline |
Definition at line 103 of file sch_netchain.h.
References m_symbols.
Referenced by SCH_CONNECTIVITY::NETCHAIN_MANAGER::refreshCommittedChainPayload().
|
inline |
Definition at line 117 of file sch_netchain.h.
References m_symbols.
Referenced by SCH_CONNECTIVITY::NETCHAIN_MANAGER::refreshCommittedChainPayload().
|
inline |
Definition at line 162 of file sch_netchain.h.
References m_color.
Referenced by BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), and SCH_IO_KICAD_SEXPR::Format().
|
inline |
Definition at line 73 of file sch_netchain.h.
References m_name.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), SCH_EDITOR_CONTROL::CreateNetChainBetweenPins(), SCH_IO_KICAD_SEXPR::Format(), SCH_CONNECTIVITY::NETCHAIN_MANAGER::rebuild(), SCH_CONNECTIVITY::NETCHAIN_MANAGER::refreshCommittedChainFromPotential(), SCH_CONNECTIVITY::NETCHAIN_MANAGER::refreshCommittedChainPayload(), and SCH_CONNECTIVITY::NETCHAIN_MANAGER::storeTerminalRefs().
|
inline |
Definition at line 153 of file sch_netchain.h.
References m_netClass.
Referenced by BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), and SCH_IO_KICAD_SEXPR::Format().
|
inline |
Definition at line 122 of file sch_netchain.h.
References m_nets.
Referenced by BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), SCH_EDITOR_CONTROL::CreateNetChainBetweenPins(), SCH_CONNECTIVITY::NETCHAIN_MANAGER::CreateNetChainFromPotential(), SCH_IO_KICAD_SEXPR::Format(), SCH_CONNECTIVITY::NETCHAIN_MANAGER::GetBridgeSymbols(), SCH_CONNECTIVITY::NETCHAIN_MANAGER::rebuild(), and SCH_CONNECTIVITY::NETCHAIN_MANAGER::refreshCommittedChainFromPotential().
|
inline |
Definition at line 108 of file sch_netchain.h.
References m_symbols.
Referenced by BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), SCH_CONNECTIVITY::NETCHAIN_MANAGER::CreateNetChainFromPotential(), SCH_CONNECTIVITY::NETCHAIN_MANAGER::rebuild(), SCH_CONNECTIVITY::NETCHAIN_MANAGER::refreshCommittedChainFromPotential(), SCH_CONNECTIVITY::NETCHAIN_MANAGER::refreshCommittedChainPayload(), and SCH_CONNECTIVITY::NETCHAIN_MANAGER::RenameCommittedNetChain().
|
inline |
Definition at line 133 of file sch_netchain.h.
References m_terminalPaths.
Referenced by SCH_CONNECTIVITY::NETCHAIN_MANAGER::CreateNetChainFromPotential(), SCH_CONNECTIVITY::NETCHAIN_MANAGER::ReplaceNetChainTerminalPin(), and SCH_CONNECTIVITY::NETCHAIN_MANAGER::resolveTerminals().
|
inline |
Definition at line 130 of file sch_netchain.h.
References m_terminalPins.
Referenced by BOOST_FIXTURE_TEST_CASE(), SCH_CONNECTIVITY::NETCHAIN_MANAGER::CreateNetChainFromPotential(), SCH_CONNECTIVITY::NETCHAIN_MANAGER::ReplaceNetChainTerminalPin(), and SCH_CONNECTIVITY::NETCHAIN_MANAGER::resolveTerminals().
|
inline |
Definition at line 131 of file sch_netchain.h.
References m_terminalPins.
Referenced by BOOST_FIXTURE_TEST_CASE(), SCH_CONNECTIVITY::NETCHAIN_MANAGER::CreateNetChainFromPotential(), SCH_CONNECTIVITY::NETCHAIN_MANAGER::ReplaceNetChainTerminalPin(), and SCH_CONNECTIVITY::NETCHAIN_MANAGER::resolveTerminals().
|
inline |
Definition at line 178 of file sch_netchain.h.
References m_terminalPinNum.
Referenced by BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), SCH_CONNECTIVITY::NETCHAIN_MANAGER::CreateNetChainFromPotential(), SCH_IO_KICAD_SEXPR::Format(), and SCH_CONNECTIVITY::NETCHAIN_MANAGER::storeTerminalRefs().
|
inline |
Definition at line 172 of file sch_netchain.h.
References m_terminalRef.
Referenced by BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), SCH_CONNECTIVITY::NETCHAIN_MANAGER::CreateNetChainFromPotential(), DIALOG_CREATE_NET_CHAIN::findSheetForRow(), SCH_IO_KICAD_SEXPR::Format(), and SCH_CONNECTIVITY::NETCHAIN_MANAGER::storeTerminalRefs().
|
inlinestatic |
Synthetic keys do not survive a reload, so only named nets are written out.
Definition at line 45 of file sch_netchain.h.
References SYNTHETIC_NET_PREFIX.
Referenced by SCH_IO_KICAD_SEXPR::Format(), NETLIST_EXPORTER_XML::makeNetChains(), and SCH_CONNECTIVITY::NETCHAIN_MANAGER::storeMemberNets().
Definition at line 141 of file sch_netchain.h.
References m_terminalPaths, and m_terminalPins.
Referenced by KIGFX::SCH_PAINTER::draw().
|
inlinestatic |
Definition at line 75 of file sch_netchain.h.
Referenced by SCH_CONNECTIVITY::NETCHAIN_MANAGER::CreateManualNetChain(), SCH_EDITOR_CONTROL::CreateNetChainBetweenPins(), SCH_EDITOR_CONTROL::NameNetChain(), PANEL_SETUP_NET_CHAINS::PANEL_SETUP_NET_CHAINS(), SCH_CONNECTIVITY::NETCHAIN_MANAGER::RenameCommittedNetChain(), PANEL_SETUP_NET_CHAINS::Validate(), and DIALOG_CREATE_NET_CHAIN::validateAndCreate().
|
static |
Definition at line 23 of file sch_netchain.cpp.
References SYNTHETIC_NET_PREFIX.
Referenced by SCH_CONNECTIVITY::NETCHAIN_MANAGER::NetKeyForItem(), and CONNECTION_GRAPH::RebuildNetChains().
|
inline |
Definition at line 92 of file sch_netchain.h.
References m_nets.
|
inline |
Definition at line 97 of file sch_netchain.h.
References m_nets.
Referenced by SCH_CONNECTIVITY::NETCHAIN_MANAGER::refreshCommittedChainPayload().
|
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 161 of file sch_netchain.h.
References m_color.
Referenced by BOOST_FIXTURE_TEST_CASE().
|
inline |
Definition at line 72 of file sch_netchain.h.
References m_name.
Referenced by SCH_CONNECTIVITY::NETCHAIN_MANAGER::RenameCommittedNetChain().
|
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 152 of file sch_netchain.h.
References m_netClass.
Referenced by BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), and BOOST_FIXTURE_TEST_CASE().
Definition at line 135 of file sch_netchain.h.
References m_terminalPaths.
Referenced by SCH_CONNECTIVITY::NETCHAIN_MANAGER::ReplaceNetChainTerminalPin(), and SCH_CONNECTIVITY::NETCHAIN_MANAGER::resolveTerminals().
Definition at line 124 of file sch_netchain.h.
References m_terminalPins.
Referenced by SCH_CONNECTIVITY::NETCHAIN_MANAGER::ReplaceNetChainTerminalPin(), and SCH_CONNECTIVITY::NETCHAIN_MANAGER::resolveTerminals().
|
inline |
Definition at line 164 of file sch_netchain.h.
References m_terminalPinNum, and m_terminalRef.
Referenced by SCH_CONNECTIVITY::NETCHAIN_MANAGER::resolveTerminals().
|
friend |
Definition at line 52 of file sch_netchain.h.
References SCH_NETCHAIN(), swap, and T.
|
private |
Definition at line 193 of file sch_netchain.h.
Referenced by GetColor(), and SetColor().
|
private |
Definition at line 185 of file sch_netchain.h.
|
private |
Definition at line 192 of file sch_netchain.h.
Referenced by GetNetClass(), and SetNetClass().
|
private |
Definition at line 186 of file sch_netchain.h.
Referenced by AddNet(), GetNets(), RemoveNet(), and ReplaceNets().
|
private |
Definition at line 187 of file sch_netchain.h.
Referenced by AbsorbSymbolsFrom(), AddSymbol(), ClearSymbols(), and GetSymbols().
|
private |
Definition at line 189 of file sch_netchain.h.
Referenced by GetTerminalPath(), IsTerminal(), and SetTerminalPaths().
|
private |
Definition at line 191 of file sch_netchain.h.
Referenced by GetTerminalPinNum(), and SetTerminalRefs().
|
private |
Definition at line 188 of file sch_netchain.h.
Referenced by GetTerminalPinA(), GetTerminalPinB(), IsTerminal(), and SetTerminalPins().
|
private |
Definition at line 190 of file sch_netchain.h.
Referenced by GetTerminalRef(), and SetTerminalRefs().
|
staticconstexpr |
Prefix used when synthesising net names for unnamed subgraphs.
Such names embed a per-run component identity and so are not stable across reloads.
Definition at line 40 of file sch_netchain.h.
Referenced by SCH_CONNECTIVITY::NETCHAIN_MANAGER::ApplyNetChainNetclasses(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), IsPersistableNet(), and MakeKey().