KiCad PCB EDA Suite
JSON_DIR_TRAVERSER Class Reference
Inheritance diagram for JSON_DIR_TRAVERSER:

Public Member Functions

 JSON_DIR_TRAVERSER (std::function< void(const wxFileName &)> aAction)
 
wxDirTraverseResult OnFile (const wxString &aFilePath) override
 
wxDirTraverseResult OnDir (const wxString &dirPath) override
 

Private Attributes

std::function< void(const wxFileName &)> m_action
 

Detailed Description

Definition at line 231 of file settings_manager.cpp.

Constructor & Destructor Documentation

◆ JSON_DIR_TRAVERSER()

JSON_DIR_TRAVERSER::JSON_DIR_TRAVERSER ( std::function< void(const wxFileName &)>  aAction)
inlineexplicit

Definition at line 237 of file settings_manager.cpp.

238 : m_action( std::move( aAction ) )
239 {
240 }
std::function< void(const wxFileName &)> m_action

Member Function Documentation

◆ OnDir()

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

Definition at line 252 of file settings_manager.cpp.

253 {
254 return wxDIR_CONTINUE;
255 }

◆ OnFile()

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

Definition at line 242 of file settings_manager.cpp.

243 {
244 wxFileName file( aFilePath );
245
246 if( file.GetExt() == "json" )
247 m_action( file );
248
249 return wxDIR_CONTINUE;
250 }

References m_action.

Member Data Documentation

◆ m_action

std::function<void( const wxFileName& )> JSON_DIR_TRAVERSER::m_action
private

Definition at line 234 of file settings_manager.cpp.

Referenced by OnFile().


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