router: derive VIA class from LINKED_ITEM interface

This commit is contained in:
Tomasz Wlostowski 2022-06-03 23:03:41 +02:00
parent cab08f859a
commit f73acbb206
1 changed files with 5 additions and 4 deletions

View File

@ -29,6 +29,7 @@
#include "pcb_track.h" #include "pcb_track.h"
#include "pns_item.h" #include "pns_item.h"
#include "pns_linked_item.h"
namespace PNS { namespace PNS {
@ -45,11 +46,11 @@ struct VIA_HANDLE
int net = -1; int net = -1;
}; };
class VIA : public ITEM class VIA : public LINKED_ITEM
{ {
public: public:
VIA() : VIA() :
ITEM( VIA_T ) LINKED_ITEM( VIA_T )
{ {
m_diameter = 2; // Dummy value m_diameter = 2; // Dummy value
m_drill = 0; m_drill = 0;
@ -60,7 +61,7 @@ public:
VIA( const VECTOR2I& aPos, const LAYER_RANGE& aLayers, int aDiameter, int aDrill, VIA( const VECTOR2I& aPos, const LAYER_RANGE& aLayers, int aDiameter, int aDrill,
int aNet = -1, VIATYPE aViaType = VIATYPE::THROUGH ) : int aNet = -1, VIATYPE aViaType = VIATYPE::THROUGH ) :
ITEM( VIA_T ) LINKED_ITEM( VIA_T )
{ {
SetNet( aNet ); SetNet( aNet );
SetLayers( aLayers ); SetLayers( aLayers );
@ -75,7 +76,7 @@ public:
} }
VIA( const VIA& aB ) : VIA( const VIA& aB ) :
ITEM( aB ) LINKED_ITEM( aB )
{ {
SetNet( aB.Net() ); SetNet( aB.Net() );
SetLayers( aB.Layers() ); SetLayers( aB.Layers() );