KiCad PCB EDA Suite
Loading...
Searching...
No Matches
LIB_SYMBOL_LIBRARY_MANAGER Class Reference

Symbol library management helper that is specific to the symbol library editor frame. More...

#include <lib_symbol_library_manager.h>

Inheritance diagram for LIB_SYMBOL_LIBRARY_MANAGER:
SYMBOL_LIBRARY_MANAGER

Public Member Functions

 LIB_SYMBOL_LIBRARY_MANAGER (SYMBOL_EDIT_FRAME &aFrame)
 
void Sync (const wxString &aForceRefresh, std::function< void(int, int, const wxString &)> aProgressCallback)
 Updates the SYMBOL_LIBRARY_MANAGER data to synchronize with Symbol Library Table.
 
bool CreateNewSymbol (const wxString &aLibrary, const NEW_SYMBOL_PROPERTIES &aProps)
 
wxObjectDataPtr< LIB_TREE_MODEL_ADAPTER > & GetAdapter ()
 Return the adapter object that provides the stored data.
 
void Preload (PROGRESS_REPORTER &aReporter)
 Preload all symbol libraries in the symbol library table using SYMBOL_ASYNC_LOADER.
 
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.
 
SYMBOL_LIB_TABLE_ROWGetLibrary (const wxString &aLibrary) const
 Find a single library within the (aggregate) library table.
 
std::list< LIB_SYMBOL * > EnumerateSymbols (const wxString &aLibrary) const
 
bool CreateLibrary (const wxString &aFilePath, SYMBOL_LIB_TABLE &aTable)
 Create an empty library and adds it to the library table.
 
bool AddLibrary (const wxString &aFilePath, SYMBOL_LIB_TABLE &aTable)
 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.
 
bool RemoveSymbol (const wxString &aSymbolName, const wxString &aLibrary)
 Remove the symbol from the symbol buffer.
 
LIB_SYMBOLGetSymbol (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_SYMBOLGetBufferedSymbol (const wxString &aSymbolName, const wxString &aLibrary)
 Return the symbol copy from the buffer.
 
SCH_SCREENGetScreen (const wxString &aSymbolName, const wxString &aLibrary)
 Return the screen used to edit a specific symbol.
 
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 ClearSymbolModified (const wxString &aSymbolName, const wxString &aLibrary) const
 Clear the modified flag for a symbol.
 
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 wxString &aSymbolName, const wxString &aLibrary)
 Revert unsaved changes for a symbol.
 
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)
 
bool HasDerivedSymbols (const wxString &aSymbolName, const wxString &aLibraryName)
 Check if symbol aSymbolName in library aLibraryName is a root symbol that has derived symbols.
 
size_t GetDerivedSymbolNames (const wxString &aSymbolName, const wxString &aLibraryName, wxArrayString &aList)
 Fetch all of the symbols derived from a aSymbolName into aList.
 
size_t GetLibraryCount () const
 

Static Public Member Functions

static std::unique_ptr< LIB_SYMBOLCreateSymbol (const NEW_SYMBOL_PROPERTIES &aProps, LIB_SYMBOL *aParent)
 

Protected Member Functions

void OnDataChanged () const override
 
bool addLibrary (const wxString &aFilePath, bool aCreate, SYMBOL_LIB_TABLE &aTable)
 Helper function to add either existing or create new library.
 
SYMBOL_LIB_TABLEsymTable () const
 Return the current symbol library table.
 
std::set< LIB_SYMBOL * > getOriginalSymbols (const wxString &aLibrary)
 Return a set of LIB_SYMBOL objects belonging to the original library.
 
