|
KiCad PCB EDA Suite
|
Class to handle modifications to the symbol libraries. More...
#include <symbol_library_manager.h>
Public Member Functions | |
| SYMBOL_LIBRARY_MANAGER (SCH_BASE_FRAME &aFrame) | |
| virtual | ~SYMBOL_LIBRARY_MANAGER () |
| int | GetHash () const |
| bool | HasModifications () const |
| int | GetLibraryHash (const wxString &aLibrary) const |
| Return a library hash value to determine if it has changed. | |
| wxArrayString | GetLibraryNames () const |
| Return the array of library names. | |
| std::list< LIB_SYMBOL * > | EnumerateSymbols (const wxString &aLibrary) const |
| bool | CreateLibrary (const wxString &aFilePath, LIBRARY_TABLE_SCOPE aScope) |
| Create an empty library and adds it to the library table. | |
| bool | AddLibrary (const wxString &aFilePath, LIBRARY_TABLE_SCOPE aScope) |
| Add an existing library. | |
| bool | UpdateSymbol (LIB_SYMBOL *aSymbol, const wxString &aLibrary) |
| Update the symbol buffer with a new version of the symbol. | |
| bool | UpdateSymbolAfterRename (LIB_SYMBOL *aSymbol, const wxString &aOldSymbolName, const wxString &aLibrary) |
| Update the symbol buffer with a new version of the symbol when the name has changed. | |
| bool | UpdateLibraryBuffer (const wxString &aLibrary) |
| Update the library buffer with a new version of the library. | |
| std::vector< wxString > | DropUnmodifiedBuffers (const std::set< wxString > &aKeep={}) |
| Forget the buffers of libraries with no unsaved changes, except those in aKeep, so they are read again from their files, and return those libraries' names. | |
| bool | RemoveSymbol (const wxString &aSymbolName, const wxString &aLibrary) |
| Remove the symbol from the symbol buffer. | |
| LIB_SYMBOL * | GetSymbol (const wxString &aSymbolName, const wxString &aLibrary) const |
| Return either an alias of a working LIB_SYMBOL copy, or alias of the original symbol if there is no working copy. | |
| LIB_SYMBOL * | GetBufferedSymbol (const wxString &aSymbolName, const wxString &aLibrary) |
| Return the symbol copy from the buffer. | |
| SCH_SCREEN * | GetScreen (const wxString &aSymbolName, const wxString &aLibrary) |
| Return the screen used to edit a specific symbol. | |
| SYMBOL_BUFFER * | GetBuffer (const wxString &aSymbolName, const wxString &aLibrary) |
| Return the working buffer holding the symbol/screen pair, or nullptr when none exists. | |
| bool | SymbolExists (const wxString &aSymbolName, const wxString &aLibrary) const |
| Return true if symbol with a specific alias exists in library (either original one or buffered). | |
| bool | SymbolNameInUse (const wxString &aName, const wxString &aLibrary) |
| Return true if the symbol name is already in use in the specified library. | |
| bool | LibraryExists (const wxString &aLibrary, bool aCheckEnabled=false) const |
| Return true if library exists. | |
| bool | IsLibraryLoaded (const wxString &aLibrary) const |
| Return true if the library was successfully loaded. | |
| bool | IsLibraryModified (const wxString &aLibrary) const |
| Return true if library has unsaved modifications. | |
| bool | IsSymbolModified (const wxString &aSymbolName, const wxString &aLibrary) const |
| Return true if symbol has unsaved modifications. | |
| void | SetSymbolModified (const wxString &aSymbolName, const wxString &aLibrary) |
| bool | ClearLibraryModified (const wxString &aLibrary) const |
| Clear the modified flag for all symbols in a library. | |
| bool | IsLibraryReadOnly (const wxString &aLibrary) const |
| Return true if the library is stored in a read-only file. | |
| bool | SaveLibrary (const wxString &aLibrary, const wxString &aFileName, SCH_IO_MGR::SCH_FILE_T aFileType=SCH_IO_MGR::SCH_FILE_T::SCH_LEGACY) |
| Save library to a file, including unsaved changes. | |
| LIB_ID | RevertSymbol (const LIB_ID &aIdToRevert) |
| Revert unsaved changes for a symbol and clear its modified flag. | |
| bool | RevertLibrary (const wxString &aLibrary) |
| Revert unsaved changes for a symbol library. | |
| bool | RevertAll () |
| Revert all pending changes. | |
| wxString | GetUniqueLibraryName () const |
| Return a library name that is not currently in use. | |
| void | GetSymbolNames (const wxString &aLibName, wxArrayString &aSymbolNames, SYMBOL_NAME_FILTER aFilter=SYMBOL_NAME_FILTER::ALL) |
| size_t | GetDerivedSymbolNames (const wxString &aSymbolName, const wxString &aLibraryName, wxArrayString &aList) |
| Fetch all of the symbols derived from a aSymbolName into aList. | |
| bool | HasDerivedSymbols (const wxString &aSymbolName, const wxString &aLibraryName) |
| Check whether any symbol inherits from aSymbolName, without building the list of names. | |
| size_t | GetLibraryCount () const |
Protected Member Functions | |
| virtual void | OnDataChanged () const |
| bool | addLibrary (const wxString &aFilePath, bool aCreate, LIBRARY_TABLE_SCOPE aScope) |
| Helper function to add either existing or create new library. | |
| std::set< LIB_SYMBOL * > | getOriginalSymbols (const wxString &aLibrary) |
| Return a set of LIB_SYMBOL objects belonging to the original library. | |
| LIB_BUFFER & | getLibraryBuffer (const wxString &aLibrary) |
| Return an existing library buffer or creates one to using symbol library table to get the original data. | |
Static Protected Member Functions | |
| static wxString | getLibraryName (const wxString &aFilePath) |
| Extract library name basing on the file name. | |
Protected Attributes | |
| std::map< wxString, LIB_BUFFER > | m_libs |
| The library buffers. | |
| SCH_BASE_FRAME & | m_frame |
| Parent frame. | |
| LIB_LOGGER * | m_logger |
Class to handle modifications to the symbol libraries.
TODO(JE) Library tables - this class probably shouldn't exist anymore
Definition at line 199 of file symbol_library_manager.h.
| SYMBOL_LIBRARY_MANAGER::SYMBOL_LIBRARY_MANAGER | ( | SCH_BASE_FRAME & | aFrame | ) |
Definition at line 49 of file symbol_library_manager.cpp.
References m_frame, and m_logger.
Referenced by LIB_SYMBOL_LIBRARY_MANAGER::LIB_SYMBOL_LIBRARY_MANAGER().
|
virtual |
Definition at line 56 of file symbol_library_manager.cpp.
References m_logger.
|
inline |
Add an existing library.
The library is added to the library table as well.
Definition at line 240 of file symbol_library_manager.h.
References addLibrary().
|
protected |
Helper function to add either existing or create new library.
Definition at line 769 of file symbol_library_manager.cpp.
References _, LIBRARY_MANAGER_ADAPTER::CreateLibrary(), DisplayError(), PGM_BASE::GetLibraryManager(), getLibraryName(), SCH_IO_MGR::GuessPluginTypeFromLibPath(), KICTL_CREATE, LibraryExists(), SYMBOL_LIBRARY_ADAPTER::LoadOne(), m_frame, LIBRARY_ERROR::message, NormalizePath(), OnDataChanged(), Pgm(), LIBRARY_TABLE_ROW::SetNickname(), LIBRARY_TABLE_ROW::SetType(), LIBRARY_TABLE_ROW::SetURI(), SCH_IO_MGR::ShowType(), SYMBOL, PROJECT_SCH::SymbolLibAdapter(), LIBRARY_MANAGER::Table(), table, and IO_ERROR::What().
Referenced by AddLibrary(), and CreateLibrary().
| bool SYMBOL_LIBRARY_MANAGER::ClearLibraryModified | ( | const wxString & | aLibrary | ) | const |
Clear the modified flag for all symbols in a library.
Definition at line 338 of file symbol_library_manager.cpp.
References m_libs, and BASE_SCREEN::SetContentModified().
|
inline |
Create an empty library and adds it to the library table.
The library file is created.
Definition at line 230 of file symbol_library_manager.h.
References addLibrary().
Referenced by SCH_BASE_FRAME::SelectLibrary().
| std::vector< wxString > SYMBOL_LIBRARY_MANAGER::DropUnmodifiedBuffers | ( | const std::set< wxString > & | aKeep = {} | ) |
Forget the buffers of libraries with no unsaved changes, except those in aKeep, so they are read again from their files, and return those libraries' names.
Definition at line 923 of file symbol_library_manager.cpp.
References m_libs.
| std::list< LIB_SYMBOL * > SYMBOL_LIBRARY_MANAGER::EnumerateSymbols | ( | const wxString & | aLibrary | ) | const |
Definition at line 371 of file symbol_library_manager.cpp.
References SYMBOL_LIBRARY_ADAPTER::GetSymbols(), m_frame, m_libs, and PROJECT_SCH::SymbolLibAdapter().
| SYMBOL_BUFFER * SYMBOL_LIBRARY_MANAGER::GetBuffer | ( | const wxString & | aSymbolName, |
| const wxString & | aLibrary ) |
Return the working buffer holding the symbol/screen pair, or nullptr when none exists.
The manager retains ownership.
Definition at line 467 of file symbol_library_manager.cpp.
References LIB_BUFFER::GetBuffer(), getLibraryBuffer(), and LibraryExists().
| LIB_SYMBOL * SYMBOL_LIBRARY_MANAGER::GetBufferedSymbol | ( | const wxString & | aSymbolName, |
| const wxString & | aLibrary ) |
Return the symbol copy from the buffer.
In case it does not exist yet, the copy is created. SYMBOL_LIBRARY_MANAGER retains the ownership.
Definition at line 393 of file symbol_library_manager.cpp.
References _, LIB_BUFFER::CreateBuffer(), DisplayErrorMessage(), getLibraryBuffer(), LIB_SYMBOL::GetName(), LIB_SYMBOL::GetParent(), LIB_BUFFER::GetSymbol(), LIB_SYMBOL::IsDerived(), SYMBOL_LIBRARY_ADAPTER::LoadSymbol(), m_frame, PROJECT_SCH::SymbolLibAdapter(), THROW_IO_ERROR, and IO_ERROR::What().
Referenced by SYMBOL_EDITOR_EDIT_TOOL::editSymbolPropertiesFromLibrary(), SYMBOL_EDITOR_CONTROL::FlattenSymbol(), and SYMBOL_EDITOR_CONTROL::RenameSymbol().
| size_t SYMBOL_LIBRARY_MANAGER::GetDerivedSymbolNames | ( | const wxString & | aSymbolName, |
| const wxString & | aLibraryName, | ||
| wxArrayString & | aList ) |
Fetch all of the symbols derived from a aSymbolName into aList.
Definition at line 738 of file symbol_library_manager.cpp.
References LIB_BUFFER::GetDerivedSymbolNames(), and getLibraryBuffer().
| int SYMBOL_LIBRARY_MANAGER::GetHash | ( | ) | const |
Definition at line 74 of file symbol_library_manager.cpp.
References SYMBOL_LIBRARY_ADAPTER::GetModifyHash(), m_frame, and PROJECT_SCH::SymbolLibAdapter().
Referenced by RevertAll().
|
protected |
Return an existing library buffer or creates one to using symbol library table to get the original data.
Definition at line 856 of file symbol_library_manager.cpp.
References LIB_BUFFER::CreateBuffer(), getOriginalSymbols(), LIB_BUFFER::GetSymbol(), and m_libs.
Referenced by GetBuffer(), GetBufferedSymbol(), GetDerivedSymbolNames(), GetSymbolNames(), HasDerivedSymbols(), RemoveSymbol(), UpdateLibraryBuffer(), UpdateSymbol(), and UpdateSymbolAfterRename().
| size_t SYMBOL_LIBRARY_MANAGER::GetLibraryCount | ( | ) | const |
Definition at line 755 of file symbol_library_manager.cpp.
References LIBRARY_MANAGER_ADAPTER::GetLibraryNames(), m_frame, and PROJECT_SCH::SymbolLibAdapter().
| int SYMBOL_LIBRARY_MANAGER::GetLibraryHash | ( | const wxString & | aLibrary | ) | const |
Return a library hash value to determine if it has changed.
For buffered libraries, it returns a number corresponding to the number of modifications. For original libraries, hash is computed basing on the library URI. Returns -1 when the requested library does not exist.
Definition at line 81 of file symbol_library_manager.cpp.
References FN_NORMALIZE_FLAGS, LIBRARY_MANAGER::GetFullURI(), PGM_BASE::GetLibraryManager(), FILEEXT::KiCadSymbolLibFileExtension, m_libs, Pgm(), SYMBOL, and KIPLATFORM::IO::TimestampDir().
|
staticprotected |
Extract library name basing on the file name.
Definition at line 762 of file symbol_library_manager.cpp.
Referenced by addLibrary().
| wxArrayString SYMBOL_LIBRARY_MANAGER::GetLibraryNames | ( | ) | const |
Return the array of library names.
Definition at line 117 of file symbol_library_manager.cpp.
References PGM_BASE::GetLibraryManager(), IGNORE_CASE, Pgm(), res, LIBRARY_MANAGER::Rows(), SCH_IO_MGR::ShowType(), StrNumCmp(), and SYMBOL.
|
protected |
Return a set of LIB_SYMBOL objects belonging to the original library.
Definition at line 842 of file symbol_library_manager.cpp.
References SYMBOL_LIBRARY_ADAPTER::GetSymbols(), LibraryExists(), m_frame, and PROJECT_SCH::SymbolLibAdapter().
Referenced by getLibraryBuffer(), and SaveLibrary().
| SCH_SCREEN * SYMBOL_LIBRARY_MANAGER::GetScreen | ( | const wxString & | aSymbolName, |
| const wxString & | aLibrary ) |
Return the screen used to edit a specific symbol.
SYMBOL_LIBRARY_MANAGER retains the ownership.
Definition at line 455 of file symbol_library_manager.cpp.
References LIB_BUFFER::GetBuffer(), and m_libs.
| LIB_SYMBOL * SYMBOL_LIBRARY_MANAGER::GetSymbol | ( | const wxString & | aSymbolName, |
| const wxString & | aLibrary ) const |
Return either an alias of a working LIB_SYMBOL copy, or alias of the original symbol if there is no working copy.
Definition at line 618 of file symbol_library_manager.cpp.
References _, DisplayErrorMessage(), SYMBOL_LIBRARY_ADAPTER::LoadSymbol(), m_frame, m_libs, PROJECT_SCH::SymbolLibAdapter(), and IO_ERROR::What().
Referenced by CheckSavingIntoOwnInheritance(), SYMBOL_EDITOR_CONTROL::CompareLibraryWithFile(), LIB_SYMBOL_LIBRARY_MANAGER::CreateNewSymbol(), and SYMBOL_EDITOR_CONTROL::Init().
| void SYMBOL_LIBRARY_MANAGER::GetSymbolNames | ( | const wxString & | aLibName, |
| wxArrayString & | aSymbolNames, | ||
| SYMBOL_NAME_FILTER | aFilter = SYMBOL_NAME_FILTER::ALL ) |
Definition at line 729 of file symbol_library_manager.cpp.
References getLibraryBuffer(), and LIB_BUFFER::GetSymbolNames().
Referenced by SYMBOL_EDITOR_CONTROL::CompareLibraryWithFile(), DIALOG_LIB_FIELDS_TABLE::loadSymbols(), and SymbolNameInUse().
| wxString SYMBOL_LIBRARY_MANAGER::GetUniqueLibraryName | ( | ) | const |
Return a library name that is not currently in use.
Used for generating names for new libraries.
Definition at line 709 of file symbol_library_manager.cpp.
References LibraryExists(), and name.
| bool SYMBOL_LIBRARY_MANAGER::HasDerivedSymbols | ( | const wxString & | aSymbolName, |
| const wxString & | aLibraryName ) |
Check whether any symbol inherits from aSymbolName, without building the list of names.
Definition at line 747 of file symbol_library_manager.cpp.
References getLibraryBuffer(), and LIB_BUFFER::HasDerivedSymbols().
Referenced by SYMBOL_EDITOR_CONTROL::Init().
| bool SYMBOL_LIBRARY_MANAGER::HasModifications | ( | ) | const |
Definition at line 62 of file symbol_library_manager.cpp.
| bool SYMBOL_LIBRARY_MANAGER::IsLibraryLoaded | ( | const wxString & | aLibrary | ) | const |
Return true if the library was successfully loaded.
Definition at line 364 of file symbol_library_manager.cpp.
References LIBRARY_MANAGER_ADAPTER::IsLibraryLoaded(), m_frame, and PROJECT_SCH::SymbolLibAdapter().
| bool SYMBOL_LIBRARY_MANAGER::IsLibraryModified | ( | const wxString & | aLibrary | ) | const |
Return true if library has unsaved modifications.
Definition at line 301 of file symbol_library_manager.cpp.
References m_libs.
Referenced by SYMBOL_EDITOR_CONTROL::Init().
| bool SYMBOL_LIBRARY_MANAGER::IsLibraryReadOnly | ( | const wxString & | aLibrary | ) | const |
Return true if the library is stored in a read-only file.
Definition at line 357 of file symbol_library_manager.cpp.
References SYMBOL_LIBRARY_ADAPTER::IsSymbolLibWritable(), m_frame, and PROJECT_SCH::SymbolLibAdapter().
Referenced by SYMBOL_EDITOR_CONTROL::AddSymbol(), SYMBOL_EDITOR_CONTROL::CutCopyDelete(), SYMBOL_EDITOR_CONTROL::DuplicateSymbol(), and SYMBOL_EDIT_FRAME_CONTEXT::SaveSymbol().
| bool SYMBOL_LIBRARY_MANAGER::IsSymbolModified | ( | const wxString & | aSymbolName, |
| const wxString & | aLibrary ) const |
Return true if symbol has unsaved modifications.
Definition at line 308 of file symbol_library_manager.cpp.
References LIB_BUFFER::GetBuffer(), and m_libs.
| bool SYMBOL_LIBRARY_MANAGER::LibraryExists | ( | const wxString & | aLibrary, |
| bool | aCheckEnabled = false ) const |
Return true if library exists.
If aCheckEnabled is set, then the library must also be enabled in the library table.
Definition at line 695 of file symbol_library_manager.cpp.
References LIBRARY_MANAGER_ADAPTER::HasLibrary(), m_frame, m_libs, and PROJECT_SCH::SymbolLibAdapter().
Referenced by addLibrary(), SYMBOL_EDITOR_CONTROL::AddSymbol(), SYMBOL_EDITOR_CONTROL::CutCopyDelete(), SYMBOL_EDITOR_CONTROL::DuplicateSymbol(), GetBuffer(), getOriginalSymbols(), GetUniqueLibraryName(), and SYMBOL_EDITOR_CONTROL::RenameSymbol().
|
inlineprotectedvirtual |
Reimplemented in LIB_SYMBOL_LIBRARY_MANAGER.
Definition at line 409 of file symbol_library_manager.h.
Referenced by addLibrary(), RemoveSymbol(), RevertAll(), RevertLibrary(), RevertSymbol(), and UpdateSymbolAfterRename().
| bool SYMBOL_LIBRARY_MANAGER::RemoveSymbol | ( | const wxString & | aSymbolName, |
| const wxString & | aLibrary ) |
Remove the symbol from the symbol buffer.
It is required to save the library to have the symbol removed in the schematic editor.
Definition at line 603 of file symbol_library_manager.cpp.
References LIB_BUFFER::DeleteBuffer(), LIB_BUFFER::GetBuffer(), getLibraryBuffer(), and OnDataChanged().
Referenced by SYMBOL_EDITOR_CONTROL::RenameSymbol().
| bool SYMBOL_LIBRARY_MANAGER::RevertAll | ( | ) |
Revert all pending changes.
Definition at line 568 of file symbol_library_manager.cpp.
References GetHash(), m_libs, and OnDataChanged().
| bool SYMBOL_LIBRARY_MANAGER::RevertLibrary | ( | const wxString & | aLibrary | ) |
Revert unsaved changes for a symbol library.
Definition at line 554 of file symbol_library_manager.cpp.
References m_libs, and OnDataChanged().
Revert unsaved changes for a symbol and clear its modified flag.
Definition at line 526 of file symbol_library_manager.cpp.
References LIB_ID::GetLibItemName(), LIB_ID::GetLibNickname(), LIB_SYMBOL::GetName(), m_libs, OnDataChanged(), UpdateSymbolAfterRename(), and UTF8::wx_str().
| bool SYMBOL_LIBRARY_MANAGER::SaveLibrary | ( | const wxString & | aLibrary, |
| const wxString & | aFileName, | ||
| SCH_IO_MGR::SCH_FILE_T | aFileType = SCH_IO_MGR::SCH_FILE_T::SCH_LEGACY ) |
Save library to a file, including unsaved changes.
| aLibrary | is the library name. |
| aFileName | is the target file name. |
| aFileType | is the plugin type used to save the library. |
Definition at line 141 of file symbol_library_manager.cpp.
References _, EMBEDDED_FILES::AddFile(), LIB_BUFFER::ClearAddedAndDeletedBufferLists(), EMBEDDED_FILES::ClearEmbeddedFiles(), EMBEDDED_FILES::EmbeddedFileMap(), FN_NORMALIZE_FLAGS, EMBEDDED_FILES::GetAreFontsEmbedded(), LIB_BUFFER::GetBuffers(), LIB_BUFFER::GetDeletedBuffers(), EMBEDDED_FILES::GetFileAddedCallback(), LIBRARY_MANAGER::GetFullURI(), PGM_BASE::GetLibraryManager(), LIB_SYMBOL::GetName(), getOriginalSymbols(), m_libs, name, Pgm(), SCH_IO_KICAD_LEGACY::PropBuffering, res, LIB_BUFFER::SaveBuffer(), LIB_BUFFER::SaveModifiedBuffers(), EMBEDDED_FILES::SetAreFontsEmbedded(), EMBEDDED_FILES::SetFileAddedCallback(), SYMBOL, UnescapeString(), and IO_ERROR::What().
| void SYMBOL_LIBRARY_MANAGER::SetSymbolModified | ( | const wxString & | aSymbolName, |
| const wxString & | aLibrary ) |
Definition at line 322 of file symbol_library_manager.cpp.
References LIB_BUFFER::GetBuffer(), and m_libs.
Referenced by SYMBOL_EDITOR_EDIT_TOOL::editSymbolPropertiesFromLibrary(), and SYMBOL_EDITOR_CONTROL::RenameSymbol().
| bool SYMBOL_LIBRARY_MANAGER::SymbolExists | ( | const wxString & | aSymbolName, |
| const wxString & | aLibrary ) const |
Return true if symbol with a specific alias exists in library (either original one or buffered).
Definition at line 653 of file symbol_library_manager.cpp.
References SYMBOL_LIBRARY_ADAPTER::LoadSymbol(), m_frame, m_libs, and PROJECT_SCH::SymbolLibAdapter().
Referenced by DIALOG_IMPORT_SYMBOL_SELECT::loadSymbols(), SYMBOL_EDITOR_CONTROL::RenameSymbol(), and SYMBOL_EDIT_FRAME_CONTEXT::RevertSymbol().
| bool SYMBOL_LIBRARY_MANAGER::SymbolNameInUse | ( | const wxString & | aName, |
| const wxString & | aLibrary ) |
Return true if the symbol name is already in use in the specified library.
Definition at line 676 of file symbol_library_manager.cpp.
References GetSymbolNames(), and UnescapeString().
Referenced by CheckForParentalChainConflicts(), CheckSavingIntoOwnInheritance(), and SYMBOL_EDITOR_CONTROL::RenameSymbol().
| bool SYMBOL_LIBRARY_MANAGER::UpdateLibraryBuffer | ( | const wxString & | aLibrary | ) |
Update the library buffer with a new version of the library.
Definition at line 899 of file symbol_library_manager.cpp.
References _, getLibraryBuffer(), and m_libs.
| bool SYMBOL_LIBRARY_MANAGER::UpdateSymbol | ( | LIB_SYMBOL * | aSymbol, |
| const wxString & | aLibrary ) |
Update the symbol buffer with a new version of the symbol.
The library buffer creates a copy of the symbol.
It is required to save the library to use the updated symbol in the schematic editor.
Definition at line 479 of file symbol_library_manager.cpp.
References LIB_BUFFER::CreateBuffer(), LIB_BUFFER::GetBuffer(), LIB_SYMBOL::GetLibId(), LIB_ID::GetLibItemName(), getLibraryBuffer(), LIB_SYMBOL::GetName(), and LIB_SYMBOL::SetLibId().
Referenced by LIB_SYMBOL_LIBRARY_MANAGER::CreateNewSymbol(), SYMBOL_EDITOR_EDIT_TOOL::editSymbolPropertiesFromLibrary(), and SYMBOL_EDITOR_CONTROL::FlattenSymbol().
| bool SYMBOL_LIBRARY_MANAGER::UpdateSymbolAfterRename | ( | LIB_SYMBOL * | aSymbol, |
| const wxString & | aOldSymbolName, | ||
| const wxString & | aLibrary ) |
Update the symbol buffer with a new version of the symbol when the name has changed.
The old library buffer will be deleted and a new one created with the new name.
Definition at line 511 of file symbol_library_manager.cpp.
References LIB_BUFFER::GetBuffer(), getLibraryBuffer(), OnDataChanged(), and LIB_BUFFER::UpdateBuffer().
Referenced by SYMBOL_EDITOR_EDIT_TOOL::editSymbolPropertiesFromLibrary(), SYMBOL_EDITOR_CONTROL::RenameSymbol(), and RevertSymbol().
|
protected |
Parent frame.
Definition at line 430 of file symbol_library_manager.h.
Referenced by addLibrary(), EnumerateSymbols(), GetBufferedSymbol(), GetHash(), GetLibraryCount(), getOriginalSymbols(), GetSymbol(), IsLibraryLoaded(), IsLibraryReadOnly(), LibraryExists(), LIB_SYMBOL_LIBRARY_MANAGER::OnDataChanged(), SYMBOL_LIBRARY_MANAGER(), and SymbolExists().
|
protected |
The library buffers.
Definition at line 429 of file symbol_library_manager.h.
Referenced by ClearLibraryModified(), DropUnmodifiedBuffers(), EnumerateSymbols(), getLibraryBuffer(), GetLibraryHash(), GetScreen(), GetSymbol(), HasModifications(), IsLibraryModified(), IsSymbolModified(), LibraryExists(), RevertAll(), RevertLibrary(), RevertSymbol(), SaveLibrary(), SetSymbolModified(), SymbolExists(), and UpdateLibraryBuffer().
|
protected |
Definition at line 431 of file symbol_library_manager.h.
Referenced by SYMBOL_LIBRARY_MANAGER(), LIB_SYMBOL_LIBRARY_MANAGER::Sync(), and ~SYMBOL_LIBRARY_MANAGER().