26 #ifndef FP_LIB_TABLE_H_ 27 #define FP_LIB_TABLE_H_ 46 const wxString& aOptions,
const wxString& aDescr = wxEmptyString ) :
69 void SetType(
const wxString& aType )
override;
101 virtual void Parse( LIB_TABLE_LEXER* aLexer )
override;
180 bool aKeepUUID =
false );
185 bool FootprintExists(
const wxString& aNickname,
const wxString& aFootprintName );
194 const wxString& aFootprintName );
219 bool aOverwrite =
true );
229 void FootprintDelete(
const wxString& aNickname,
const wxString& aFootprintName );
259 bool aKeepUUID =
false );
297 #endif // FP_LIB_TABLE_H_ void setPlugin(PLUGIN *aPlugin)
bool IsFootprintLibWritable(const wxString &aNickname)
Return true if the library given by aNickname is writable.
Hold a record identifying a library accessed by the appropriate plug in object in the LIB_TABLE.
Hold a record identifying a library accessed by the appropriate footprint library PLUGIN object in th...
FOOTPRINT * FootprintLoadWithOptionalNickname(const LIB_ID &aFootprintId, bool aKeepUUID=false)
Load a footprint having aFootprintId with possibly an empty nickname.
FOOTPRINT * FootprintLoad(const wxString &aNickname, const wxString &aFootprintName, bool aKeepUUID=false)
Load a footprint having aFootprintName from the library given by aNickname.
virtual LIB_TABLE_ROW * do_clone() const override
bool operator!=(const FP_LIB_TABLE &r) const
FP_LIB_TABLE GFootprintTable
The global footprint library table.
static const wxString ShowType(PCB_FILE_T aFileType)
Return a brief name for a plugin given aFileType enum.
A logical library item identifier and consists of various portions much like a URI.
void FootprintLibDelete(const wxString &aNickname)
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
long long GenerateTimestamp(const wxString *aNickname)
Generate a hashed timestamp representing the last-mod-times of the library indicated by aNickname,...
Releases a PLUGIN in the context of a potential thrown exception through its destructor.
bool operator!=(const FP_LIB_TABLE_ROW &aRow) const
void FootprintEnumerate(wxArrayString &aFootprintNames, const wxString &aNickname, bool aBestEfforts)
Return a list of footprint names contained within the library given by aNickname.
A factory which returns an instance of a PLUGIN.
static const wxString GlobalPathEnvVariableName()
Return the name of the environment variable used to hold the directory of locally installed "KiCad sp...
virtual void Parse(LIB_TABLE_LEXER *aLexer) override
Parse the #LIB_TABLE_LEXER s-expression library table format into the appropriate LIB_TABLE_ROW objec...
static bool LoadGlobalTable(FP_LIB_TABLE &aTable)
Load the global footprint library table into aTable.
void set(PLUGIN *aPlugin)
void PrefetchLib(const wxString &aNickname)
If possible, prefetches the specified library (e.g.
const FOOTPRINT * GetEnumeratedFootprint(const wxString &aNickname, const wxString &aFootprintName)
A version of FootprintLoad() for use after FootprintEnumerate() for more efficient cache management.
virtual void Format(OUTPUTFORMATTER *aOutput, int aIndentLevel) const override
Generate the table in s-expression format to aOutput with an indentation level of aIndentLevel.
FP_LIB_TABLE_ROW(const FP_LIB_TABLE_ROW &aRow)
bool operator==(const FP_LIB_TABLE &aFpTable) const
void FootprintLibCreate(const wxString &aNickname)
FP_LIB_TABLE(FP_LIB_TABLE *aFallBackTable=nullptr)
Build a footprint library table by pre-pending this table fragment in front of aFallBackTable.
FP_LIB_TABLE_ROW(const wxString &aNick, const wxString &aURI, const wxString &aType, const wxString &aOptions, const wxString &aDescr=wxEmptyString)
SAVE_T
The set of return values from FootprintSave() below.
const FP_LIB_TABLE_ROW * FindRow(const wxString &aNickName, bool aCheckIfEnabled=false)
Return an FP_LIB_TABLE_ROW if aNickName is found in this table or in any chained fall back table frag...
A base class that BOARD loading and saving plugins should derive from.
SAVE_T FootprintSave(const wxString &aNickname, const FOOTPRINT *aFootprint, bool aOverwrite=true)
Write aFootprint to an existing library given by aNickname.
This class builds a wxGridTableBase by wrapping an FP_LIB_TABLE object.
void SetType(const wxString &aType) override
Change the type represented by this row.
void FootprintDelete(const wxString &aNickname, const wxString &aFootprintName)
Delete the aFootprintName from the library given by aNickname.
PCB_FILE_T
The set of file types that the IO_MGR knows about, and for which there has been a plugin written.
bool operator==(const FP_LIB_TABLE_ROW &aRow) const
const wxString GetType() const override
return the type of footprint library table represented by this row.
bool FootprintExists(const wxString &aNickname, const wxString &aFootprintName)
Indicates whether or not the given footprint already exists in the given library.
static wxString GetGlobalTableFileName()
Manage LIB_TABLE_ROW records (rows), and can be searched based on library nickname.