Fix P-Cad importer plugin warnings

A few methods differed by the number or type of arguments in derived
classes. They were changed to match the base class method signature and
marked as 'override'.
This commit is contained in:
Maciej Suminski 2017-12-14 16:09:04 +01:00
parent dee93e5eeb
commit 9bb660a6bc
12 changed files with 18 additions and 33 deletions

View File

@ -84,7 +84,7 @@ BOARD* PCAD_PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe, const P
LOCALE_IO toggle; // toggles on, then off, the C locale. LOCALE_IO toggle; // toggles on, then off, the C locale.
LoadInputFile( aFileName, &xmlDoc ); LoadInputFile( aFileName, &xmlDoc );
pcb.Parse( NULL, &xmlDoc, wxT( "PCB" ) ); pcb.ParseBoard( NULL, &xmlDoc, wxT( "PCB" ) );
pcb.AddToBoard(); pcb.AddToBoard();
return m_board; return m_board;

View File

@ -666,7 +666,7 @@ void PCB::GetBoardOutline( wxXmlDocument* aXmlDoc, wxString aActualConversion )
} }
} }
void PCB::Parse( wxStatusBar* aStatusBar, wxXmlDocument* aXmlDoc, wxString aActualConversion ) void PCB::ParseBoard( wxStatusBar* aStatusBar, wxXmlDocument* aXmlDoc, wxString aActualConversion )
{ {
XNODE* aNode;//, *aaNode; XNODE* aNode;//, *aaNode;
PCB_NET* net; PCB_NET* net;

View File

@ -59,7 +59,7 @@ public:
int GetNewTimestamp() override; int GetNewTimestamp() override;
int GetNetCode( wxString aNetName ) override; int GetNetCode( wxString aNetName ) override;
void Parse( wxStatusBar* aStatusBar, void ParseBoard( wxStatusBar* aStatusBar,
wxXmlDocument* aXmlDoc, wxXmlDocument* aXmlDoc,
wxString aActualConversion ); wxString aActualConversion );

View File

@ -52,19 +52,12 @@ PCB_COPPER_POUR::~PCB_COPPER_POUR()
bool PCB_COPPER_POUR::Parse( XNODE* aNode, bool PCB_COPPER_POUR::Parse( XNODE* aNode,
wxString aDefaultMeasurementUnit, wxString aDefaultMeasurementUnit,
wxString aActualConversion, wxString aActualConversion )
wxStatusBar* aStatusBar )
{ {
XNODE* lNode; XNODE* lNode;
wxString pourType, str, propValue; wxString pourType, str, propValue;
int pourSpacing, thermalWidth; int pourSpacing, thermalWidth;
// aStatusBar->SetStatusText( aStatusBar->GetStatusText() + wxT( " CooperPour..." ) );
//str = FindNode( aNode, wxT( "pourType" ) )->GetNodeContent();
//str.Trim( false );
//pourType = str.MakeUpper();
lNode = FindNode( aNode, wxT( "netNameRef" ) ); lNode = FindNode( aNode, wxT( "netNameRef" ) );
if( lNode ) if( lNode )

View File

@ -45,8 +45,7 @@ public:
virtual bool Parse( XNODE* aNode, virtual bool Parse( XNODE* aNode,
wxString aDefaultMeasurementUnit, wxString aDefaultMeasurementUnit,
wxString aActualConversion, wxString aActualConversion ) override;
wxStatusBar* aStatusBar ) override;
}; };
} // namespace PCAD2KICAD } // namespace PCAD2KICAD

View File

@ -45,7 +45,7 @@ public:
virtual bool Parse( XNODE* aNode, virtual bool Parse( XNODE* aNode,
wxString aDefaultMeasurementUnit, wxString aDefaultMeasurementUnit,
wxString actualConversion ); wxString aActualConversion ) override;
}; };
} // namespace PCAD2KICAD } // namespace PCAD2KICAD

View File

