Net & net class properties
This commit is contained in:
parent
a289056a9e
commit
a988cab84e
|
@ -31,6 +31,7 @@
|
|||
|
||||
#include <connectivity/connectivity_data.h>
|
||||
|
||||
using namespace std::placeholders;
|
||||
|
||||
BOARD_CONNECTED_ITEM::BOARD_CONNECTED_ITEM( BOARD_ITEM* aParent, KICAD_T idtype ) :
|
||||
BOARD_ITEM( aParent, idtype ), m_netinfo( NETINFO_LIST::OrphanedItem() )
|
||||
|
@ -206,6 +207,10 @@ static struct BOARD_CONNECTED_ITEM_DESC
|
|||
PROPERTY_MANAGER& propMgr = PROPERTY_MANAGER::Instance();
|
||||
REGISTER_TYPE( BOARD_CONNECTED_ITEM );
|
||||
propMgr.InheritsAfter( TYPE_HASH( BOARD_CONNECTED_ITEM ), TYPE_HASH( BOARD_ITEM ) );
|
||||
//propMgr.AddProperty( new PROPERTY<BOARD_CONNECTED_ITEM, NETINFO_ITEM*>( "Net", &BOARD_CONNECTED_ITEM::SetNet, &BOARD_CONNECTED_ITEM::GetNet ) );
|
||||
|
||||
propMgr.AddProperty( new PROPERTY<BOARD_CONNECTED_ITEM, int>( _( "Net" ),
|
||||
&BOARD_CONNECTED_ITEM::SetNetCode, &BOARD_CONNECTED_ITEM::GetNetCode ) );
|
||||
propMgr.AddProperty( new PROPERTY<BOARD_CONNECTED_ITEM, wxString>( _( "Net class" ),
|
||||
NO_SETTER( BOARD_CONNECTED_ITEM, wxString ), &BOARD_CONNECTED_ITEM::GetNetClassName ) );
|
||||
}
|
||||
} _BOARD_CONNECTED_ITEM_DESC;
|
||||
|
|
|
@ -111,7 +111,12 @@ public:
|
|||
* Note also items (in fact pads) not on copper layers will have
|
||||
* their net code always set to 0 (not connected)
|
||||
*/
|
||||
bool SetNetCode( int aNetCode, bool aNoAssert=false );
|
||||
bool SetNetCode( int aNetCode, bool aNoAssert );
|
||||
|
||||
void SetNetCode( int aNetCode )
|
||||
{
|
||||
SetNetCode( aNetCode, false );
|
||||
}
|
||||
|
||||
/**
|
||||
* Function GetNetname
|
||||
|
|
|
@ -736,6 +736,11 @@ public:
|
|||
*/
|
||||
NETINFO_ITEM* FindNet( const wxString& aNetname ) const;
|
||||
|
||||
const NETINFO_LIST& GetNetInfo() const
|
||||
{
|
||||
return m_NetInfo;
|
||||
}
|
||||
|
||||
NETINFO_LIST& GetNetInfo()
|
||||
{
|
||||
return m_NetInfo;
|
||||
|
|
Loading…
Reference in New Issue