30 m_fileName( aFullPathAndFileName ),
31 m_libFileName( aFullPathAndFileName ),
73 return fn.GetModificationTime();
96 wxCHECK_MSG( aSymbol !=
nullptr,
nullptr,
"NULL pointer cannot be removed from library." );
106 wxCHECK_MSG( &*it->second == aSymbol,
nullptr,
107 "Pointer mismatch while attempting to remove alias entry <" + aSymbol->
GetName() +
114 for(
const std::pair<const wxString, LIB_SYMBOL*>& entry :
m_symbols )
116 if( entry.second->IsAlias()
117 && entry.second->GetParent().lock() == aSymbol->
SharedPtr() )
119 firstChild = entry.second;
142 for(
const std::pair<const wxString, LIB_SYMBOL*>& entry :
m_symbols )
144 if( entry.second->IsAlias()
145 && entry.second->GetParent().lock() == aSymbol->
SharedPtr() )
147 entry.second->SetParent( firstChild );
180 LIB_SYMBOL_MAP::iterator it =
m_symbols.find( aName );
virtual void SetParent(EDA_ITEM *aParent)
virtual EDA_ITEM * Clone() const
Create a duplicate of this item with linked list members set to NULL.
Define a library symbol object.
bool IsRoot() const override
For symbols derived from other symbols, IsRoot() indicates no derivation.
LIB_ITEMS_CONTAINER & GetDrawItems()
Return a reference to the draw item list.
wxString GetName() const override
LIB_SYMBOL_SPTR SharedPtr() const
SCH_FIELD * FindField(const wxString &aFieldName, bool aCaseInsensitive=false)
Find a field within this symbol matching aFieldName and returns it or NULL if not found.
void AddDrawItem(SCH_ITEM *aItem, bool aSort=true)
Add a new draw aItem to the draw object list and sort according to aSort.
Instances are attached to a symbol or sheet and provide a place for the symbol's value,...
wxString GetCanonicalName() const
Get a non-language-specific name for a field which can be used for storage, variable look-up,...
bool IsFile(const wxString &aFullPathAndFileName) const
virtual LIB_SYMBOL * GetSymbol(const wxString &aName)
wxDateTime GetLibModificationTime()
virtual void AddSymbol(const LIB_SYMBOL *aSymbol)
wxFileName GetRealFile() const
bool IsFileChanged() const
virtual void Save(const std::optional< bool > &aOpt=std::nullopt)
Save the entire library to file m_libFileName;.
SCH_IO_LIB_CACHE(const wxString &aLibraryPath)
virtual ~SCH_IO_LIB_CACHE()
void IncrementModifyHash()
LIB_SYMBOL * removeSymbol(LIB_SYMBOL *aAlias)
Base class for any item which can be embedded within the SCHEMATIC container class,...
static void ResolvePossibleSymlinks(wxFileName &aFilename)