34using namespace std::placeholders;
54 if( ( aNetCode >= 0 ) && board )
80 *aSource = constraint.
GetName();
121 return wxT(
"[** NO BOARD DEFINED **]" );
125 if( !netname.length() )
126 return wxT(
"[<no net>]" );
128 return wxT(
"[" ) +
UnescapeString( netname ) + wxT(
"](" ) +
_(
"Not Found" ) + wxT(
")" );
152 if( layerEnum.
Choices().GetCount() == 0 )
169 layer->SetChoices( layerEnum.
Choices() );
174 netCode->SetIsDeprecated();
180 netClass->SetIsDeprecated();
187 oldNetClass->SetIsInternal();
193 oldNetName->SetIsInternal();
static struct BOARD_CONNECTED_ITEM_DESC _BOARD_CONNECTED_ITEM_DESC
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
wxString GetNetnameMsg() const
virtual NETCLASS * GetEffectiveNetClass() const
Return the NETCLASS for this item.
bool SetNetCode(int aNetCode, bool aNoAssert)
Set net using a net code.
wxString GetNetname() const
BOARD_CONNECTED_ITEM(BOARD_ITEM *aParent, KICAD_T idtype)
wxString GetNetClassName() const
Returns the name of the effective netclass.
NETINFO_ITEM * m_netinfo
Store all information about the net that item belongs to.
virtual int GetOwnClearance(PCB_LAYER_ID aLayer, wxString *aSource=nullptr) const
Return an item's "own" clearance in internal units.
wxString GetShortNetname() const
wxString GetUnescapedShortNetname() const
bool m_localRatsnestVisible
Container for design settings for a BOARD object.
std::shared_ptr< NET_SETTINGS > m_NetSettings
std::shared_ptr< DRC_ENGINE > m_DRCEngine
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
virtual PCB_LAYER_ID GetLayer() const
Return the primary layer this item is on.
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
virtual const BOARD * GetBoard() const
Return the BOARD in which this BOARD_ITEM resides, or NULL if none.
virtual bool IsOnCopperLayer() const
Information pertinent to a Pcbnew printed circuit board.
NETINFO_ITEM * FindNet(int aNetcode) const
Search for a net with the given netcode.
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
MINOPTMAX< int > & Value()
ENUM_MAP & Map(T aValue, const wxString &aName)
static ENUM_MAP< T > & Instance()
ENUM_MAP & Undefined(T aValue)
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
static LSET AllLayersMask()
static const wxChar * Name(PCB_LAYER_ID aLayerId)
Return the fixed name association with aLayerId.
A collection of nets and the parameters used to route or test these nets.
const wxString GetName() const
const wxString & GetShortNetname() const
const wxString & GetNetname() const
const wxString & GetUnescapedShortNetname() const
Container for NETINFO_ITEM elements, which are the nets.
static NETINFO_ITEM * OrphanedItem()
Wrapper class, so you can iterate through NETINFO_ITEM*s, not std::pair<int/wxString,...
Provide class metadata.Helper macro to map type hashes to names.
void InheritsAfter(TYPE_ID aDerived, TYPE_ID aBase)
Declare an inheritance relationship between types.
static PROPERTY_MANAGER & Instance()
void AddProperty(PROPERTY_BASE *aProperty, const wxString &aGroup=wxEmptyString)
Register a property.
void ReplaceProperty(size_t aBase, const wxString &aName, PROPERTY_BASE *aNew, const wxString &aGroup=wxEmptyString)
Replace an existing property for a specific type.
Some functions to handle hotkeys in KiCad.
PCB_LAYER_ID
A quick note on layer IDs:
#define NO_SETTER(owner, type)
wxString UnescapeString(const wxString &aSource)
BOARD_CONNECTED_ITEM_DESC()
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.