LIB_BUFFERgetLibraryBuffer (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_BUFFERm_libs
 The library buffers.
 
SCH_BASE_FRAMEm_frame
 Parent frame.
 
LIB_LOGGERm_logger
 

Private Member Functions

SYMBOL_TREE_SYNCHRONIZING_ADAPTERgetAdapter ()
 

Private Attributes

wxObjectDataPtr< LIB_TREE_MODEL_ADAPTERm_adapter
 
int m_syncHash
 Symbol lib table hash value from last synchronization.
 

Detailed Description

Symbol library management helper that is specific to the symbol library editor frame.

The base class handles library manipulation; this one also handles synchronizing the LIB_TREE.

Definition at line 53 of file lib_symbol_library_manager.h.

Constructor & Destructor Documentation

◆ LIB_SYMBOL_LIBRARY_MANAGER()

LIB_SYMBOL_LIBRARY_MANAGER::LIB_SYMBOL_LIBRARY_MANAGER ( SYMBOL_EDIT_FRAME & aFrame)

Member Function Documentation

◆ AddLibrary()

bool SYMBOL_LIBRARY_MANAGER::AddLibrary ( const wxString & aFilePath,
SYMBOL_LIB_TABLE & aTable )
inlineinherited

Add an existing library.

The library is added to the library table as well.

Definition at line 236 of file symbol_library_manager.h.

References addLibrary().

◆ addLibrary()

bool SYMBOL_LIBRARY_MANAGER::addLibrary ( const wxString & aFilePath,
bool aCreate,
SYMBOL_LIB_TABLE & aTable )
protectedinherited

◆ ClearLibraryModified()

bool SYMBOL_LIBRARY_MANAGER::ClearLibraryModified ( const wxString & aLibrary) const
inherited

Clear the modified flag for all symbols in a library.

Definition at line 319 of file symbol_library_manager.cpp.

References m_libs, and BASE_SCREEN::SetContentModified().

◆ ClearSymbolModified()

bool SYMBOL_LIBRARY_MANAGER::ClearSymbolModified ( const wxString & aSymbolName,
const wxString & aLibrary ) const
inherited

Clear the modified flag for a symbol.

Definition at line 338 of file symbol_library_manager.cpp.

References m_libs.

◆ CreateLibrary()

bool SYMBOL_LIBRARY_MANAGER::CreateLibrary ( const wxString & aFilePath,
SYMBOL_LIB_TABLE & aTable )
inlineinherited

Create an empty library and adds it to the library table.

The library file is created.

Definition at line 226 of file symbol_library_manager.h.

References addLibrary().

Referenced by SCH_BASE_FRAME::SelectLibrary().

◆ CreateNewSymbol()

bool LIB_SYMBOL_LIBRARY_MANAGER::CreateNewSymbol ( const wxString & aLibrary,
const NEW_SYMBOL_PROPERTIES & aProps )

◆ CreateSymbol()

◆ EnumerateSymbols()

std::list< LIB_SYMBOL * > SYMBOL_LIBRARY_MANAGER::EnumerateSymbols ( const wxString & aLibrary) const
inherited

◆ GetAdapter()

wxObjectDataPtr< LIB_TREE_MODEL_ADAPTER > & LIB_SYMBOL_LIBRARY_MANAGER::GetAdapter ( )
inline

Return the adapter object that provides the stored data.

Definition at line 72 of file lib_symbol_library_manager.h.

References m_adapter.

Referenced by SYMBOL_EDITOR_CONTROL::FlattenSymbol(), and SYMBOL_EDITOR_CONTROL::RenameSymbol().

◆ getAdapter()

SYMBOL_TREE_SYNCHRONIZING_ADAPTER * LIB_SYMBOL_LIBRARY_MANAGER::getAdapter ( )
inlineprivate

Definition at line 78 of file lib_symbol_library_manager.h.

References m_adapter.

Referenced by Sync().

◆ GetBufferedSymbol()

LIB_SYMBOL * SYMBOL_LIBRARY_MANAGER::GetBufferedSymbol ( const wxString & aSymbolName,
const wxString & aLibrary )
inherited

◆ GetDerivedSymbolNames()

size_t SYMBOL_LIBRARY_MANAGER::GetDerivedSymbolNames ( const wxString & aSymbolName,
const wxString & aLibraryName,
wxArrayString & aList )
inherited

Fetch all of the symbols derived from a aSymbolName into aList.

Definition at line 747 of file symbol_library_manager.cpp.

References LIB_BUFFER::GetDerivedSymbolNames(), and getLibraryBuffer().

Referenced by DIALOG_LIB_FIELDS_TABLE::setScope().

◆ GetHash()

int SYMBOL_LIBRARY_MANAGER::GetHash ( ) const
inherited

Definition at line 107 of file symbol_library_manager.cpp.

References SYMBOL_LIB_TABLE::GetModifyHash(), m_libs, name, and symTable().

Referenced by RevertAll().

◆ GetLibrary()

SYMBOL_LIB_TABLE_ROW * SYMBOL_LIBRARY_MANAGER::GetLibrary ( const wxString & aLibrary) const
inherited

◆ getLibraryBuffer()

LIB_BUFFER & SYMBOL_LIBRARY_MANAGER::getLibraryBuffer ( const wxString & aLibrary)
protectedinherited

Return an existing library buffer or creates one to using symbol library table to get the original data.

Definition at line 840 of file symbol_library_manager.cpp.

References LIB_BUFFER::CreateBuffer(), getOriginalSymbols(), LIB_BUFFER::GetSymbol(), and m_libs.

Referenced by GetBufferedSymbol(), GetDerivedSymbolNames(), GetSymbolNames(), HasDerivedSymbols(), RemoveSymbol(), UpdateLibraryBuffer(), UpdateSymbol(), and UpdateSymbolAfterRename().

◆ GetLibraryCount()

size_t SYMBOL_LIBRARY_MANAGER::GetLibraryCount ( ) const
inherited

Definition at line 756 of file symbol_library_manager.cpp.

References LIB_TABLE::GetLogicalLibs(), and symTable().

◆ GetLibraryHash()

int SYMBOL_LIBRARY_MANAGER::GetLibraryHash ( const wxString & aLibrary) const
inherited

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 118 of file symbol_library_manager.cpp.

References LIB_TABLE_ROW::GetFullURI(), GetLibrary(), and m_libs.

◆ getLibraryName()

wxString SYMBOL_LIBRARY_MANAGER::getLibraryName ( const wxString & aFilePath)
staticprotectedinherited

Extract library name basing on the file name.

Definition at line 762 of file symbol_library_manager.cpp.

Referenced by addLibrary().

◆ GetLibraryNames()

wxArrayString SYMBOL_LIBRARY_MANAGER::GetLibraryNames ( ) const
inherited

Return the array of library names.

Definition at line 133 of file symbol_library_manager.cpp.

References GetLibrary(), res, SYMBOL_LIB_TABLE_ROW::SchLibType(), and symTable().

◆ getOriginalSymbols()

std::set< LIB_SYMBOL * > SYMBOL_LIBRARY_MANAGER::getOriginalSymbols ( const wxString & aLibrary)
protectedinherited

Return a set of LIB_SYMBOL objects belonging to the original library.

Definition at line 815 of file symbol_library_manager.cpp.

References _, SYMBOL_LIB_TABLE::EnumerateSymbolLib(), LibraryExists(), SYMBOL_LIB_TABLE::LoadSymbol(), symTable(), and IO_ERROR::What().

Referenced by getLibraryBuffer(), and SaveLibrary().

◆ GetScreen()

SCH_SCREEN * SYMBOL_LIBRARY_MANAGER::GetScreen ( const wxString & aSymbolName,
const wxString & aLibrary )
inherited

Return the screen used to edit a specific symbol.

SYMBOL_LIBRARY_MANAGER retains the ownership.

Definition at line 470 of file symbol_library_manager.cpp.

References LIB_BUFFER::GetBuffer(), LibraryExists(), and m_libs.

◆ GetSymbol()

LIB_SYMBOL * SYMBOL_LIBRARY_MANAGER::GetSymbol ( const wxString & aSymbolName,
const wxString & aLibrary ) const
inherited

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 620 of file symbol_library_manager.cpp.

References _, DisplayErrorMessage(), SYMBOL_LIB_TABLE::LoadSymbol(), m_frame, m_libs, symTable(), and IO_ERROR::What().

Referenced by CheckSavingIntoOwnInheritance(), LIB_SYMBOL_LIBRARY_MANAGER::CreateNewSymbol(), and SYMBOL_EDITOR_CONTROL::Init().

◆ GetSymbolNames()

void SYMBOL_LIBRARY_MANAGER::GetSymbolNames ( const wxString & aLibName,
wxArrayString & aSymbolNames,
SYMBOL_NAME_FILTER aFilter = SYMBOL_NAME_FILTER::ALL )
inherited

◆ GetUniqueLibraryName()

wxString SYMBOL_LIBRARY_MANAGER::GetUniqueLibraryName ( ) const
inherited

Return a library name that is not currently in use.

Used for generating names for new libraries.

Definition at line 708 of file symbol_library_manager.cpp.

References LibraryExists(), and name.

◆ HasDerivedSymbols()

bool SYMBOL_LIBRARY_MANAGER::HasDerivedSymbols ( const wxString & aSymbolName,
const wxString & aLibraryName )
inherited

Check if symbol aSymbolName in library aLibraryName is a root symbol that has derived symbols.

Returns
true if \aSymbolName in aLibraryName has derived symbols.

Definition at line 738 of file symbol_library_manager.cpp.

References getLibraryBuffer(), and LIB_BUFFER::HasDerivedSymbols().

◆ HasModifications()

bool SYMBOL_LIBRARY_MANAGER::HasModifications ( ) const
inherited

Definition at line 95 of file symbol_library_manager.cpp.

References m_libs, and name.

◆ IsLibraryLoaded()

bool SYMBOL_LIBRARY_MANAGER::IsLibraryLoaded ( const wxString & aLibrary) const
inherited

Return true if the library was successfully loaded.

Definition at line 363 of file symbol_library_manager.cpp.

References SYMBOL_LIB_TABLE::IsSymbolLibLoaded(), LibraryExists(), and symTable().

◆ IsLibraryModified()

bool SYMBOL_LIBRARY_MANAGER::IsLibraryModified ( const wxString & aLibrary) const
inherited

Return true if library has unsaved modifications.

Definition at line 280 of file symbol_library_manager.cpp.

References m_libs.

Referenced by SYMBOL_EDITOR_CONTROL::Init().

◆ IsLibraryReadOnly()

bool SYMBOL_LIBRARY_MANAGER::IsLibraryReadOnly ( const wxString & aLibrary) const
inherited

Return true if the library is stored in a read-only file.

Returns
True on success, false otherwise.

Definition at line 354 of file symbol_library_manager.cpp.

References SYMBOL_LIB_TABLE::IsSymbolLibWritable(), LibraryExists(), and symTable().

Referenced by SYMBOL_EDITOR_CONTROL::AddSymbol(), SYMBOL_EDITOR_CONTROL::CutCopyDelete(), and SYMBOL_EDITOR_CONTROL::DuplicateSymbol().

◆ IsSymbolModified()

bool SYMBOL_LIBRARY_MANAGER::IsSymbolModified ( const wxString & aSymbolName,
const wxString & aLibrary ) const
inherited

Return true if symbol has unsaved modifications.

Definition at line 287 of file symbol_library_manager.cpp.

References LIB_BUFFER::GetBuffer(), and m_libs.

◆ LibraryExists()

bool SYMBOL_LIBRARY_MANAGER::LibraryExists ( const wxString & aLibrary,
bool aCheckEnabled = false ) const
inherited

◆ OnDataChanged()

void LIB_SYMBOL_LIBRARY_MANAGER::OnDataChanged ( ) const
overrideprotectedvirtual

Reimplemented from SYMBOL_LIBRARY_MANAGER.

Definition at line 166 of file lib_symbol_library_manager.cpp.

References SYMBOL_LIBRARY_MANAGER::m_frame.

◆ Preload()

void SYMBOL_LIBRARY_MANAGER::Preload ( PROGRESS_REPORTER & aReporter)
inherited

Preload all symbol libraries in the symbol library table using SYMBOL_ASYNC_LOADER.

Call before the first call to Sync() to get better performance.

Parameters
aReporteris used to report progress of the load

Definition at line 61 of file symbol_library_manager.cpp.

References _, HTML_MESSAGE_BOX::AddHTML_Text(), SYMBOL_ASYNC_LOADER::Done(), SYMBOL_ASYNC_LOADER::GetErrors(), SYMBOL_ASYNC_LOADER::Join(), PROGRESS_REPORTER::KeepRefreshing(), m_frame, HTML_MESSAGE_BOX::MessageSet(), DIALOG_SHIM::ShowModal(), SYMBOL_ASYNC_LOADER::Start(), and symTable().

◆ RemoveSymbol()

bool SYMBOL_LIBRARY_MANAGER::RemoveSymbol ( const wxString & aSymbolName,
const wxString & aLibrary )
inherited

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 605 of file symbol_library_manager.cpp.

References LIB_BUFFER::DeleteBuffer(), LIB_BUFFER::GetBuffer(), getLibraryBuffer(), and OnDataChanged().

Referenced by SYMBOL_EDITOR_CONTROL::RenameSymbol().

◆ RevertAll()

bool SYMBOL_LIBRARY_MANAGER::RevertAll ( )
inherited

Revert all pending changes.

Returns
True if all changes successfully reverted.

Definition at line 579 of file symbol_library_manager.cpp.

References GetHash(), m_libs, and RevertSymbol().

◆ RevertLibrary()

bool SYMBOL_LIBRARY_MANAGER::RevertLibrary ( const wxString & aLibrary)
inherited

Revert unsaved changes for a symbol library.

Returns
True on success, false otherwise.

Definition at line 565 of file symbol_library_manager.cpp.

References m_libs, and OnDataChanged().

◆ RevertSymbol()

LIB_ID SYMBOL_LIBRARY_MANAGER::RevertSymbol ( const wxString & aSymbolName,
const wxString & aLibrary )
inherited

Revert unsaved changes for a symbol.

Returns
The LIB_ID of the reverted symbol (which may be different in the case of a rename)

Definition at line 539 of file symbol_library_manager.cpp.

References LIB_SYMBOL::GetName(), m_libs, OnDataChanged(), and UpdateSymbolAfterRename().

Referenced by RevertAll().

◆ SaveLibrary()

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 )
inherited

