30#ifndef _GPCB_PLUGIN_H_
31#define _GPCB_PLUGIN_H_
51 return wxT(
"Geda PCB" );
64 const wxString& aFootprintName,
68 bool aKeepUUID =
false,
71 void FootprintDelete(
const wxString& aLibraryPath,
const wxString& aFootprintName,
90 void validateCache(
const wxString& aLibraryPath,
bool checkModified =
true );
A PLUGIN derivation for saving and loading Geda PCB files.
bool FootprintLibDelete(const wxString &aLibraryPath, const STRING_UTF8_MAP *aProperties=nullptr) override
Delete an existing footprint library and returns true, or if library does not exist returns false,...
void FootprintEnumerate(wxArrayString &aFootprintNames, const wxString &aLibraryPath, bool aBestEfforts, const STRING_UTF8_MAP *aProperties=nullptr) override
Return a list of footprint names contained within the library at aLibraryPath.
void validateCache(const wxString &aLibraryPath, bool checkModified=true)
void init(const STRING_UTF8_MAP *aProperties)
wxString m_error
for throwing exceptions
bool IsFootprintLibWritable(const wxString &aLibraryPath) override
Return true if the library at aLibraryPath is writable.
FOOTPRINT * FootprintLoad(const wxString &aLibraryPath, const wxString &aFootprintName, bool aKeepUUID=false, const STRING_UTF8_MAP *aProperties=nullptr) override
Load a footprint having aFootprintName from the aLibraryPath containing a library format that this PL...
LINE_READER * m_reader
no ownership here.
GPCB_FPL_CACHE * m_cache
Footprint library cache.
const FOOTPRINT * GetEnumeratedFootprint(const wxString &aLibraryPath, const wxString &aFootprintName, const STRING_UTF8_MAP *aProperties=nullptr) override
A version of FootprintLoad() for use after FootprintEnumerate() for more efficient cache management.
wxString m_filename
for saves only, name is in m_reader for loads
const wxString PluginName() const override
Return a brief hard coded name for this PLUGIN.
long long GetLibraryTimestamp(const wxString &aLibraryPath) const override
Generate a timestamp representing all the files in the library (including the library directory).
const FOOTPRINT * getFootprint(const wxString &aLibraryPath, const wxString &aFootprintName, const STRING_UTF8_MAP *aProperties, bool checkModified)
void FootprintDelete(const wxString &aLibraryPath, const wxString &aFootprintName, const STRING_UTF8_MAP *aProperties=nullptr) override
Delete aFootprintName from the library at aLibraryPath.
const STRING_UTF8_MAP * m_props
passed via Save() or Load(), no ownership, may be NULL.
const wxString GetFileExtension() const override
Returns the file extension for the PLUGIN.
An abstract class from which implementation specific LINE_READERs may be derived to read single lines...
A base class that BOARD loading and saving plugins should derive from.
A name/value tuple with unique names and optional values.