mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-21 19:33:44 +00:00
netinfo.h does not need to be in board_connected_item.h
This commit is contained in:
parent
4712d7a918
commit
17d680de08
@ -29,6 +29,7 @@
|
||||
#include <drc/drc_engine.h>
|
||||
#include <kicad_string.h>
|
||||
#include <i18n_utility.h>
|
||||
#include <netinfo.h>
|
||||
|
||||
using namespace std::placeholders;
|
||||
|
||||
@ -103,6 +104,12 @@ int BOARD_CONNECTED_ITEM::GetOwnClearance( PCB_LAYER_ID aLayer, wxString* aSourc
|
||||
}
|
||||
|
||||
|
||||
int BOARD_CONNECTED_ITEM::GetNetCode() const
|
||||
{
|
||||
return m_netinfo ? m_netinfo->GetNetCode() : -1;
|
||||
}
|
||||
|
||||
|
||||
// Note: do NOT return a std::shared_ptr from this. It is used heavily in DRC, and the
|
||||
// std::shared_ptr stuff shows up large in performance profiling.
|
||||
NETCLASS* BOARD_CONNECTED_ITEM::GetNetClass() const
|
||||
@ -123,6 +130,12 @@ wxString BOARD_CONNECTED_ITEM::GetNetClassName() const
|
||||
}
|
||||
|
||||
|
||||
wxString BOARD_CONNECTED_ITEM::GetNetname() const
|
||||
{
|
||||
return m_netinfo ? m_netinfo->GetNetname() : wxString();
|
||||
}
|
||||
|
||||
|
||||
wxString BOARD_CONNECTED_ITEM::GetNetnameMsg() const
|
||||
{
|
||||
if( !GetBoard() )
|
||||
@ -139,6 +152,12 @@ wxString BOARD_CONNECTED_ITEM::GetNetnameMsg() const
|
||||
}
|
||||
|
||||
|
||||
wxString BOARD_CONNECTED_ITEM::GetShortNetname() const
|
||||
{
|
||||
return m_netinfo->GetShortNetname();
|
||||
}
|
||||
|
||||
|
||||
static struct BOARD_CONNECTED_ITEM_DESC
|
||||
{
|
||||
BOARD_CONNECTED_ITEM_DESC()
|
||||
|
@ -27,9 +27,9 @@
|
||||
#define BOARD_CONNECTED_ITEM_H
|
||||
|
||||
#include <board_item.h>
|
||||
#include <netinfo.h>
|
||||
|
||||
class NETCLASS;
|
||||
class NETINFO_ITEM;
|
||||
class TRACK;
|
||||
class PAD;
|
||||
|
||||
@ -89,10 +89,7 @@ public:
|
||||
/**
|
||||
* @return the net code.
|
||||
*/
|
||||
int GetNetCode() const
|
||||
{
|
||||
return m_netinfo ? m_netinfo->GetNetCode() : -1;
|
||||
}
|
||||
int GetNetCode() const;
|
||||
|
||||
/**
|
||||
* Set net using a net code.
|
||||
@ -115,10 +112,7 @@ public:
|
||||
/**
|
||||
* @return the full netname.
|
||||
*/
|
||||
wxString GetNetname() const
|
||||
{
|
||||
return m_netinfo ? m_netinfo->GetNetname() : wxString();
|
||||
}
|
||||
wxString GetNetname() const;
|
||||
|
||||
/**
|
||||
* @return the full netname or "<no net>" in square braces, followed by "(Not Found)" if the
|
||||
@ -129,10 +123,7 @@ public:
|
||||
/**
|
||||
* @return the short netname.
|
||||
*/
|
||||
wxString GetShortNetname() const
|
||||
{
|
||||
return m_netinfo->GetShortNetname();
|
||||
}
|
||||
wxString GetShortNetname() const;
|
||||
|
||||
/**
|
||||
* Return an item's "own" clearance in internal units.
|
||||
|
Loading…
Reference in New Issue
Block a user