Save library to a file, including unsaved changes.

Parameters
aLibraryis the library name.
aFileNameis the target file name.
Returns
True on success, false otherwise.

Definition at line 172 of file symbol_library_manager.cpp.

References LIB_BUFFER::ClearDeletedBuffer(), FN_NORMALIZE_FLAGS, LIB_BUFFER::GetBuffers(), LIB_TABLE_ROW::GetFullURI(), GetLibrary(), LIB_SYMBOL::GetName(), getOriginalSymbols(), m_libs, SCH_IO_KICAD_LEGACY::PropBuffering, res, LIB_BUFFER::SaveBuffer(), and LIB_SYMBOL::SetParent().

◆ SetSymbolModified()

void SYMBOL_LIBRARY_MANAGER::SetSymbolModified ( const wxString & aSymbolName,
const wxString & aLibrary )
inherited

Definition at line 302 of file symbol_library_manager.cpp.

References LIB_BUFFER::GetBuffer(), and m_libs.

Referenced by SYMBOL_EDITOR_CONTROL::RenameSymbol().

◆ SymbolExists()

bool SYMBOL_LIBRARY_MANAGER::SymbolExists ( const wxString & aSymbolName,
const wxString & aLibrary ) const
inherited

Return true if symbol with a specific alias exists in library (either original one or buffered).

