Add optional project parameter to PCB plugin load method.

The optional PROJECT parameter is primarily used for third party plugins
that need to store project information loaded by the plugin.
This commit is contained in:
Wayne Stambaugh
2020-12-18 10:40:51 -05:00
parent bd7c3447e0
commit 06aa1506ee
23 changed files with 410 additions and 487 deletions
+7 -7
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2011-2012 SoftPLC Corporation, Dick Hollenbeck <[email protected]>
* Copyright (C) 2016-2017 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2016-2020 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -30,10 +30,9 @@
#define FMT_UNIMPLEMENTED "Plugin \"%s\" does not implement the \"%s\" function."
/**
* Function not_implemented
* throws an IO_ERROR and complains of an API function not being implemented.
* Throw an #IO_ERROR and complains of an API function not being implemented.
*
* @param aPlugin is a PLUGIN instance
* @param aPlugin is a #PLUGIN instance.
* @param aCaller is the name of the unimplemented API function.
*/
static void not_implemented( PLUGIN* aPlugin, const char* aCaller )
@@ -44,10 +43,11 @@ static void not_implemented( PLUGIN* aPlugin, const char* aCaller )
}
BOARD* PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe, const PROPERTIES* aProperties )
BOARD* PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe, const PROPERTIES* aProperties,
PROJECT* aProject )
{
not_implemented( this, __FUNCTION__ );
return NULL;
return nullptr;
}
@@ -95,7 +95,7 @@ FOOTPRINT* PLUGIN::FootprintLoad( const wxString& aLibraryPath, const wxString&
{
// not pure virtual so that plugins only have to implement subset of the PLUGIN interface.
not_implemented( this, __FUNCTION__ );
return NULL;
return nullptr;
}