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

Traverser implementation that looks to find any and all "folder" libraries by looking for files with a specific extension inside folders. More...

Inheritance diagram for LIBRARY_TRAVERSER:

Public Member Functions

 LIBRARY_TRAVERSER (std::vector< std::string > aSearchExtensions, wxString aInitialDir)
 
virtual wxDirTraverseResult OnFile (const wxString &aFileName) override
 
virtual wxDirTraverseResult OnOpenError (const wxString &aOpenErrorName) override
 
bool HasDirectoryOpenFailures ()
 
virtual wxDirTraverseResult OnDir (const wxString &aDirName) override
 
void GetPaths (wxArrayString &aPathArray)
 
void GetFailedPaths (wxArrayString &aPathArray)
 
 LIBRARY_TRAVERSER (std::vector< std::string > aSearchExtensions, wxString aInitialDir)
 
virtual wxDirTraverseResult OnFile (const wxString &aFileName) override
 
virtual wxDirTraverseResult OnOpenError (const wxString &aOpenErrorName) override
 
bool HasDirectoryOpenFailures ()
 
virtual wxDirTraverseResult OnDir (const wxString &aDirName) override
 
void GetPaths (wxArrayString &aPathArray)
 
void GetFailedPaths (wxArrayString &aPathArray)
 

Private Attributes

std::vector< std::string > m_searchExtensions
 
wxString m_currentDir
 
std::unordered_map< wxString, int > m_foundDirs
 
std::unordered_map< wxString, int > m_failedDirs
 

Detailed Description

Traverser implementation that looks to find any and all "folder" libraries by looking for files with a specific extension inside folders.

Definition at line 88 of file panel_design_block_lib_table.cpp.

Constructor & Destructor Documentation

◆ LIBRARY_TRAVERSER() [1/2]

LIBRARY_TRAVERSER::LIBRARY_TRAVERSER ( std::vector< std::string >  aSearchExtensions,
wxString  aInitialDir 
)
inline

Definition at line 91 of file panel_design_block_lib_table.cpp.

◆ LIBRARY_TRAVERSER() [2/2]

LIBRARY_TRAVERSER::LIBRARY_TRAVERSER ( std::vector< std::string >  aSearchExtensions,
wxString  aInitialDir 
)
inline

Definition at line 101 of file panel_fp_lib_table.cpp.

Member Function Documentation

◆ GetFailedPaths() [1/2]

void LIBRARY_TRAVERSER::GetFailedPaths ( wxArrayString &  aPathArray)
inline

Definition at line 129 of file panel_design_block_lib_table.cpp.

References m_failedDirs.

◆ GetFailedPaths() [2/2]

void LIBRARY_TRAVERSER::GetFailedPaths ( wxArrayString &  aPathArray)
inline

Definition at line 142 of file panel_fp_lib_table.cpp.

References m_failedDirs.

◆ GetPaths() [1/2]

void LIBRARY_TRAVERSER::GetPaths ( wxArrayString &  aPathArray)
inline

Definition at line 123 of file panel_design_block_lib_table.cpp.

References m_foundDirs.

◆ GetPaths() [2/2]

void LIBRARY_TRAVERSER::GetPaths ( wxArrayString &  aPathArray)
inline

Definition at line 136 of file panel_fp_lib_table.cpp.

References m_foundDirs.

◆ HasDirectoryOpenFailures() [1/2]

bool LIBRARY_TRAVERSER::HasDirectoryOpenFailures ( )
inline

Definition at line 115 of file panel_design_block_lib_table.cpp.

References m_failedDirs.

◆ HasDirectoryOpenFailures() [2/2]

bool LIBRARY_TRAVERSER::HasDirectoryOpenFailures ( )
inline

Definition at line 125 of file panel_fp_lib_table.cpp.

References m_failedDirs.

◆ OnDir() [1/2]

virtual wxDirTraverseResult LIBRARY_TRAVERSER::OnDir ( const wxString &  aDirName)
inlineoverridevirtual

Definition at line 117 of file panel_design_block_lib_table.cpp.

References m_currentDir.

◆ OnDir() [2/2]

virtual wxDirTraverseResult LIBRARY_TRAVERSER::OnDir ( const wxString &  aDirName)
inlineoverridevirtual

Definition at line 130 of file panel_fp_lib_table.cpp.

References m_currentDir.

◆ OnFile() [1/2]

virtual wxDirTraverseResult LIBRARY_TRAVERSER::OnFile ( const wxString &  aFileName)
inlineoverridevirtual

Definition at line 96 of file panel_design_block_lib_table.cpp.

References m_currentDir, m_foundDirs, and m_searchExtensions.

◆ OnFile() [2/2]

virtual wxDirTraverseResult LIBRARY_TRAVERSER::OnFile ( const wxString &  aFileName)
inlineoverridevirtual

Definition at line 106 of file panel_fp_lib_table.cpp.

References m_currentDir, m_foundDirs, and m_searchExtensions.

◆ OnOpenError() [1/2]

virtual wxDirTraverseResult LIBRARY_TRAVERSER::OnOpenError ( const wxString &  aOpenErrorName)
inlineoverridevirtual

Definition at line 109 of file panel_design_block_lib_table.cpp.

References m_failedDirs.

◆ OnOpenError() [2/2]

virtual wxDirTraverseResult LIBRARY_TRAVERSER::OnOpenError ( const wxString &  aOpenErrorName)
inlineoverridevirtual

Definition at line 119 of file panel_fp_lib_table.cpp.

References m_failedDirs.

Member Data Documentation

◆ m_currentDir

wxString LIBRARY_TRAVERSER::m_currentDir
private

Definition at line 137 of file panel_design_block_lib_table.cpp.

Referenced by OnDir(), and OnFile().

◆ m_failedDirs

std::unordered_map< wxString, int > LIBRARY_TRAVERSER::m_failedDirs
private

◆ m_foundDirs

std::unordered_map< wxString, int > LIBRARY_TRAVERSER::m_foundDirs
private

Definition at line 138 of file panel_design_block_lib_table.cpp.

Referenced by GetPaths(), and OnFile().

◆ m_searchExtensions

std::vector< std::string > LIBRARY_TRAVERSER::m_searchExtensions
private

Definition at line 136 of file panel_design_block_lib_table.cpp.

Referenced by OnFile().


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