Definition at line 655 of file symbol_library_manager.cpp.

References SYMBOL_LIB_TABLE::LoadSymbol(), m_libs, and symTable().

Referenced by SYMBOL_EDITOR_CONTROL::RenameSymbol().

◆ SymbolNameInUse()

bool SYMBOL_LIBRARY_MANAGER::SymbolNameInUse ( const wxString & aName,
const wxString & aLibrary )
inherited

Return true if the symbol name is already in use in the specified library.

Definition at line 677 of file symbol_library_manager.cpp.

References GetSymbolNames(), and UnescapeString().

Referenced by CheckForParentalChainConflicts(), CheckSavingIntoOwnInheritance(), and SYMBOL_EDITOR_CONTROL::RenameSymbol().

◆ symTable()

◆ Sync()

void LIB_SYMBOL_LIBRARY_MANAGER::Sync ( const wxString & aForceRefresh,
std::function< void(int, int, const wxString &)> aProgressCallback )

◆ UpdateLibraryBuffer()

bool SYMBOL_LIBRARY_MANAGER::UpdateLibraryBuffer ( const wxString & aLibrary)
inherited

Update the library buffer with a new version of the library.

Definition at line 883 of file symbol_library_manager.cpp.

References _, getLibraryBuffer(), and m_libs.

