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

#include <job_dispatcher.h>

Inheritance diagram for JOB_DISPATCHER:
EESCHEMA_JOBS_HANDLER PCBNEW_JOBS_HANDLER

Public Member Functions

 JOB_DISPATCHER (KIWAY *aKiway)
 
void Register (const std::string &aJobTypeName, std::function< int(JOB *job)> aHandler, std::function< bool(JOB *job, wxWindow *aParent)> aConfigHandler)
 
int RunJob (JOB *aJob)
 
bool HandleJobConfig (JOB *aJob, wxWindow *aParent)
 
void SetReporter (REPORTER *aReporter)
 
void SetProgressReporter (PROGRESS_REPORTER *aReporter)
 

Protected Attributes

KIWAYm_kiway
 
REPORTERm_reporter
 
PROGRESS_REPORTERm_progressReporter
 

Private Attributes

std::map< std::string, std::function< int(JOB *job)> > m_jobHandlers
 
std::map< std::string, std::function< bool(JOB *job, wxWindow *aParent)> > m_jobConfigHandlers
 

Detailed Description

Definition at line 35 of file job_dispatcher.h.

Constructor & Destructor Documentation

◆ JOB_DISPATCHER()

JOB_DISPATCHER::JOB_DISPATCHER ( KIWAY aKiway)

Definition at line 28 of file job_dispatcher.cpp.

References NULL_REPORTER::GetInstance(), m_progressReporter, and m_reporter.

Member Function Documentation

◆ HandleJobConfig()

bool JOB_DISPATCHER::HandleJobConfig ( JOB aJob,
wxWindow *  aParent 
)

Definition at line 58 of file job_dispatcher.cpp.

References JOB::GetType(), and m_jobConfigHandlers.

◆ Register()

void JOB_DISPATCHER::Register ( const std::string &  aJobTypeName,
std::function< int(JOB *job)>  aHandler,
std::function< bool(JOB *job, wxWindow *aParent)>  aConfigHandler 
)

◆ RunJob()

int JOB_DISPATCHER::RunJob ( JOB aJob)

◆ SetProgressReporter()

void JOB_DISPATCHER::SetProgressReporter ( PROGRESS_REPORTER aReporter)

Definition at line 76 of file job_dispatcher.cpp.

References m_progressReporter.

◆ SetReporter()

void JOB_DISPATCHER::SetReporter ( REPORTER aReporter)

Definition at line 69 of file job_dispatcher.cpp.

References m_reporter.

Member Data Documentation

◆ m_jobConfigHandlers

std::map<std::string, std::function<bool( JOB* job, wxWindow* aParent )> > JOB_DISPATCHER::m_jobConfigHandlers
private

Definition at line 54 of file job_dispatcher.h.

Referenced by HandleJobConfig(), and Register().

◆ m_jobHandlers

std::map<std::string, std::function<int( JOB* job )> > JOB_DISPATCHER::m_jobHandlers
private

Definition at line 52 of file job_dispatcher.h.

Referenced by Register(), and RunJob().

◆ m_kiway

KIWAY* JOB_DISPATCHER::m_kiway
protected

◆ m_progressReporter

PROGRESS_REPORTER* JOB_DISPATCHER::m_progressReporter
protected

◆ m_reporter


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