More consistent naming.
This commit is contained in:
parent
60ecd4698c
commit
b1f0bf7334
|
@ -729,8 +729,8 @@ void EDA_3D_CANVAS::OnMouseMove( wxMouseEvent &event )
|
|||
if( !event.Dragging() &&
|
||||
( m_boardAdapter.RenderEngineGet() == RENDER_ENGINE::OPENGL_LEGACY ) )
|
||||
{
|
||||
STATUSBAR_REPORTER activityReporter(
|
||||
m_parentStatusBar, static_cast<int>( EDA_3D_VIEWER_STATUSBAR::STATUS_TEXT ) );
|
||||
STATUSBAR_REPORTER reporter( m_parentStatusBar,
|
||||
static_cast<int>( EDA_3D_VIEWER_STATUSBAR::STATUS_TEXT ) );
|
||||
|
||||
RAY mouseRay = getRayAtCurrrentMousePosition();
|
||||
|
||||
|
@ -754,10 +754,10 @@ void EDA_3D_CANVAS::OnMouseMove( wxMouseEvent &event )
|
|||
|
||||
if( pad && pad->IsOnCopperLayer() )
|
||||
{
|
||||
activityReporter.Report( wxString::Format( _( "Net %s\tNetClass %s\tPadName %s" ),
|
||||
pad->GetNet()->GetNetname(),
|
||||
pad->GetNet()->GetClassName(),
|
||||
pad->GetName() ) );
|
||||
reporter.Report( wxString::Format( _( "Net %s\tNetClass %s\tPadName %s" ),
|
||||
pad->GetNet()->GetNetname(),
|
||||
pad->GetNet()->GetNetClassName(),
|
||||
pad->GetName() ) );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -767,7 +767,7 @@ void EDA_3D_CANVAS::OnMouseMove( wxMouseEvent &event )
|
|||
FOOTPRINT* footprint = dynamic_cast<FOOTPRINT *>( intersectedBoardItem );
|
||||
|
||||
if( footprint )
|
||||
activityReporter.Report( footprint->GetReference() );
|
||||
reporter.Report( footprint->GetReference() );
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -779,9 +779,9 @@ void EDA_3D_CANVAS::OnMouseMove( wxMouseEvent &event )
|
|||
|
||||
if( track )
|
||||
{
|
||||
activityReporter.Report( wxString::Format( _( "Net %s\tNetClass %s" ),
|
||||
track->GetNet()->GetNetname(),
|
||||
track->GetNet()->GetClassName() ) );
|
||||
reporter.Report( wxString::Format( _( "Net %s\tNetClass %s" ),
|
||||
track->GetNet()->GetNetname(),
|
||||
track->GetNet()->GetNetClassName() ) );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -792,9 +792,9 @@ void EDA_3D_CANVAS::OnMouseMove( wxMouseEvent &event )
|
|||
|
||||
if( zone && zone->IsOnCopperLayer() )
|
||||
{
|
||||
activityReporter.Report( wxString::Format( _( "Net %s\tNetClass %s" ),
|
||||
zone->GetNet()->GetNetname(),
|
||||
zone->GetNet()->GetClassName() ) );
|
||||
reporter.Report( wxString::Format( _( "Net %s\tNetClass %s" ),
|
||||
zone->GetNet()->GetNetname(),
|
||||
zone->GetNet()->GetNetClassName() ) );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -811,7 +811,7 @@ void EDA_3D_CANVAS::OnMouseMove( wxMouseEvent &event )
|
|||
m_3d_render_ogl_legacy->SetCurrentIntersectedBoardItem( nullptr );
|
||||
Request_refresh();
|
||||
|
||||
activityReporter.Report( "" );
|
||||
reporter.Report( "" );
|
||||
}
|
||||
|
||||
m_currentIntersectedBoardItem = nullptr;
|
||||
|
|
|
@ -117,7 +117,7 @@ public:
|
|||
|
||||
NETINFO_ITEM* netInfo = m_netinfoList->GetNetItem( m_selectedNetcode );
|
||||
|
||||
if( netInfo && netInfo->GetNet() > 0 )
|
||||
if( netInfo && netInfo->GetNetCode() > 0 )
|
||||
return netInfo->GetNetname();
|
||||
|
||||
return NO_NET;
|
||||
|
@ -149,7 +149,7 @@ public:
|
|||
void SetSelectedNet( const wxString& aNetname )
|
||||
{
|
||||
if( m_netinfoList && m_netinfoList->GetNetItem( aNetname ) )
|
||||
m_selectedNetcode = m_netinfoList->GetNetItem( aNetname )->GetNet();
|
||||
m_selectedNetcode = m_netinfoList->GetNetItem( aNetname )->GetNetCode();
|
||||
}
|
||||
|
||||
wxString GetSelectedNetname()
|
||||
|
@ -235,9 +235,9 @@ public:
|
|||
|
||||
rebuildList();
|
||||
|
||||
if( newnet->GetNet() > 0 )
|
||||
if( newnet->GetNetCode() > 0 )
|
||||
{
|
||||
m_selectedNetcode = newnet->GetNet();
|
||||
m_selectedNetcode = newnet->GetNetCode();
|
||||
GetComboCtrl()->SetValue( UnescapeString( remainingName ) );
|
||||
}
|
||||
else
|
||||
|
@ -256,14 +256,14 @@ public:
|
|||
{
|
||||
NETINFO_ITEM* netInfo = m_netinfoList->GetNetItem( escapedNetName );
|
||||
|
||||
if( netInfo == nullptr || netInfo->GetNet() == 0 )
|
||||
if( netInfo == nullptr || netInfo->GetNetCode() == 0 )
|
||||
{
|
||||
m_selectedNetcode = 0;
|
||||
GetComboCtrl()->SetValue( NO_NET );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_selectedNetcode = netInfo->GetNet();
|
||||
m_selectedNetcode = netInfo->GetNetCode();
|
||||
GetComboCtrl()->SetValue( UnescapeString( escapedNetName ) );
|
||||
}
|
||||
}
|
||||
|
@ -315,7 +315,7 @@ protected:
|
|||
|
||||
for( NETINFO_ITEM* netinfo : *m_netinfoList )
|
||||
{
|
||||
if( netinfo->GetNet() > 0 && netinfo->IsCurrent() )
|
||||
if( netinfo->GetNetCode() > 0 && netinfo->IsCurrent() )
|
||||
{
|
||||
wxString netname = UnescapeString( netinfo->GetNetname() );
|
||||
|
||||
|
|
|
@ -1299,8 +1299,8 @@ static std::vector<int> padCountListByNet;
|
|||
// For same pad count, sort by alphabetic names
|
||||
static bool sortNetsByNodes( const NETINFO_ITEM* a, const NETINFO_ITEM* b )
|
||||
{
|
||||
int countA = padCountListByNet[a->GetNet()];
|
||||
int countB = padCountListByNet[b->GetNet()];
|
||||
int countA = padCountListByNet[ a->GetNetCode() ];
|
||||
int countB = padCountListByNet[ b->GetNetCode() ];
|
||||
|
||||
if( countA == countB )
|
||||
return a->GetNetname() < b->GetNetname();
|
||||
|
@ -1329,7 +1329,7 @@ int BOARD::SortedNetnamesList( wxArrayString& aNames, bool aSortbyPadsCount )
|
|||
|
||||
for( NETINFO_ITEM* net : m_NetInfo )
|
||||
{
|
||||
int netcode = net->GetNet();
|
||||
int netcode = net->GetNetCode();
|
||||
|
||||
if( netcode > 0 && net->IsCurrent() )
|
||||
{
|
||||
|
@ -1404,7 +1404,7 @@ void BOARD::SynchronizeNetsAndNetClasses()
|
|||
const wxString& netname = net->GetNetname();
|
||||
const wxString& netclassName = netSettings->GetNetclassName( netname );
|
||||
|
||||
net->SetClass( netClasses.Find( netclassName ) );
|
||||
net->SetNetClass( netClasses.Find( netclassName ) );
|
||||
}
|
||||
|
||||
BOARD_DESIGN_SETTINGS& bds = GetDesignSettings();
|
||||
|
@ -1441,7 +1441,7 @@ int BOARD::SetAreasNetCodesFromNetNames()
|
|||
|
||||
if( net )
|
||||
{
|
||||
zone->SetNetCode( net->GetNet() );
|
||||
zone->SetNetCode( net->GetNetCode() );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -68,7 +68,7 @@ NETCLASS* BOARD_CONNECTED_ITEM::GetEffectiveNetclass() const
|
|||
{
|
||||
// NB: we must check the net first, as when it is 0 GetNetClass() will return the
|
||||
// orphaned net netclass, not the default netclass.
|
||||
if( !m_netinfo || m_netinfo->GetNet() == 0 )
|
||||
if( !m_netinfo || m_netinfo->GetNetCode() == 0 )
|
||||
return GetBoard()->GetDesignSettings().GetDefault();
|
||||
else
|
||||
return GetNetClass();
|
||||
|
@ -116,7 +116,7 @@ NETCLASS* BOARD_CONNECTED_ITEM::GetNetClass() const
|
|||
wxString BOARD_CONNECTED_ITEM::GetNetClassName() const
|
||||
{
|
||||
if( m_netinfo )
|
||||
return m_netinfo->GetClassName();
|
||||
return m_netinfo->GetNetClassName();
|
||||
else
|
||||
return wxEmptyString;
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ public:
|
|||
*/
|
||||
int GetNetCode() const
|
||||
{
|
||||
return m_netinfo ? m_netinfo->GetNet() : -1;
|
||||
return m_netinfo ? m_netinfo->GetNetCode() : -1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -121,7 +121,7 @@ bool CN_CONNECTIVITY_ALGO::Add( BOARD_ITEM* aItem )
|
|||
switch( aItem->Type() )
|
||||
{
|
||||
case PCB_NETINFO_T:
|
||||
MarkNetAsDirty( static_cast<NETINFO_ITEM*>( aItem )->GetNet() );
|
||||
MarkNetAsDirty( static_cast<NETINFO_ITEM*>( aItem )->GetNetCode() );
|
||||
break;
|
||||
|
||||
case PCB_FOOTPRINT_T:
|
||||
|
|
|
@ -91,7 +91,7 @@ void CONNECTIVITY_DATA::Build( BOARD* aBoard, PROGRESS_REPORTER* aReporter )
|
|||
|
||||
for( NETINFO_ITEM* net : aBoard->GetNetInfo() )
|
||||
if( net->GetNetClass()->GetName() != NETCLASS::Default )
|
||||
m_netclassMap[net->GetNet()] = net->GetNetClass()->GetName();
|
||||
m_netclassMap[ net->GetNetCode() ] = net->GetNetClass()->GetName();
|
||||
|
||||
RecalculateRatsnest();
|
||||
}
|
||||
|
@ -108,7 +108,10 @@ void CONNECTIVITY_DATA::Build( const std::vector<BOARD_ITEM*>& aItems )
|
|||
|
||||
void CONNECTIVITY_DATA::Move( const VECTOR2I& aDelta )
|
||||
{
|
||||
m_connAlgo->ForEachAnchor( [&aDelta] ( CN_ANCHOR& anchor ) { anchor.Move( aDelta ); } );
|
||||
m_connAlgo->ForEachAnchor( [&aDelta]( CN_ANCHOR& anchor )
|
||||
{
|
||||
anchor.Move( aDelta );
|
||||
} );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ void PCB_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline )
|
|||
|
||||
if( netinfo )
|
||||
{
|
||||
netcode = netinfo->GetNet();
|
||||
netcode = netinfo->GetNetCode();
|
||||
|
||||
MSG_PANEL_ITEMS items;
|
||||
netinfo->GetMsgPanelInfo( this, items );
|
||||
|
@ -126,14 +126,14 @@ void PCB_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline )
|
|||
SetMsgPanel( items );
|
||||
first = false;
|
||||
|
||||
pcb->SetHighLightNet( netinfo->GetNet() );
|
||||
renderSettings->SetHighlight( true, netinfo->GetNet() );
|
||||
pcb->SetHighLightNet( netinfo->GetNetCode() );
|
||||
renderSettings->SetHighlight( true, netinfo->GetNetCode() );
|
||||
multiHighlight = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
pcb->SetHighLightNet( netinfo->GetNet(), true );
|
||||
renderSettings->SetHighlight( true, netinfo->GetNet(), true );
|
||||
pcb->SetHighLightNet( netinfo->GetNetCode(), true );
|
||||
renderSettings->SetHighlight( true, netinfo->GetNetCode(), true );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -440,7 +440,7 @@ bool DIALOG_COPPER_ZONE::AcceptOptions( bool aUseExportableSetupOnly )
|
|||
net = m_Parent->GetBoard()->FindNet( netname );
|
||||
}
|
||||
|
||||
m_settings.m_NetcodeSelection = net ? net->GetNet() : 0;
|
||||
m_settings.m_NetcodeSelection = net ? net->GetNetCode() : 0;
|
||||
|
||||
m_settings.m_Name = m_tcZoneName->GetValue();
|
||||
|
||||
|
|
|
@ -229,7 +229,7 @@ bool DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::TransferDataToWindow()
|
|||
if( g_filterByNetclass && m_netclassFilter->SetStringSelection( g_netclassFilter ) )
|
||||
m_netclassFilterOpt->SetValue( true );
|
||||
else if( item )
|
||||
m_netclassFilter->SetStringSelection( item->GetNet()->GetClassName() );
|
||||
m_netclassFilter->SetStringSelection( item->GetNet()->GetNetClassName() );
|
||||
|
||||
if( g_filterByNet && m_brd->FindNet( g_netFilter ) != NULL )
|
||||
{
|
||||
|
@ -237,7 +237,9 @@ bool DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::TransferDataToWindow()
|
|||
m_netFilterOpt->SetValue( true );
|
||||
}
|
||||
else if( item )
|
||||
{
|
||||
m_netFilter->SetSelectedNetcode( item->GetNetCode() );
|
||||
}
|
||||
|
||||
if( g_filterByLayer && m_layerFilter->SetLayerSelection( g_layerFilter ) != wxNOT_FOUND )
|
||||
m_layerFilterOpt->SetValue( true );
|
||||
|
|
|
@ -129,7 +129,7 @@ public:
|
|||
|
||||
int GetNetCode() const
|
||||
{
|
||||
return GetIsGroup() ? ( 0 - int( m_group_number ) - 1 ) : m_net->GetNet();
|
||||
return GetIsGroup() ? ( 0 - int( m_group_number ) - 1 ) : m_net->GetNetCode();
|
||||
}
|
||||
|
||||
const wxString& GetNetName() const { return m_net_name; }
|
||||
|
@ -336,7 +336,7 @@ public:
|
|||
OPT<LIST_ITEM_ITER> findItem( NETINFO_ITEM* aNet )
|
||||
{
|
||||
if( aNet != nullptr )
|
||||
return findItem( aNet->GetNet() );
|
||||
return findItem( aNet->GetNetCode() );
|
||||
else
|
||||
return {};
|
||||
}
|
||||
|
@ -1090,7 +1090,7 @@ void DIALOG_NET_INSPECTOR::updateDisplayedRowValues( const OPT<LIST_ITEM_ITER>&
|
|||
|
||||
wxString DIALOG_NET_INSPECTOR::formatNetCode( const NETINFO_ITEM* aNet ) const
|
||||
{
|
||||
return wxString::Format( "%.3d", aNet->GetNet() );
|
||||
return wxString::Format( "%.3d", aNet->GetNetCode() );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1124,7 +1124,7 @@ void DIALOG_NET_INSPECTOR::OnBoardItemAdded( BOARD& aBoard, BOARD_ITEM* aBoardIt
|
|||
std::unique_ptr<LIST_ITEM> new_item = std::make_unique<LIST_ITEM>( net );
|
||||
|
||||
// the new net could have some pads already assigned, count them.
|
||||
new_item->SetPadCount( m_brd->GetNodesCount( net->GetNet() ) );
|
||||
new_item->SetPadCount( m_brd->GetNodesCount( net->GetNetCode() ) );
|
||||
|
||||
m_data_model->addItem( std::move( new_item ) );
|
||||
}
|
||||
|
@ -1328,7 +1328,7 @@ void DIALOG_NET_INSPECTOR::updateNet( NETINFO_ITEM* aNet )
|
|||
|
||||
OPT<LIST_ITEM_ITER> cur_net_row = m_data_model->findItem( aNet );
|
||||
|
||||
const unsigned int node_count = m_brd->GetNodesCount( aNet->GetNet() );
|
||||
const unsigned int node_count = m_brd->GetNodesCount( aNet->GetNetCode() );
|
||||
|
||||
if( node_count == 0 && !m_cbShowZeroPad->IsChecked() )
|
||||
{
|
||||
|
@ -1414,7 +1414,7 @@ std::unique_ptr<DIALOG_NET_INSPECTOR::LIST_ITEM> DIALOG_NET_INSPECTOR::buildNewI
|
|||
|
||||
new_item->SetPadCount( aPadCount );
|
||||
|
||||
const auto cn_items = std::equal_range( aCNItems.begin(), aCNItems.end(), aNet->GetNet(),
|
||||
const auto cn_items = std::equal_range( aCNItems.begin(), aCNItems.end(), aNet->GetNetCode(),
|
||||
NETCODE_CMP_LESS() );
|
||||
|
||||
for( auto i = cn_items.first; i != cn_items.second; ++i )
|
||||
|
|
|
@ -1235,13 +1235,13 @@ int DRC_ENGINE::IsNetADiffPair( BOARD* aBoard, NETINFO_ITEM* aNet, int& aNetP, i
|
|||
|
||||
if( polarity > 0 )
|
||||
{
|
||||
aNetP = aNet->GetNet();
|
||||
aNetN = net->GetNet();
|
||||
aNetP = aNet->GetNetCode();
|
||||
aNetN = net->GetNetCode();
|
||||
}
|
||||
else
|
||||
{
|
||||
aNetP = net->GetNet();
|
||||
aNetN = aNet->GetNet();
|
||||
aNetP = net->GetNetCode();
|
||||
aNetN = aNet->GetNetCode();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -294,7 +294,7 @@ bool test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run()
|
|||
|
||||
key.parentRule = constraint.GetParentRule();
|
||||
|
||||
if( refNet->GetNet() == key.netN )
|
||||
if( refNet->GetNetCode() == key.netN )
|
||||
dpRuleMatches[key].itemsN.insert( citem );
|
||||
else
|
||||
dpRuleMatches[key].itemsP.insert( citem );
|
||||
|
|
|
@ -890,7 +890,7 @@ static void CreateSignalsSection( FILE* aFile, BOARD* aPcb )
|
|||
msg.Printf( "NoConnection%d", NbNoConn++ );
|
||||
}
|
||||
|
||||
if( net->GetNet() <= 0 ) // dummy netlist (no connection)
|
||||
if( net->GetNetCode() <= 0 ) // dummy netlist (no connection)
|
||||
continue;
|
||||
|
||||
msg = wxT( "SIGNAL \"" ) + escapeString( net->GetNetname() ) + "\"";
|
||||
|
@ -902,7 +902,7 @@ static void CreateSignalsSection( FILE* aFile, BOARD* aPcb )
|
|||
{
|
||||
for( PAD* pad : footprint->Pads() )
|
||||
{
|
||||
if( pad->GetNetCode() != net->GetNet() )
|
||||
if( pad->GetNetCode() != net->GetNetCode() )
|
||||
continue;
|
||||
|
||||
msg.Printf( wxT( "NODE \"%s\" \"%s\"" ),
|
||||
|
|
|
@ -578,8 +578,8 @@ bool HYPERLYNX_EXPORTER::writeNets()
|
|||
|
||||
for( const auto netInfo : m_board->GetNetInfo() )
|
||||
{
|
||||
int netcode = netInfo->GetNet();
|
||||
bool isNullNet = netInfo->GetNet() <= 0 || netInfo->GetNetname().IsEmpty();
|
||||
int netcode = netInfo->GetNetCode();
|
||||
bool isNullNet = netInfo->GetNetCode() <= 0 || netInfo->GetNetname().IsEmpty();
|
||||
|
||||
if( isNullNet )
|
||||
continue;
|
||||
|
|
|
@ -110,11 +110,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Function SetClass
|
||||
* sets \a aNetclass into this NET
|
||||
*/
|
||||
void SetClass( const NETCLASSPTR& aNetClass );
|
||||
void SetNetClass( const NETCLASSPTR& aNetClass );
|
||||
|
||||
/**
|
||||
* Function GetNetClass
|
||||
|
@ -127,21 +123,12 @@ public:
|
|||
return m_netClass.get();
|
||||
}
|
||||
|
||||
/**
|
||||
* Function GetClassName
|
||||
* returns the class name
|
||||
*/
|
||||
wxString GetClassName() const
|
||||
wxString GetNetClassName() const
|
||||
{
|
||||
return m_netClass ? m_netClass->GetName() : NETCLASS::Default;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function GetNet
|
||||
* @return int - the netcode
|
||||
*/
|
||||
int GetNet() const { return m_netCode; }
|
||||
|
||||
int GetNetCode() const { return m_netCode; }
|
||||
void SetNetCode( int aNetCode ) { m_netCode = aNetCode; }
|
||||
|
||||
/**
|
||||
|
@ -172,7 +159,6 @@ public:
|
|||
}
|
||||
|
||||
bool IsCurrent() const { return m_isCurrent; }
|
||||
|
||||
void SetIsCurrent( bool isCurrent ) { m_isCurrent = isCurrent; }
|
||||
|
||||
/**
|
||||
|
@ -190,7 +176,7 @@ public:
|
|||
*/
|
||||
void Clear()
|
||||
{
|
||||
SetClass( NETCLASSPTR() );
|
||||
SetNetClass( NETCLASSPTR());
|
||||
}
|
||||
|
||||
BOARD* GetParent() const
|
||||
|
|
|
@ -61,7 +61,7 @@ NETINFO_ITEM::~NETINFO_ITEM()
|
|||
}
|
||||
|
||||
|
||||
void NETINFO_ITEM::SetClass( const NETCLASSPTR& aNetClass )
|
||||
void NETINFO_ITEM::SetNetClass( const NETCLASSPTR& aNetClass )
|
||||
{
|
||||
wxCHECK( m_parent, /* void */ );
|
||||
m_netClass = aNetClass ? aNetClass : m_parent->GetDesignSettings().GetNetClasses().GetDefault();
|
||||
|
@ -74,7 +74,7 @@ void NETINFO_ITEM::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANE
|
|||
|
||||
aList.emplace_back( _( "Net Name" ), UnescapeString( GetNetname() ) );
|
||||
|
||||
aList.emplace_back( _( "Net Code" ), wxString::Format( "%d", GetNet() ) );
|
||||
aList.emplace_back( _( "Net Code" ), wxString::Format( "%d", GetNetCode() ) );
|
||||
|
||||
// Warning: for netcode == NETINFO_LIST::ORPHANED, the parent or the board can be NULL
|
||||
BOARD * board = m_parent ? m_parent->GetBoard() : NULL;
|
||||
|
@ -89,7 +89,7 @@ void NETINFO_ITEM::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANE
|
|||
{
|
||||
for( PAD* pad : footprint->Pads() )
|
||||
{
|
||||
if( pad->GetNetCode() == GetNet() )
|
||||
if( pad->GetNetCode() == GetNetCode() )
|
||||
{
|
||||
count++;
|
||||
lengthPadToDie += pad->GetPadToDieLength();
|
||||
|
@ -105,13 +105,13 @@ void NETINFO_ITEM::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANE
|
|||
{
|
||||
if( track->Type() == PCB_VIA_T )
|
||||
{
|
||||
if( track->GetNetCode() == GetNet() )
|
||||
if( track->GetNetCode() == GetNetCode() )
|
||||
count++;
|
||||
}
|
||||
|
||||
if( track->Type() == PCB_TRACE_T )
|
||||
{
|
||||
if( track->GetNetCode() == GetNet() )
|
||||
if( track->GetNetCode() == GetNetCode() )
|
||||
lengthNet += track->GetLength();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -129,7 +129,7 @@ void NETINFO_LIST::AppendNet( NETINFO_ITEM* aNewElement )
|
|||
|
||||
if( sameName != NULL )
|
||||
{
|
||||
aNewElement->m_netCode = sameName->GetNet();
|
||||
aNewElement->m_netCode = sameName->GetNetCode();
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -142,11 +142,11 @@ void NETINFO_LIST::AppendNet( NETINFO_ITEM* aNewElement )
|
|||
|
||||
// net names & codes are supposed to be unique
|
||||
assert( GetNetItem( aNewElement->GetNetname() ) == NULL );
|
||||
assert( GetNetItem( aNewElement->GetNet() ) == NULL );
|
||||
assert( GetNetItem( aNewElement->GetNetCode() ) == NULL );
|
||||
|
||||
// add an entry for fast look up by a net name using a map
|
||||
m_netNames.insert( std::make_pair( aNewElement->GetNetname(), aNewElement ) );
|
||||
m_netCodes.insert( std::make_pair( aNewElement->GetNet(), aNewElement ) );
|
||||
m_netCodes.insert( std::make_pair( aNewElement->GetNetCode(), aNewElement ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -171,7 +171,7 @@ void NETINFO_LIST::Show() const
|
|||
{
|
||||
wxLogDebug( "[%d]: netcode:%d netname:<%s>\n",
|
||||
i++,
|
||||
it->second->GetNet(),
|
||||
it->second->GetNetCode(),
|
||||
TO_UTF8( it->second->GetNetname() ) );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -804,7 +804,7 @@ bool BOARD_NETLIST_UPDATER::UpdateNetlist( NETLIST& aNetlist )
|
|||
// Mark all nets (except <no net>) as stale; we'll update those to current that
|
||||
// we find in the netlist
|
||||
for( NETINFO_ITEM* net : m_board->GetNetInfo() )
|
||||
net->SetIsCurrent( net->GetNet() == 0 );
|
||||
net->SetIsCurrent( net->GetNetCode() == 0 );
|
||||
}
|
||||
|
||||
for( unsigned i = 0; i < aNetlist.GetCount(); i++ )
|
||||
|
|
|
@ -94,7 +94,7 @@ bool PCB_EDIT_FRAME::LoadProjectSettings()
|
|||
for( const wxString& hidden : localSettings.m_HiddenNets )
|
||||
{
|
||||
if( NETINFO_ITEM* net = nets.GetNetItem( hidden ) )
|
||||
hiddenNets.insert( net->GetNet() );
|
||||
hiddenNets.insert( net->GetNetCode() );
|
||||
}
|
||||
|
||||
std::map<int, KIGFX::COLOR4D>& netColors = rs->GetNetColorMap();
|
||||
|
@ -106,7 +106,7 @@ bool PCB_EDIT_FRAME::LoadProjectSettings()
|
|||
continue;
|
||||
|
||||
if( NETINFO_ITEM* net = nets.GetNetItem( pair.first ) )
|
||||
netColors[net->GetNet()] = pair.second;
|
||||
netColors[ net->GetNetCode() ] = pair.second;
|
||||
}
|
||||
|
||||
std::map<wxString, KIGFX::COLOR4D>& netclassColors = rs->GetNetclassColorMap();
|
||||
|
|
|
@ -2794,14 +2794,14 @@ NETINFO_ITEM* CADSTAR_PCB_ARCHIVE_LOADER::getKiCadNet( const NET_ID& aCadstarNet
|
|||
if( mNetClassMap.find( csNet.RouteCodeID ) != mNetClassMap.end() )
|
||||
{
|
||||
NETCLASSPTR netclass = mNetClassMap.at( csNet.RouteCodeID );
|
||||
netInfo->SetClass( netclass );
|
||||
netInfo->SetNetClass( netclass );
|
||||
}
|
||||
else
|
||||
{
|
||||
ROUTECODE rc = getRouteCode( csNet.RouteCodeID );
|
||||
NETCLASSPTR netclass( new ::NETCLASS( rc.Name ) );
|
||||
netclass->SetTrackWidth( getKiCadLength( rc.OptimalWidth ) );
|
||||
netInfo->SetClass( netclass );
|
||||
netInfo->SetNetClass( netclass );
|
||||
mNetClassMap.insert( { csNet.RouteCodeID, netclass } );
|
||||
}
|
||||
|
||||
|
|
|
@ -581,7 +581,7 @@ void PCB_IO::formatNetInformation( BOARD* aBoard, int aNestLevel ) const
|
|||
continue;
|
||||
|
||||
m_out->Print( aNestLevel, "(net %d %s)\n",
|
||||
m_mapping->Translate( net->GetNet() ),
|
||||
m_mapping->Translate( net->GetNetCode() ),
|
||||
m_out->Quotew( net->GetNetname() ).c_str() );
|
||||
}
|
||||
|
||||
|
|
|
@ -2015,7 +2015,7 @@ void PCB_PARSER::parseNETINFO_ITEM()
|
|||
m_board->Add( net );
|
||||
|
||||
// Store the new code mapping
|
||||
pushValueIntoMap( netCode, net->GetNet() );
|
||||
pushValueIntoMap( netCode, net->GetNetCode() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4914,7 +4914,9 @@ ZONE* PCB_PARSER::parseZONE( BOARD_ITEM_CONTAINER* aParent )
|
|||
NETINFO_ITEM* net = m_board->FindNet( netnameFromfile );
|
||||
|
||||
if( net ) // An existing net has the same net name. use it for the zone
|
||||
zone->SetNetCode( net->GetNet() );
|
||||
{
|
||||
zone->SetNetCode( net->GetNetCode() );
|
||||
}
|
||||
else // Not existing net: add a new net to keep trace of the zone netname
|
||||
{
|
||||
int newnetcode = m_board->GetNetCount();
|
||||
|
@ -4922,9 +4924,9 @@ ZONE* PCB_PARSER::parseZONE( BOARD_ITEM_CONTAINER* aParent )
|
|||
m_board->Add( net );
|
||||
|
||||
// Store the new code mapping
|
||||
pushValueIntoMap( newnetcode, net->GetNet() );
|
||||
pushValueIntoMap( newnetcode, net->GetNetCode() );
|
||||
// and update the zone netcode
|
||||
zone->SetNetCode( net->GetNet() );
|
||||
zone->SetNetCode( net->GetNetCode() );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2048,7 +2048,7 @@ void LEGACY_PLUGIN::loadNETINFO_ITEM()
|
|||
{
|
||||
// net 0 should be already in list, so store this net
|
||||
// if it is not the net 0, or if the net 0 does not exists.
|
||||
if( net && ( net->GetNet() > 0 || m_board->FindNet( 0 ) == NULL ) )
|
||||
if( net && ( net->GetNetCode() > 0 || m_board->FindNet( 0 ) == NULL ) )
|
||||
{
|
||||
m_board->Add( net );
|
||||
|
||||
|
@ -2056,7 +2056,7 @@ void LEGACY_PLUGIN::loadNETINFO_ITEM()
|
|||
if( (int)m_netCodes.size() <= netCode )
|
||||
m_netCodes.resize( netCode+1 );
|
||||
|
||||
m_netCodes[netCode] = net->GetNet();
|
||||
m_netCodes[netCode] = net->GetNetCode();
|
||||
net = NULL;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -293,7 +293,7 @@ void PCB_PAD::AddToFootprint( FOOTPRINT* aFootprint, int aRotation, bool aEncaps
|
|||
m_board->Add( netinfo );
|
||||
}
|
||||
|
||||
pad->SetNetCode( netinfo->GetNet() );
|
||||
pad->SetNetCode( netinfo->GetNetCode() );
|
||||
}
|
||||
|
||||
if( !aEncapsulatedPad )
|
||||
|
|
|
@ -537,7 +537,7 @@ int PNS_PCBNEW_RULE_RESOLVER::DpCoupledNet( int aNet )
|
|||
if( !net )
|
||||
return -1;
|
||||
|
||||
return net->GetNet();
|
||||
return net->GetNetCode();
|
||||
}
|
||||
|
||||
return -1;
|
||||
|
@ -599,8 +599,8 @@ bool PNS_PCBNEW_RULE_RESOLVER::DpNetPair( const PNS::ITEM* aItem, int& aNetP, in
|
|||
if( !netInfoP || !netInfoN )
|
||||
return false;
|
||||
|
||||
aNetP = netInfoP->GetNet();
|
||||
aNetN = netInfoN->GetNet();
|
||||
aNetP = netInfoP->GetNetCode();
|
||||
aNetN = netInfoN->GetNetCode();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1328,7 +1328,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard )
|
|||
for( unsigned ii = 0; ii < aBoard->GetNetCount(); ii++ )
|
||||
{
|
||||
NETINFO_ITEM* net = aBoard->FindNet( ii );
|
||||
int netcode = net->GetNet();
|
||||
int netcode = net->GetNetCode();
|
||||
|
||||
if( netcode > 0 )
|
||||
m_nets[ netcode ]->net_id = TO_UTF8( net->GetNetname() );
|
||||
|
|
|
@ -416,7 +416,9 @@ void SPECCTRA_DB::FromSESSION( BOARD* aBoard )
|
|||
NETINFO_ITEM* netinfo = aBoard->FindNet( netName );
|
||||
|
||||
if( netinfo )
|
||||
netoutCode = netinfo->GetNet();
|
||||
{
|
||||
netoutCode = netinfo->GetNetCode();
|
||||
}
|
||||
else // else netCode remains 0
|
||||
{
|
||||
// int breakhere = 1;
|
||||
|
@ -468,7 +470,7 @@ void SPECCTRA_DB::FromSESSION( BOARD* aBoard )
|
|||
NETINFO_ITEM* netvia = aBoard->FindNet( netName );
|
||||
|
||||
if( netvia )
|
||||
netCode = netvia->GetNet();
|
||||
netCode = netvia->GetNetCode();
|
||||
|
||||
// else netCode remains 0
|
||||
}
|
||||
|
|
|
@ -245,7 +245,7 @@ void NET_GRID_TABLE::Rebuild()
|
|||
|
||||
for( const std::pair<const wxString, NETINFO_ITEM*>& pair : nets )
|
||||
{
|
||||
int netCode = pair.second->GetNet();
|
||||
int netCode = pair.second->GetNetCode();
|
||||
|
||||
if( netCode > 0 && !pair.first.StartsWith( "no_connect_" ) )
|
||||
{
|
||||
|
@ -2480,9 +2480,9 @@ void APPEARANCE_CONTROLS::showNetclass( const wxString& aClassName, bool aShow )
|
|||
{
|
||||
if( net->GetNetClass() == defaultClass )
|
||||
{
|
||||
manager->RunAction( action, true, net->GetNet() );
|
||||
manager->RunAction( action, true, net->GetNetCode() );
|
||||
|
||||
int row = m_netsTable->GetRowByNetcode( net->GetNet() );
|
||||
int row = m_netsTable->GetRowByNetcode( net->GetNetCode() );
|
||||
|
||||
if( row >= 0 )
|
||||
m_netsTable->SetValueAsBool( row, NET_GRID_TABLE::COL_VISIBILITY, aShow );
|
||||
|
@ -2497,7 +2497,7 @@ void APPEARANCE_CONTROLS::showNetclass( const wxString& aClassName, bool aShow )
|
|||
{
|
||||
if( NETINFO_ITEM* net = nets.GetNetItem( member ) )
|
||||
{
|
||||
int code = net->GetNet();
|
||||
int code = net->GetNetCode();
|
||||
manager->RunAction( action, true, code );
|
||||
|
||||
int row = m_netsTable->GetRowByNetcode( code );
|
||||
|
@ -2639,7 +2639,7 @@ void APPEARANCE_CONTROLS::onNetclassContextMenu( wxCommandEvent& aEvent )
|
|||
return;
|
||||
|
||||
static bool first = true;
|
||||
int code = aItem->GetNet();
|
||||
int code = aItem->GetNetCode();
|
||||
|
||||
if( first )
|
||||
{
|
||||
|
@ -2673,7 +2673,7 @@ void APPEARANCE_CONTROLS::onNetclassContextMenu( wxCommandEvent& aEvent )
|
|||
if( !aItem )
|
||||
return;
|
||||
|
||||
int code = aItem->GetNet();
|
||||
int code = aItem->GetNetCode();
|
||||
m_frame->GetToolManager()->RunAction( action, true, code );
|
||||
} );
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@ void PCB_EDIT_FRAME::Edit_Zone_Params( ZONE* aZone )
|
|||
NETINFO_ITEM* net = GetBoard()->FindNet( zoneInfo.m_NetcodeSelection );
|
||||
|
||||
if( net ) // net == NULL should not occur
|
||||
aZone->SetNetCode( net->GetNet() );
|
||||
aZone->SetNetCode( net->GetNetCode() );
|
||||
|
||||
// Combine zones if possible
|
||||
GetBoard()->OnAreaPolygonModified( &s_AuxiliaryList, aZone );
|
||||
|
|
|
@ -158,8 +158,8 @@ BOOST_AUTO_TEST_CASE( IntrospectedProperties )
|
|||
auto net1info = new NETINFO_ITEM( &brd, "net1", 1);
|
||||
auto net2info = new NETINFO_ITEM( &brd, "net2", 2);
|
||||
|
||||
net1info->SetClass( netclass1 );
|
||||
net2info->SetClass( netclass2 );
|
||||
net1info->SetNetClass( netclass1 );
|
||||
net2info->SetNetClass( netclass2 );
|
||||
|
||||
TRACK trackA(&brd);
|
||||
TRACK trackB(&brd);
|
||||
|
|
Loading…
Reference in New Issue