![]() |
KiCad PCB EDA Suite
|
Container for NETINFO_ITEM elements, which are the nets. More...
#include <netinfo.h>
Classes | |
class | iterator |
Public Member Functions | |
NETINFO_LIST (BOARD *aParent) | |
~NETINFO_LIST () | |
NETINFO_ITEM * | GetNetItem (int aNetCode) const |
NETINFO_ITEM * | GetNetItem (const wxString &aNetName) const |
unsigned | GetNetCount () const |
void | AppendNet (NETINFO_ITEM *aNewElement) |
Add aNewElement to the end of the net list. More... | |
void | RemoveNet (NETINFO_ITEM *aNet) |
Remove a net from the net list. More... | |
void | RemoveUnusedNets () |
const NETNAMES_MAP & | NetsByName () const |
Return the name map, at least for python. More... | |
const NETCODES_MAP & | NetsByNetcode () const |
Return the netcode map, at least for python. More... | |
iterator | begin () const |
iterator | end () const |
BOARD * | GetParent () const |
Static Public Member Functions | |
static NETINFO_ITEM * | OrphanedItem () |
Wrapper class, so you can iterate through NETINFO_ITEM*s, not std::pair<int/wxString, NETINFO_ITEM*> More... | |
Static Public Attributes | |
static const int | UNCONNECTED = 0 |
Constant that forces initialization of a netinfo item to the NETINFO_ITEM ORPHANED (typically -1) when calling SetNetCode on board connected items. More... | |
static const int | ORPHANED = -1 |
NETINFO_ITEM meaning that there was no net assigned for an item, as there was no board storing net list available. More... | |
Private Member Functions | |
void | clear () |
Delete the list of nets (and free memory). More... | |
void | buildListOfNets () |
Rebuild the list of NETINFO_ITEMs. More... | |
int | getFreeNetCode () |
Return the first available net code that is not used by any other net. More... | |
Private Attributes | |
BOARD * | m_parent |
NETNAMES_MAP | m_netNames |
map of <wxString, NETINFO_ITEM*>, is NETINFO_ITEM owner More... | |
NETCODES_MAP | m_netCodes |
map of <int, NETINFO_ITEM*> is NOT owner More... | |
int | m_newNetCode |
possible value for new net code assignment More... | |
Friends | |
class | BOARD |
Container for NETINFO_ITEM elements, which are the nets.
NETINFO_LIST::NETINFO_LIST | ( | BOARD * | aParent | ) |
Definition at line 33 of file netinfo_list.cpp.
References AppendNet(), and m_newNetCode.
NETINFO_LIST::~NETINFO_LIST | ( | ) |
Definition at line 43 of file netinfo_list.cpp.
References clear().
void NETINFO_LIST::AppendNet | ( | NETINFO_ITEM * | aNewElement | ) |
Add aNewElement to the end of the net list.
Negative net code means it is going to be auto-assigned.
Definition at line 125 of file netinfo_list.cpp.
References getFreeNetCode(), NETINFO_ITEM::GetNetCode(), GetNetItem(), NETINFO_ITEM::GetNetname(), NETINFO_ITEM::m_netCode, m_netCodes, m_netNames, and NULL.
Referenced by NET_SELECTOR_COMBOPOPUP::Accept(), BOARD::Add(), and NETINFO_LIST().
|
inline |
Definition at line 436 of file netinfo.h.
References m_netNames.
Referenced by BOARD::BeginNets(), DSN::SPECCTRA_DB::FromBOARD(), and TestForExistingItem().
|
private |
Rebuild the list of NETINFO_ITEMs.
The list is sorted by names.
Definition at line 153 of file netinfo_list.cpp.
References NETINFO_ITEM::Clear(), m_parent, BOARD::SetAreasNetCodesFromNetNames(), and BOARD::SynchronizeNetsAndNetClasses().
Referenced by BOARD::BuildListOfNets().
|
private |
Delete the list of nets (and free memory).
Definition at line 49 of file netinfo_list.cpp.
References m_netCodes, m_netNames, and m_newNetCode.
Referenced by ~NETINFO_LIST().
|
inline |
Definition at line 441 of file netinfo.h.
References m_netNames.
Referenced by BOARD::EndNets(), DSN::SPECCTRA_DB::FromBOARD(), and TestForExistingItem().
|
private |
Return the first available net code that is not used by any other net.
Definition at line 181 of file netinfo_list.cpp.
References m_netCodes, and m_newNetCode.
Referenced by AppendNet().
|
inline |
Definition at line 339 of file netinfo.h.
References m_netNames.
Referenced by extractAllDiffPairs(), BOARD::FindNet(), BOARD::GetMsgPanelInfo(), BOARD::GetNetCount(), FABMASTER::loadZones(), and BOARD::SortedNetnamesList().
NETINFO_ITEM * NETINFO_LIST::GetNetItem | ( | int | aNetCode | ) | const |
aNetCode | netcode to identify a given NETINFO_ITEM. |
Definition at line 61 of file netinfo_list.cpp.
References m_netCodes, and NULL.
Referenced by NET_SELECTOR_COMBOPOPUP::Accept(), AppendNet(), BOARD::FindNet(), NET_SELECTOR_COMBOPOPUP::GetSelectedNetname(), NET_SELECTOR_COMBOPOPUP::GetStringValue(), PCB_EDIT_FRAME::LoadProjectSettings(), APPEARANCE_CONTROLS::onNetclassContextMenu(), test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run(), DRC_TEST_PROVIDER_MATCHED_LENGTH::runInternal(), PCB_EDIT_FRAME::SaveProjectSettings(), NET_SELECTOR_COMBOPOPUP::SetSelectedNet(), and APPEARANCE_CONTROLS::showNetclass().
NETINFO_ITEM * NETINFO_LIST::GetNetItem | ( | const wxString & | aNetName | ) | const |
aNetName | net name to identify a given NETINFO_ITEM. |
Definition at line 72 of file netinfo_list.cpp.
References m_netNames, and NULL.
|
inline |
Definition at line 447 of file netinfo.h.
References m_parent.
Referenced by NET_SELECTOR_COMBOPOPUP::Accept().
|
inline |
Return the name map, at least for python.
Definition at line 358 of file netinfo.h.
Referenced by FABMASTER::loadEtch(), FABMASTER::loadFootprints(), FABMASTER::loadVias(), FABMASTER::loadZone(), and NET_GRID_TABLE::Rebuild().
|
inline |
Return the netcode map, at least for python.
Constant that holds the "unconnected net" number (typically 0) all items "connected" to this net are actually not connected items
Definition at line 361 of file netinfo.h.
References m_netCodes.
Referenced by DIALOG_NET_INSPECTOR::buildNetsList().
|
inlinestatic |
Wrapper class, so you can iterate through NETINFO_ITEM*s, not std::pair<int/wxString, NETINFO_ITEM*>
Definition at line 373 of file netinfo.h.
References UNCONNECTED.
Referenced by BOARD::FindNet(), PCB_CONTROL::Paste(), and BOARD_CONNECTED_ITEM::SetNetCode().
void NETINFO_LIST::RemoveNet | ( | NETINFO_ITEM * | aNet | ) |
Remove a net from the net list.
Definition at line 83 of file netinfo_list.cpp.
References NETINFO_ITEM::m_netCode, m_netCodes, m_netNames, and m_newNetCode.
Referenced by NET_SELECTOR_COMBOPOPUP::Accept(), and BOARD::Remove().
void NETINFO_LIST::RemoveUnusedNets | ( | ) |
Definition at line 107 of file netinfo_list.cpp.
References m_netCodes, and m_netNames.
Referenced by BOARD_NETLIST_UPDATER::UpdateNetlist().
|
private |
map of <int, NETINFO_ITEM*> is NOT owner
Definition at line 473 of file netinfo.h.
Referenced by AppendNet(), clear(), getFreeNetCode(), GetNetItem(), NetsByNetcode(), RemoveNet(), and RemoveUnusedNets().
|
private |
map of <wxString, NETINFO_ITEM*>, is NETINFO_ITEM owner
Definition at line 472 of file netinfo.h.
Referenced by AppendNet(), begin(), clear(), end(), GetNetCount(), GetNetItem(), RemoveNet(), and RemoveUnusedNets().
|
private |
possible value for new net code assignment
Definition at line 475 of file netinfo.h.
Referenced by clear(), getFreeNetCode(), NETINFO_LIST(), and RemoveNet().
|
private |
Definition at line 470 of file netinfo.h.
Referenced by buildListOfNets(), and GetParent().
|
static |
NETINFO_ITEM meaning that there was no net assigned for an item, as there was no board storing net list available.
Definition at line 369 of file netinfo.h.
Referenced by FOOTPRINT::ClearAllNets(), PCB_PARSER::parsePAD(), and BOARD::SanitizeNetcodes().
|
static |
Constant that forces initialization of a netinfo item to the NETINFO_ITEM ORPHANED (typically -1) when calling SetNetCode on board connected items.
Definition at line 365 of file netinfo.h.
Referenced by BOARD_NETLIST_UPDATER::deleteSinglePadNets(), KIGFX::PCB_PAINTER::draw(), PCB_EDIT_FRAME::ExchangeFootprint(), BOARD::FindNet(), PCB_IO::format(), ALTIUM_PCB::GetNetCode(), EAGLE_PLUGIN::loadPlain(), EAGLE_PLUGIN::loadSignals(), LEGACY_PLUGIN::loadZONE_CONTAINER(), OrphanedItem(), PCB_PARSER::parseNETINFO_ITEM(), PCB_PARSER::parseZONE(), PCB_SELECTION_CONDITIONS::sameNetFunc(), BOARD::SetAreasNetCodesFromNetNames(), DIALOG_PAD_PROPERTIES::TransferDataFromWindow(), DIALOG_PAD_PROPERTIES::transferDataToPad(), and BOARD_NETLIST_UPDATER::updateComponentPadConnections().