@ -327,8 +327,7 @@ void PCB_MODULE::DoLayerContentsObjects( XNODE* aNode,
polygon = new PCB_POLYGON( m_callbacks, m_board, PCadLayer ); polygon = new PCB_POLYGON( m_callbacks, m_board, PCadLayer );
if( polygon->Parse( lNode, if( polygon->Parse( lNode,
aDefaultMeasurementUnit, aDefaultMeasurementUnit,
aActualConversion, aActualConversion ) )
aStatusBar ) )
aList->Add( polygon ); aList->Add( polygon );
else else
delete polygon; delete polygon;
@ -339,8 +338,7 @@ void PCB_MODULE::DoLayerContentsObjects( XNODE* aNode,
{ {
copperPour = new PCB_COPPER_POUR( m_callbacks, m_board, PCadLayer ); copperPour = new PCB_COPPER_POUR( m_callbacks, m_board, PCadLayer );
if( copperPour->Parse( lNode, aDefaultMeasurementUnit, aActualConversion, if( copperPour->Parse( lNode, aDefaultMeasurementUnit, aActualConversion ) )
aStatusBar ) )
aList->Add( copperPour ); aList->Add( copperPour );
else else
delete copperPour; delete copperPour;
@ -360,8 +358,7 @@ void PCB_MODULE::DoLayerContentsObjects( XNODE* aNode,
{ {
plane = new PCB_PLANE( m_callbacks, m_board, PCadLayer ); plane = new PCB_PLANE( m_callbacks, m_board, PCadLayer );
if( plane->Parse( lNode, aDefaultMeasurementUnit, aActualConversion, if( plane->Parse( lNode, aDefaultMeasurementUnit, aActualConversion ) )
aStatusBar ) )
aList->Add( plane ); aList->Add( plane );
else else
delete plane; delete plane;

View File

@ -52,6 +52,10 @@ public:
wxString aDefaultMeasurementUnit, wxString aDefaultMeasurementUnit,
wxString aActualConversion ); wxString aActualConversion );
virtual void Flip() override; virtual void Flip() override;
void AddToModule( MODULE* aModule ) override
{
AddToModule( aModule, 0, true );
}
void AddToModule( MODULE* aModule, int aRotation, bool aEncapsulatedPad ); void AddToModule( MODULE* aModule, int aRotation, bool aEncapsulatedPad );
void AddToBoard() override; void AddToBoard() override;

View File

@ -51,14 +51,11 @@ PCB_PLANE::~PCB_PLANE()
bool PCB_PLANE::Parse( XNODE* aNode, bool PCB_PLANE::Parse( XNODE* aNode,
wxString aDefaultMeasurementUnit, wxString aDefaultMeasurementUnit,
wxString aActualConversion, wxString aActualConversion )
wxStatusBar* aStatusBar )
{ {
XNODE* lNode; XNODE* lNode;
wxString pourType, str, propValue; wxString pourType, str, propValue;
// aStatusBar->SetStatusText( aStatusBar->GetStatusText() + wxT( " Plane..." ) );
lNode = FindNode( aNode, wxT( "netNameRef" ) ); lNode = FindNode( aNode, wxT( "netNameRef" ) );
if( lNode ) if( lNode )

View File

@ -44,8 +44,7 @@ public:
virtual bool Parse( XNODE* aNode, virtual bool Parse( XNODE* aNode,
wxString aDefaultMeasurementUnit, wxString aDefaultMeasurementUnit,
wxString aActualConversion, wxString aActualConversion ) override;
wxStatusBar* aStatusBar ) override;
}; };
} // namespace PCAD2KICAD } // namespace PCAD2KICAD

View File

@ -125,14 +125,11 @@ void PCB_POLYGON::FormPolygon( XNODE* aNode, VERTICES_ARRAY* aPolygon,
bool PCB_POLYGON::Parse( XNODE* aNode, bool PCB_POLYGON::Parse( XNODE* aNode,
wxString aDefaultMeasurementUnit, wxString aDefaultMeasurementUnit,
wxString aActualConversion, wxString aActualConversion )
wxStatusBar* aStatusBar )
{ {
XNODE* lNode; XNODE* lNode;
wxString propValue; wxString propValue;
// aStatusBar->SetStatusText( aStatusBar->GetStatusText() + wxT( " Polygon..." ) );
lNode = FindNode( aNode, wxT( "netNameRef" ) ); lNode = FindNode( aNode, wxT( "netNameRef" ) );
if( lNode ) if( lNode )

View File

@ -53,8 +53,7 @@ public:
virtual bool Parse( XNODE* aNode, virtual bool Parse( XNODE* aNode,
wxString aDefaultMeasurementUnit, wxString aDefaultMeasurementUnit,
wxString aActualConversion, wxString aActualConversion );
wxStatusBar* aStatusBar );
virtual void SetPosOffset( int aX_offs, int aY_offs ) override; virtual void SetPosOffset( int aX_offs, int aY_offs ) override;
void AddToModule( MODULE* aModule ) override; void AddToModule( MODULE* aModule ) override;