21#ifndef SCH_IO_DATABASE_H_
22#define SCH_IO_DATABASE_H_
58 const wxString& aLibraryPath,
59 const std::map<std::string, UTF8>* aProperties =
nullptr )
override;
62 const wxString& aLibraryPath,
63 const std::map<std::string, UTF8>* aProperties =
nullptr )
override;
66 const std::map<std::string, UTF8>* aProperties =
nullptr )
override;
101 static std::optional<bool>
boolFromAny(
const std::any& aVal );
108 std::unique_ptr<DATABASE_CONNECTION>
m_conn;
std::map< std::string, std::any > ROW
Define a library symbol object.
A KiCad database library provides both symbol and footprint metadata, so there are "shim" plugins on ...
void EnumerateSymbolLib(wxArrayString &aSymbolNameList, const wxString &aLibraryPath, const std::map< std::string, UTF8 > *aProperties=nullptr) override
Populate a list of LIB_SYMBOL alias names contained within the library aLibraryPath.
DATABASE_LIB_SETTINGS * Settings() const
std::unique_ptr< DATABASE_CONNECTION > m_conn
Generally will be null if no valid connection is established.
void SetLibTable(SYMBOL_LIB_TABLE *aTable) override
Some library plugins need to have access to their parent library table.
void GetDefaultSymbolFields(std::vector< wxString > &aNames) override
Retrieves a list of (custom) field names that should be shown by default for this library in the symb...
void ensureSettings(const wxString &aSettingsPath)
bool IsLibraryWritable(const wxString &aLibraryPath) override
Return true if the library at aLibraryPath is writable.
bool SupportsSubLibraries() const override
bool TestConnection(wxString *aErrorMsg=nullptr)
std::map< wxString, std::unique_ptr< LIB_SYMBOL > > m_nameToSymbolcache
SYMBOL_LIB_TABLE * m_libTable
std::set< wxString > m_defaultShownFields
virtual ~SCH_IO_DATABASE()
void GetSubLibraryNames(std::vector< wxString > &aNames) override
Retrieves a list of sub-libraries in this library.
std::unique_ptr< DATABASE_LIB_SETTINGS > m_settings
static std::optional< bool > boolFromAny(const std::any &aVal)
const IO_BASE::IO_FILE_DESC GetLibraryDesc() const override
Get the descriptor for the library container that this IO plugin operates on.
long long m_cacheTimestamp
void GetAvailableSymbolFields(std::vector< wxString > &aNames) override
Retrieves a list of (custom) field names that are present on symbols in this library.
int GetModifyHash() const override
Return the modification hash from the library cache.
std::unique_ptr< LIB_SYMBOL > loadSymbolFromRow(const wxString &aSymbolName, const DATABASE_LIB_TABLE &aTable, const DATABASE_CONNECTION::ROW &aRow)
std::set< wxString > m_customFields
LIB_SYMBOL * LoadSymbol(const wxString &aLibraryPath, const wxString &aAliasName, const std::map< std::string, UTF8 > *aProperties=nullptr) override
Load a LIB_SYMBOL object having aPartName from the aLibraryPath containing a library format that this...
Base class that schematic file and library loading and saving plugins should derive from.
static const std::string DatabaseLibraryFileExtension
A database library table will be mapped to a sub-library provided by the database library entry in th...
Container that describes file type info.
Definition of file extensions used in Kicad.