26#ifndef FP_LIB_TABLE_H_
27#define FP_LIB_TABLE_H_
45 const wxString& aOptions,
const wxString& aDescr = wxEmptyString ) :
68 void SetType(
const wxString& aType )
override;
103 virtual void Parse( LIB_TABLE_LEXER* aLexer )
override;
182 bool aKeepUUID =
false );
187 bool FootprintExists(
const wxString& aNickname,
const wxString& aFootprintName );
196 const wxString& aFootprintName );
221 bool aOverwrite =
true );
231 void FootprintDelete(
const wxString& aNickname,
const wxString& aFootprintName );
261 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 t...
void setPlugin(PCB_IO *aPlugin)
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.
IO_RELEASER< PCB_IO > plugin
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
PCB_IO_MGR::PCB_FILE_T GetFileType()
PCB_IO_MGR::PCB_FILE_T type
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.
PROJECT::ELEM ProjectElementType() override
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 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.
A factory which returns an instance of a #PLUGIN.
PCB_FILE_T
The set of file types that the PCB_IO_MGR knows about, and for which there has been a plugin written,...
static const wxString ShowType(PCB_FILE_T aFileType)
Return a brief name for a plugin given aFileType enum.
A base class that BOARD loading and saving plugins should derive from.
ELEM
The set of #_ELEMs that a PROJECT can hold.
FP_LIB_TABLE GFootprintTable
The global footprint library table.
std::unique_ptr< T > IO_RELEASER
Helper to hold and release an IO_BASE object when exceptions are thrown.