43 if( wxFileName::DirExists( aFullPathAndFileName ) )
76 if( !fn.IsDir() && wxFileName::DirExists( fn.GetFullPath() ) )
77 fn.AssignDir( fn.GetFullPath() );
86 wxString wildcard = fn.GetFullName();
92 return fn.GetModificationTime().GetValue().GetValue();
116 if( wxFileName::DirExists( aFileName ) )
130 if( !fn.IsDir() && fn.IsFileReadable() )
131 return fn.GetModificationTime().GetValue().GetValue() !=
m_fileModTime;
133 if( fn.IsDir() && fn.IsDirReadable() )
146 wxCHECK_MSG( aSymbol !=
nullptr,
nullptr,
"NULL pointer cannot be removed from library." );
156 wxCHECK_MSG( &*it->second == aSymbol,
nullptr,
157 "Pointer mismatch while attempting to remove alias entry <" + aSymbol->
GetName() +
164 for(
const std::pair<const wxString, LIB_SYMBOL*>& entry :
m_symbols )
166 if( entry.second->IsDerived()
167 && entry.second->GetParent().lock() == aSymbol->
SharedPtr() )
169 firstChild = entry.second;
192 for(
const std::pair<const wxString, LIB_SYMBOL*>& entry :
m_symbols )
194 if( entry.second->IsDerived()
195 && entry.second->GetParent().lock() == aSymbol->
SharedPtr() )
197 entry.second->SetParent( firstChild );
230 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.
SCH_FIELD * GetField(const wxString &aFieldName)
Find a field within this symbol matching aFieldName; return nullptr if not found.
LIB_ITEMS_CONTAINER & GetDrawItems()
Return a reference to the draw item list.
wxString GetName() const override
std::shared_ptr< LIB_SYMBOL > SharedPtr() const
http://www.boost.org/doc/libs/1_55_0/libs/smart_ptr/sp_techniques.html#weak_without_shared.
void AddDrawItem(SCH_ITEM *aItem, bool aSort=true)
Add a new draw aItem to the draw object list and sort according to aSort.
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)
void SetFileName(const wxString &aFileName)
virtual void AddSymbol(const LIB_SYMBOL *aSymbol)
wxFileName GetRealFile() const
bool IsFileChanged() const
long long GetLibModificationTime()
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)
static const std::string KiCadSymbolLibFileExtension