KiCad PCB EDA Suite
|
A cache assistant for Altium symbol libraries. More...
#include <sch_io_altium_lib_cache.h>
Public Member Functions | |
SCH_IO_ALTIUM_LIB_CACHE (const wxString &aLibraryPath) | |
virtual | ~SCH_IO_ALTIUM_LIB_CACHE () |
void | Load () override |
void | IncrementModifyHash () |
int | GetModifyHash () |
virtual void | Save (const std::optional< bool > &aOpt=std::nullopt) |
Save the entire library to file m_libFileName;. | |
virtual void | AddSymbol (const LIB_SYMBOL *aSymbol) |
virtual void | DeleteSymbol (const wxString &aName)=0 |
virtual LIB_SYMBOL * | GetSymbol (const wxString &aName) |
wxFileName | GetRealFile () const |
wxDateTime | GetLibModificationTime () |
bool | IsFile (const wxString &aFullPathAndFileName) const |
bool | IsFileChanged () const |
void | SetModified (bool aModified=true) |
wxString | GetLogicalName () const |
void | SetFileName (const wxString &aFileName) |
wxString | GetFileName () const |
const LIB_SYMBOL_MAP & | GetSymbolMap () const |
Protected Member Functions | |
LIB_SYMBOL * | removeSymbol (LIB_SYMBOL *aAlias) |
Protected Attributes | |
int | m_modHash |
std::mutex | m_modHashMutex |
wxString | m_fileName |
wxFileName | m_libFileName |
wxDateTime | m_fileModTime |
LIB_SYMBOL_MAP | m_symbols |
bool | m_isWritable |
bool | m_isModified |
SCH_LIB_TYPE | m_libType |
Private Attributes | |
friend | SCH_IO_KICAD_SEXPR |
A cache assistant for Altium symbol libraries.
Definition at line 32 of file sch_io_altium_lib_cache.h.
SCH_IO_ALTIUM_LIB_CACHE::SCH_IO_ALTIUM_LIB_CACHE | ( | const wxString & | aLibraryPath | ) |
|
virtual |
|
virtualinherited |
Definition at line 161 of file sch_io_lib_cache.cpp.
References LIB_SYMBOL::GetName(), SCH_IO_LIB_CACHE::IncrementModifyHash(), SCH_IO_LIB_CACHE::m_isModified, SCH_IO_LIB_CACHE::m_symbols, name, and SCH_IO_LIB_CACHE::removeSymbol().
Referenced by SCH_IO_KICAD_LEGACY::SaveSymbol(), and SCH_IO_KICAD_SEXPR::SaveSymbol().
|
pure virtualinherited |
Implemented in SCH_IO_KICAD_LEGACY_LIB_CACHE, and SCH_IO_KICAD_SEXPR_LIB_CACHE.
|
inlineinherited |
Definition at line 88 of file sch_io_lib_cache.h.
References SCH_IO_LIB_CACHE::m_libFileName.
Referenced by SCH_IO_KICAD_LEGACY::SaveLibrary(), and SCH_IO_KICAD_SEXPR::SaveLibrary().
|
inherited |
Definition at line 65 of file sch_io_lib_cache.cpp.
References SCH_IO_LIB_CACHE::GetRealFile(), and SCH_IO_LIB_CACHE::m_isWritable.
Referenced by SCH_IO_KICAD_LEGACY_LIB_CACHE::Load(), and SCH_IO_KICAD_SEXPR_LIB_CACHE::Load().
|
inlineinherited |
Definition at line 84 of file sch_io_lib_cache.h.
References SCH_IO_LIB_CACHE::m_libFileName.
|
inlineinherited |
Definition at line 52 of file sch_io_lib_cache.h.
References SCH_IO_LIB_CACHE::m_modHash, and SCH_IO_LIB_CACHE::m_modHashMutex.
Referenced by SCH_IO_KICAD_LEGACY::GetModifyHash(), and SCH_IO_KICAD_SEXPR::GetModifyHash().
|
inherited |
Definition at line 55 of file sch_io_lib_cache.cpp.
References SCH_IO_LIB_CACHE::m_libFileName, and WX_FILENAME::ResolvePossibleSymlinks().
Referenced by SCH_IO_LIB_CACHE::GetLibModificationTime(), SCH_IO_LIB_CACHE::IsFileChanged(), SCH_IO_KICAD_LEGACY_LIB_CACHE::Save(), and SCH_IO_KICAD_SEXPR_LIB_CACHE::Save().
|
virtualinherited |
Definition at line 178 of file sch_io_lib_cache.cpp.
References SCH_IO_LIB_CACHE::m_symbols.
Referenced by EESCHEMA_JOBS_HANDLER::JobSymExportSvg().
|
inlineinherited |
Definition at line 90 of file sch_io_lib_cache.h.
References SCH_IO_LIB_CACHE::m_symbols.
Referenced by EESCHEMA_JOBS_HANDLER::JobSymExportSvg().
|
inlineinherited |
Definition at line 46 of file sch_io_lib_cache.h.
References SCH_IO_LIB_CACHE::m_modHash, and SCH_IO_LIB_CACHE::m_modHashMutex.
Referenced by SCH_IO_LIB_CACHE::AddSymbol(), SCH_IO_KICAD_LEGACY_LIB_CACHE::DeleteSymbol(), SCH_IO_KICAD_SEXPR_LIB_CACHE::DeleteSymbol(), SCH_IO_KICAD_LEGACY_LIB_CACHE::Load(), SCH_IO_KICAD_SEXPR_LIB_CACHE::Load(), and SCH_IO_LIB_CACHE::removeSymbol().
|
inherited |
Definition at line 77 of file sch_io_lib_cache.cpp.
References SCH_IO_LIB_CACHE::m_fileName.
Referenced by SCH_IO_KICAD_LEGACY::cacheLib(), SCH_IO_KICAD_SEXPR::cacheLib(), SCH_IO_KICAD_LEGACY::DeleteLibrary(), SCH_IO_KICAD_SEXPR::DeleteLibrary(), SCH_IO_KICAD_LEGACY::SaveLibrary(), and SCH_IO_KICAD_SEXPR::SaveLibrary().
|
inherited |
Definition at line 83 of file sch_io_lib_cache.cpp.
References SCH_IO_LIB_CACHE::GetRealFile(), and SCH_IO_LIB_CACHE::m_fileModTime.
Referenced by SCH_IO_KICAD_LEGACY::cacheLib(), and SCH_IO_KICAD_SEXPR::cacheLib().
|
overridevirtual |
Implements SCH_IO_LIB_CACHE.
|
protectedinherited |
Definition at line 94 of file sch_io_lib_cache.cpp.
References LIB_SYMBOL::AddDrawItem(), EDA_ITEM::Clone(), LIB_SYMBOL::FindField(), SCH_FIELD::GetCanonicalName(), LIB_SYMBOL::GetDrawItems(), LIB_SYMBOL::GetName(), SCH_IO_LIB_CACHE::IncrementModifyHash(), LIB_SYMBOL::IsRoot(), SCH_IO_LIB_CACHE::m_isModified, SCH_IO_LIB_CACHE::m_libFileName, SCH_IO_LIB_CACHE::m_symbols, SCH_FIELD_T, EDA_ITEM::SetParent(), and LIB_SYMBOL::SharedPtr().
Referenced by SCH_IO_LIB_CACHE::AddSymbol().
|
virtualinherited |
Save the entire library to file m_libFileName;.
Reimplemented in SCH_IO_KICAD_LEGACY_LIB_CACHE, and SCH_IO_KICAD_SEXPR_LIB_CACHE.
Definition at line 49 of file sch_io_lib_cache.cpp.
|
inlineinherited |
Definition at line 86 of file sch_io_lib_cache.h.
References SCH_IO_LIB_CACHE::m_libFileName.
Referenced by EESCHEMA_JOBS_HANDLER::JobSymUpgrade(), SCH_IO_KICAD_LEGACY::SaveLibrary(), and SCH_IO_KICAD_SEXPR::SaveLibrary().
|
inlineinherited |
Definition at line 82 of file sch_io_lib_cache.h.
References SCH_IO_LIB_CACHE::m_isModified.
Referenced by SCH_IO_KICAD_LEGACY::CreateLibrary(), SCH_IO_KICAD_SEXPR::CreateLibrary(), EESCHEMA_JOBS_HANDLER::JobSymUpgrade(), SCH_IO_KICAD_LEGACY::SaveLibrary(), and SCH_IO_KICAD_SEXPR::SaveLibrary().
|
protectedinherited |
Definition at line 100 of file sch_io_lib_cache.h.
Referenced by SCH_IO_LIB_CACHE::IsFileChanged(), SCH_IO_KICAD_LEGACY_LIB_CACHE::Load(), SCH_IO_KICAD_SEXPR_LIB_CACHE::Load(), SCH_IO_KICAD_LEGACY_LIB_CACHE::Save(), and SCH_IO_KICAD_SEXPR_LIB_CACHE::Save().
|
protectedinherited |
Definition at line 98 of file sch_io_lib_cache.h.
Referenced by SCH_IO_LIB_CACHE::IsFile().
|
protectedinherited |
Definition at line 103 of file sch_io_lib_cache.h.
Referenced by SCH_IO_LIB_CACHE::AddSymbol(), SCH_IO_KICAD_LEGACY_LIB_CACHE::DeleteSymbol(), SCH_IO_KICAD_SEXPR_LIB_CACHE::DeleteSymbol(), SCH_IO_LIB_CACHE::removeSymbol(), SCH_IO_KICAD_LEGACY_LIB_CACHE::Save(), SCH_IO_KICAD_SEXPR_LIB_CACHE::Save(), and SCH_IO_LIB_CACHE::SetModified().
|
protectedinherited |
Definition at line 102 of file sch_io_lib_cache.h.
Referenced by SCH_IO_LIB_CACHE::GetLibModificationTime().
|
protectedinherited |
Definition at line 99 of file sch_io_lib_cache.h.
Referenced by SCH_IO_KICAD_LEGACY_LIB_CACHE::DeleteSymbol(), SCH_IO_KICAD_SEXPR_LIB_CACHE::DeleteSymbol(), SCH_IO_LIB_CACHE::GetFileName(), SCH_IO_LIB_CACHE::GetLogicalName(), SCH_IO_LIB_CACHE::GetRealFile(), SCH_IO_KICAD_LEGACY_LIB_CACHE::Load(), SCH_IO_KICAD_SEXPR_LIB_CACHE::Load(), SCH_IO_KICAD_LEGACY_LIB_CACHE::loadDocs(), SCH_IO_LIB_CACHE::removeSymbol(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveDocFile(), and SCH_IO_LIB_CACHE::SetFileName().
|
protectedinherited |
Definition at line 104 of file sch_io_lib_cache.h.
Referenced by SCH_IO_KICAD_LEGACY_LIB_CACHE::Load(), and SCH_IO_LIB_CACHE::SCH_IO_LIB_CACHE().
|
protectedinherited |
Definition at line 95 of file sch_io_lib_cache.h.
Referenced by SCH_IO_LIB_CACHE::GetModifyHash(), and SCH_IO_LIB_CACHE::IncrementModifyHash().
|
protectedinherited |
Definition at line 96 of file sch_io_lib_cache.h.
Referenced by SCH_IO_LIB_CACHE::GetModifyHash(), and SCH_IO_LIB_CACHE::IncrementModifyHash().
|
protectedinherited |
Definition at line 101 of file sch_io_lib_cache.h.
Referenced by SCH_IO_LIB_CACHE::AddSymbol(), SCH_IO_KICAD_LEGACY_LIB_CACHE::DeleteSymbol(), SCH_IO_KICAD_SEXPR_LIB_CACHE::DeleteSymbol(), SCH_IO_KICAD_LEGACY::EnumerateSymbolLib(), SCH_IO_KICAD_SEXPR::EnumerateSymbolLib(), SCH_IO_KICAD_SEXPR::GetAvailableSymbolFields(), SCH_IO_LIB_CACHE::GetSymbol(), SCH_IO_LIB_CACHE::GetSymbolMap(), SCH_IO_KICAD_LEGACY_LIB_CACHE::Load(), SCH_IO_KICAD_SEXPR_LIB_CACHE::Load(), SCH_IO_KICAD_LEGACY_LIB_CACHE::loadDocs(), SCH_IO_KICAD_LEGACY::LoadSymbol(), SCH_IO_KICAD_SEXPR::LoadSymbol(), SCH_IO_LIB_CACHE::removeSymbol(), SCH_IO_KICAD_LEGACY_LIB_CACHE::Save(), SCH_IO_KICAD_SEXPR_LIB_CACHE::Save(), SCH_IO_KICAD_LEGACY_LIB_CACHE::saveDocFile(), and SCH_IO_LIB_CACHE::~SCH_IO_LIB_CACHE().
|
private |
Definition at line 41 of file sch_io_altium_lib_cache.h.