KiCad PCB EDA Suite
Loading...
Searching...
No Matches
PCM_LIB_TRAVERSER Class Referencefinal
Inheritance diagram for PCM_LIB_TRAVERSER:

Public Member Functions

 PCM_LIB_TRAVERSER (const wxString &aBasePath, LIBRARY_MANAGER &aManager, const wxString &aPrefix)
 
wxDirTraverseResult OnFile (const wxString &aFilePath) override
 Handles symbol library files, minimum nest level 2.
 
wxDirTraverseResult OnDir (const wxString &dirPath) override
 Handles footprint library and design block library directories, minimum nest level 3.
 
std::set< LIBRARY_TABLE * > Modified () const
 

Private Types

enum class  ADD_MODE { AM_FILE , AM_DIRECTORY }
 

Private Member Functions

void ensureUnique (LIBRARY_TABLE *aTable, const wxString &aBaseName, wxString &aNickname) const
 
void addRowIfNecessary (LIBRARY_TABLE *aTable, const wxFileName &aSource, ADD_MODE aMode, int aExtensionLength)
 

Private Attributes

LIBRARY_MANAGERm_manager
 
const PROJECTm_project
 
wxString m_path_prefix
 
wxString m_lib_prefix
 
size_t m_prefix_dir_count
 
std::set< LIBRARY_TABLE * > m_modified
 
LIBRARY_TABLEm_symbolTable
 
LIBRARY_TABLEm_fpTable
 
LIBRARY_TABLEm_designBlockTable
 

Detailed Description

Definition at line 184 of file library_manager.cpp.

Member Enumeration Documentation

◆ ADD_MODE

enum class PCM_LIB_TRAVERSER::ADD_MODE
strongprivate
Enumerator
AM_FILE 
AM_DIRECTORY 

Definition at line 262 of file library_manager.cpp.

Constructor & Destructor Documentation

◆ PCM_LIB_TRAVERSER()

PCM_LIB_TRAVERSER::PCM_LIB_TRAVERSER ( const wxString & aBasePath,
LIBRARY_MANAGER & aManager,
const wxString & aPrefix )
inlineexplicit

Member Function Documentation

◆ addRowIfNecessary()

◆ ensureUnique()

void PCM_LIB_TRAVERSER::ensureUnique ( LIBRARY_TABLE * aTable,
const wxString & aBaseName,
wxString & aNickname ) const
inlineprivate

Definition at line 248 of file library_manager.cpp.

References LIBRARY_TABLE::HasRow(), and m_lib_prefix.

Referenced by addRowIfNecessary().

◆ Modified()

std::set< LIBRARY_TABLE * > PCM_LIB_TRAVERSER::Modified ( ) const
inline

Definition at line 245 of file library_manager.cpp.

References m_modified.

Referenced by LIBRARY_MANAGER::LoadGlobalTables().

◆ OnDir()

wxDirTraverseResult PCM_LIB_TRAVERSER::OnDir ( const wxString & dirPath)
inlineoverride

Handles footprint library and design block library directories, minimum nest level 3.

Definition at line 222 of file library_manager.cpp.

References addRowIfNecessary(), AM_DIRECTORY, FILEEXT::KiCadDesignBlockLibPathExtension, m_designBlockTable, m_fpTable, and m_prefix_dir_count.

◆ OnFile()

wxDirTraverseResult PCM_LIB_TRAVERSER::OnFile ( const wxString & aFilePath)
inlineoverride

Handles symbol library files, minimum nest level 2.

Definition at line 206 of file library_manager.cpp.

References addRowIfNecessary(), AM_FILE, m_prefix_dir_count, and m_symbolTable.

Member Data Documentation

◆ m_designBlockTable

LIBRARY_TABLE* PCM_LIB_TRAVERSER::m_designBlockTable
private

Definition at line 315 of file library_manager.cpp.

Referenced by OnDir(), and PCM_LIB_TRAVERSER().

◆ m_fpTable

LIBRARY_TABLE* PCM_LIB_TRAVERSER::m_fpTable
private

Definition at line 314 of file library_manager.cpp.

Referenced by OnDir(), and PCM_LIB_TRAVERSER().

◆ m_lib_prefix

wxString PCM_LIB_TRAVERSER::m_lib_prefix
private

Definition at line 309 of file library_manager.cpp.

Referenced by addRowIfNecessary(), ensureUnique(), and PCM_LIB_TRAVERSER().

◆ m_manager

LIBRARY_MANAGER& PCM_LIB_TRAVERSER::m_manager
private

Definition at line 306 of file library_manager.cpp.

Referenced by PCM_LIB_TRAVERSER().

◆ m_modified

std::set<LIBRARY_TABLE*> PCM_LIB_TRAVERSER::m_modified
private

Definition at line 311 of file library_manager.cpp.

Referenced by addRowIfNecessary(), and Modified().

◆ m_path_prefix

wxString PCM_LIB_TRAVERSER::m_path_prefix
private

Definition at line 308 of file library_manager.cpp.

Referenced by PCM_LIB_TRAVERSER().

◆ m_prefix_dir_count

size_t PCM_LIB_TRAVERSER::m_prefix_dir_count
private

Definition at line 310 of file library_manager.cpp.

Referenced by addRowIfNecessary(), OnDir(), OnFile(), and PCM_LIB_TRAVERSER().

◆ m_project

const PROJECT& PCM_LIB_TRAVERSER::m_project
private

Definition at line 307 of file library_manager.cpp.

Referenced by addRowIfNecessary(), and PCM_LIB_TRAVERSER().

◆ m_symbolTable

LIBRARY_TABLE* PCM_LIB_TRAVERSER::m_symbolTable
private

Definition at line 313 of file library_manager.cpp.

Referenced by OnFile(), and PCM_LIB_TRAVERSER().


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