53 NETINFO_ITEM(
BOARD* aParent,
const wxString& aNetName = wxEmptyString,
int aNetCode = -1 );
63 return wxT(
"NETINFO_ITEM" );
67 void Show(
int nestLevel, std::ostream& os )
const override
89 void SetNetClass(
const std::shared_ptr<NETCLASS>& aNetClass );
271 if( !g_orphanedItem )
274 return g_orphanedItem;
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
BOARD_ITEM(BOARD_ITEM *aParent, KICAD_T idtype, PCB_LAYER_ID aLayer=F_Cu)
Information pertinent to a Pcbnew printed circuit board.
The base class for create windows for drawing purpose.
KICAD_T Type() const
Returns the type of object.
virtual void SetParent(EDA_ITEM *aParent)
EDA_ITEM(EDA_ITEM *parent, KICAD_T idType, bool isSCH_ITEM=false, bool isBOARD_ITEM=false)
EDA_MSG_PANEL items for displaying messages.
A collection of nets and the parameters used to route or test these nets.
Handle the data for a net.
bool Matches(const EDA_SEARCH_DATA &aSearchData, void *aAuxData) const override
Compare the item against the search criteria in aSearchData.
wxString m_shortNetname
Short net name, like vout from /sheet/subsheet/vout.
const wxString & GetNetChain() const
bool operator==(const BOARD_ITEM &aBoardItem) const override
void SetNetname(const wxString &aNewName)
Set the long netname to aNetName, the short netname to the last token in the long netname's path,...
const KIID & GetTerminalPadUuid(int aIndex) const
wxString GetClass() const override
Return the class name.
NETINFO_ITEM(BOARD *aParent, const wxString &aNetName=wxEmptyString, int aNetCode=-1)
NETINFO_ITEM class, to handle info on nets: netnames, net constraints.
double Similarity(const BOARD_ITEM &aBoardItem) const override
Return a measure of how likely the other object is to represent the same object.
const wxString & GetShortNetname() const
static bool ClassOf(const EDA_ITEM *aItem)
wxString m_displayNetname
Unescaped netname for display.
BOARD * GetParent() const
const wxString & GetNetname() const
void Clear()
Set all fields to their default values.
void SetNetCode(int aNetCode)
KIID m_terminalPadUuids[2]
void SetTerminalPadUuid(int aIndex, const KIID &aUuid)
VECTOR2I GetPosition() const override
PAD * GetTerminalPad(int aIndex) const
int m_netCode
A number equivalent to the net name.
std::shared_ptr< NETCLASS > m_netClass
void ResolveTerminalPads(BOARD *aBoard)
void SetTerminal(int aIndex, PAD *aPad)
Set the terminal-pad pointer and the persisted UUID at aIndex from a single pad, keeping the two view...
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
const wxString & GetDisplayNetname() const
void SetParent(BOARD *aParent)
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Return the information about the NETINFO_ITEM in aList to display in the message panel.
void SetNetChain(const wxString &aNetChain)
bool HasAutoGeneratedNetname() const
wxString m_netname
Full net name like /sheet/subsheet/vout used by Eeschema.
void ClearTerminalPad(int aIndex)
Reset the terminal-pad pointer and UUID at aIndex to their empty state so the pair stays in lockstep.
friend class NETINFO_LIST
void SetIsCurrent(bool isCurrent)
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
void SetTerminalPad(int aIndex, PAD *aPad)
bool m_isCurrent
Indicates the net is currently in use.
void SetNetClass(const std::shared_ptr< NETCLASS > &aNetClass)
void SetPosition(const VECTOR2I &aPos) override
BOARD * m_parent
The parent board the net belongs to.
Wrapper class, so you can iterate through NETINFO_ITEM*s, not std::pair<int/wxString,...
iterator operator++(int)
post-increment operator
bool operator==(const iterator &aOther) const
NETNAMES_MAP::const_iterator m_iterator
bool operator!=(const iterator &aOther) const
const iterator & operator++()
pre-increment operator
iterator(NETNAMES_MAP::const_iterator aIter)
NETINFO_ITEM * operator->() const
NETINFO_ITEM * operator*() const
int getFreeNetCode()
Return the first available net code that is not used by any other net.
void RemoveUnusedNets(BOARD_COMMIT *aCommit)
static const int UNCONNECTED
Constant that holds the "unconnected net" number (typically 0) all items "connected" to this net are ...
NETCODES_MAP m_netCodes
map of <int, NETINFO_ITEM*> is NOT owner
static const int ORPHANED
Constant that forces initialization of a netinfo item to the NETINFO_ITEM ORPHANED (typically -1) whe...
int m_newNetCode
possible value for new net code assignment
BOARD * GetParent() const
static NETINFO_ITEM * OrphanedItem()
NETINFO_ITEM meaning that there was no net assigned for an item, as there was no board storing net li...
unsigned GetNetCount() const
void detachAll()
Drop all entries from the lookup maps without freeing the items.
void RemoveNet(NETINFO_ITEM *aNet)
Remove a net from the net list.
NETINFO_ITEM * GetNetItem(int aNetCode) const
NETINFO_LIST(BOARD *aParent)
void clear()
Delete the list of nets (and free memory).
const NETCODES_MAP & NetsByNetcode() const
Return the netcode map, at least for python.
NETNAMES_MAP m_netNames
map of <wxString, NETINFO_ITEM*>, is NETINFO_ITEM owner
void AppendNet(NETINFO_ITEM *aNewElement)
Add aNewElement to the end of the net list.
bool m_DisplayNetnamesDirty
const NETNAMES_MAP & NetsByName() const
Return the name map, at least for python.
void RebuildDisplayNetnames() const
void buildListOfNets()
Rebuild the list of NETINFO_ITEMs.
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
std::map< int, NETINFO_ITEM * > NETCODES_MAP
std::map< wxString, NETINFO_ITEM * > NETNAMES_MAP
std::vector< FAB_LAYER_COLOR > dummy
@ PCB_NETINFO_T
class NETINFO_ITEM, a description of a net
VECTOR2< int32_t > VECTOR2I