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