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 224 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 230 of file settings_manager.cpp.

231  : m_action( std::move( aAction ) )
232  {
233  }
std::function< void(const wxFileName &)> m_action

Member Function Documentation

◆ OnDir()

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

Definition at line 245 of file settings_manager.cpp.

246  {
247  return wxDIR_CONTINUE;
248  }

◆ OnFile()

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

Definition at line 235 of file settings_manager.cpp.

236  {
237  wxFileName file( aFilePath );
238 
239  if( file.GetExt() == "json" )
240  m_action( file );
241 
242  return wxDIR_CONTINUE;
243  }
std::function< void(const wxFileName &)> m_action

References m_action.

Member Data Documentation

◆ m_action

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

Definition at line 227 of file settings_manager.cpp.

Referenced by OnFile().


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