27 #include <wx/translation.h> 30 #define FMT_UNIMPLEMENTED wxT( "Plugin \"%s\" does not implement the \"%s\" function." ) 42 wxString::FromUTF8( aCaller ) ) );
57 return std::vector<FOOTPRINT*>();
68 bool aBestEfforts,
const PROPERTIES* aProperties )
81 const wxString& aFootprintName,
85 return FootprintLoad( aLibraryPath, aFootprintName,
false, aProperties );
93 return FootprintLoad( aLibraryPath, aFootprintName,
true, aProperties ) !=
nullptr;
98 const wxString& aFootprintName,
151 (*aListToAppendTo)[
"debug_level"] =
UTF8(
_(
"Enable <b>debug</b> logging for Footprint*() " 152 "functions in this PLUGIN." ) );
154 (*aListToAppendTo)[
"read_filter_regex"] =
UTF8(
_(
"Regular expression <b>footprint name</b> " 157 (*aListToAppendTo)[
"enable_transaction_logging"] =
UTF8(
_(
"Enable transaction logging. The " 158 "mere presence of this option " 159 "turns on the logging, no need to " 162 (*aListToAppendTo)[
"username"] =
UTF8(
_(
"User name for <b>login</b> to some special library " 165 (*aListToAppendTo)[
"password"] =
UTF8(
_(
"Password for <b>login</b> to some special library " 172 (*aListToAppendTo)[
"python_footprint_plugin"] =
UTF8(
_(
"Enter the python module which " 173 "implements the PLUGIN::Footprint*() " virtual const FOOTPRINT * GetEnumeratedFootprint(const wxString &aLibraryPath, const wxString &aFootprintName, const PROPERTIES *aProperties=nullptr)
A version of FootprintLoad() for use after FootprintEnumerate() for more efficient cache management.
An 8 bit string that is assuredly encoded in UTF8, and supplies special conversion support to and fro...
Container for project specific data.
virtual void FootprintLibCreate(const wxString &aLibraryPath, const PROPERTIES *aProperties=nullptr)
Create a new empty footprint library at aLibraryPath empty.
static void not_implemented(PLUGIN *aPlugin, const char *aCaller)
Throw an IO_ERROR and complains of an API function not being implemented.
virtual BOARD * Load(const wxString &aFileName, BOARD *aAppendToMe, const PROPERTIES *aProperties=nullptr, PROJECT *aProject=nullptr, PROGRESS_REPORTER *aProgressReporter=nullptr)
Load information from some input file format that this PLUGIN implementation knows about into either ...
A progress reporter interface for use in multi-threaded environments.
virtual void FootprintLibOptions(PROPERTIES *aListToAppendTo) const
Append supported PLUGIN options to aListToAppenTo along with internationalized descriptions.
virtual FOOTPRINT * FootprintLoad(const wxString &aLibraryPath, const wxString &aFootprintName, bool aKeepUUID=false, const PROPERTIES *aProperties=nullptr)
Load a footprint having aFootprintName from the aLibraryPath containing a library format that this PL...
A name/value tuple with unique names and optional values.
virtual bool IsFootprintLibWritable(const wxString &aLibraryPath)
Return true if the library at aLibraryPath is writable.
virtual std::vector< FOOTPRINT * > GetImportedCachedLibraryFootprints()
Return a container with the cached library footprints generated in the last call to Load.
virtual void FootprintEnumerate(wxArrayString &aFootprintNames, const wxString &aLibraryPath, bool aBestEfforts, const PROPERTIES *aProperties=nullptr)
Return a list of footprint names contained within the library at aLibraryPath.
virtual void FootprintDelete(const wxString &aLibraryPath, const wxString &aFootprintName, const PROPERTIES *aProperties=nullptr)
Delete aFootprintName from the library at aLibraryPath.
virtual void Save(const wxString &aFileName, BOARD *aBoard, const PROPERTIES *aProperties=nullptr)
Write aBoard to a storage file in a format that this PLUGIN implementation knows about or it can be u...
virtual void PrefetchLib(const wxString &aLibraryPath, const PROPERTIES *aProperties=nullptr)
If possible, prefetches the specified library (e.g.
#define FMT_UNIMPLEMENTED
virtual const wxString PluginName() const =0
Return a brief hard coded name for this PLUGIN.
virtual void FootprintSave(const wxString &aLibraryPath, const FOOTPRINT *aFootprint, const PROPERTIES *aProperties=nullptr)
Write aFootprint to an existing library located at aLibraryPath.
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Information pertinent to a Pcbnew printed circuit board.
A base class that BOARD loading and saving plugins should derive from.
virtual bool FootprintLibDelete(const wxString &aLibraryPath, const PROPERTIES *aProperties=nullptr)
Delete an existing footprint library and returns true, or if library does not exist returns false,...
#define THROW_IO_ERROR(msg)
virtual bool FootprintExists(const wxString &aLibraryPath, const wxString &aFootprintName, const PROPERTIES *aProperties=nullptr)
Check for the existence of a footprint.