◆ UpdateSymbol()

bool SYMBOL_LIBRARY_MANAGER::UpdateSymbol ( LIB_SYMBOL * aSymbol,
const wxString & aLibrary )
inherited

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 487 of file symbol_library_manager.cpp.

References LIB_BUFFER::CreateBuffer(), LIB_BUFFER::GetBuffer(), LIB_SYMBOL::GetLibId(), LIB_ID::GetLibItemName(), getLibraryBuffer(), LIB_SYMBOL::GetName(), LibraryExists(), BASE_SCREEN::SetContentModified(), and LIB_SYMBOL::SetLibId().

Referenced by LIB_SYMBOL_LIBRARY_MANAGER::CreateNewSymbol(), and SYMBOL_EDITOR_CONTROL::FlattenSymbol().

◆ UpdateSymbolAfterRename()

bool SYMBOL_LIBRARY_MANAGER::UpdateSymbolAfterRename ( LIB_SYMBOL * aSymbol,
const wxString & aOldSymbolName,
const wxString & aLibrary )
inherited

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 524 of file symbol_library_manager.cpp.

References LIB_BUFFER::GetBuffer(), getLibraryBuffer(), OnDataChanged(), and LIB_BUFFER::UpdateBuffer().

Referenced by SYMBOL_EDITOR_CONTROL::RenameSymbol(), and RevertSymbol().

Member Data Documentation

◆ m_adapter

wxObjectDataPtr<LIB_TREE_MODEL_ADAPTER> LIB_SYMBOL_LIBRARY_MANAGER::m_adapter
private

Definition at line 83 of file lib_symbol_library_manager.h.

Referenced by GetAdapter(), getAdapter(), and LIB_SYMBOL_LIBRARY_MANAGER().

◆ m_frame

SCH_BASE_FRAME& SYMBOL_LIBRARY_MANAGER::m_frame
protectedinherited

◆ m_libs

◆ m_logger

LIB_LOGGER* SYMBOL_LIBRARY_MANAGER::m_logger
protectedinherited

◆ m_syncHash

int LIB_SYMBOL_LIBRARY_MANAGER::m_syncHash
private

Symbol lib table hash value from last synchronization.

Definition at line 85 of file lib_symbol_library_manager.h.

Referenced by LIB_SYMBOL_LIBRARY_MANAGER(), and Sync().


The documentation for this class was generated from the following files: