55#define CH_UNROUTABLE 2
58#define LOCAL_RATSNEST_ITEM 0x8000
70 NETINFO_ITEM(
BOARD* aParent,
const wxString& aNetName = wxEmptyString,
int aNetCode = -1 );
80 return wxT(
"NETINFO_ITEM" );
84 void Show(
int nestLevel, std::ostream& os )
const override
89 const BOX2I GetBoundingBox()
const override;
106 void SetNetClass(
const std::shared_ptr<NETCLASS>& aNetClass );
142 return m_shortNetname.StartsWith( wxT(
"Net-(" ) )
143 || m_shortNetname.StartsWith( wxT(
"unconnected-(" ) );
152 m_netname = aNewName;
154 if( aNewName.Contains( wxT(
"/" ) ) )
155 m_shortNetname = aNewName.AfterLast(
'/' );
157 m_shortNetname = aNewName;
171 void GetMsgPanelInfo(
EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
override;
183 bool Matches(
const EDA_SEARCH_DATA& aSearchData,
void* aAuxData )
const override;
399 if( !g_orphanedItem )
402 return g_orphanedItem;
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Information pertinent to a Pcbnew printed circuit board.
The base class for create windows for drawing purpose.
A base class for most all the KiCad significant classes used in schematics and boards.
KICAD_T Type() const
Returns the type of object.
An abstract class from which implementation specific LINE_READERs may be derived to read single lines...
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 HasAutoGeneratedNetname()
wxString m_shortNetname
Short net name, like vout from /sheet/subsheet/vout.
void SetNetname(const wxString &aNewName)
Set the long netname to aNetName, the short netname to the last token in the long netname's path,...
wxString GetClass() const override
Return the class name.
const wxString & GetShortNetname() const
static bool ClassOf(const EDA_ITEM *aItem)
BOARD * GetParent() const
const wxString & GetNetname() const
void SetNetCode(int aNetCode)
std::shared_ptr< NETCLASS > GetNetClassSlow()
wxString m_unescapedShortNetname
Unescaped short net name.
VECTOR2I GetPosition() const override
int m_netCode
A number equivalent to the net name.
std::shared_ptr< NETCLASS > m_netClass
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
wxString m_netname
Full net name like /sheet/subsheet/vout used by Eeschema.
void SetIsCurrent(bool isCurrent)
bool m_isCurrent
Indicates the net is currently in use.
const wxString & GetUnescapedShortNetname() const
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
Container for NETINFO_ITEM elements, which are the nets.
int getFreeNetCode()
Return the first available net code that is not used by any other net.
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 RemoveNet(NETINFO_ITEM *aNet)
Remove a net from the net list.
NETINFO_ITEM * GetNetItem(int aNetCode) const
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.
const NETNAMES_MAP & NetsByName() const
Return the name map, at least for python.
void buildListOfNets()
Rebuild the list of NETINFO_ITEMs.
Wrapper class, so you can iterate through NETINFO_ITEM*s, not std::pair<int/wxString,...
NETINFO_ITEM * operator->() const
const NETINFO_MAPPING * m_mapping
std::map< int, int >::const_iterator m_iterator
bool operator!=(const iterator &aOther) const
iterator(std::map< int, int >::const_iterator aIter, const NETINFO_MAPPING *aMapping)
iterator operator++(int)
post-increment operator
NETINFO_ITEM * operator*() const
const iterator & operator++()
pre-increment operator
bool operator==(const iterator &aOther) const
void SetBoard(const BOARD *aBoard)
Set a BOARD object that is used to prepare the net code map.
int Translate(int aNetCode) const
Translate net number according to the map prepared by Update() function.
iterator end() const
Return iterator to the last entry in the mapping.
void Update()
Prepare a mapping for net codes so they can be saved as consecutive numbers.
const BOARD * m_board
Board for which mapping is prepared.
iterator begin() const
Return iterator to the first entry in the mapping.
std::map< int, int > m_netMapping
Map that allows saving net codes with consecutive numbers (for compatibility reasons)
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
#define DECL_HASH_FOR_SWIG(TypeName, KeyType, ValueType)
Declare a std::unordered_map but no swig template.
This file contains macros just for swig binding.
#define DECL_MAP_FOR_SWIG(TypeName, KeyType, ValueType)
#define DECL_VEC_FOR_SWIG(TypeName, MemberType)
Declare a std::vector but no swig template.
std::vector< FAB_LAYER_COLOR > dummy
wxString UnescapeString(const wxString &aSource)
@ PCB_NETINFO_T
class NETINFO_ITEM, a description of a net