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 225 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 231 of file settings_manager.cpp.

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

Member Function Documentation

◆ OnDir()

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

Definition at line 246 of file settings_manager.cpp.

247  {
248  return wxDIR_CONTINUE;
249  }

◆ OnFile()

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

Definition at line 236 of file settings_manager.cpp.

237  {
238  wxFileName file( aFilePath );
239 
240  if( file.GetExt() == "json" )
241  m_action( file );
242 
243  return wxDIR_CONTINUE;
244  }
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 228 of file settings_manager.cpp.

Referenced by OnFile().


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