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)
 
int RunJob (JOB *job)
 
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
 

Detailed Description

Definition at line 34 of file job_dispatcher.h.

Constructor & Destructor Documentation

◆ JOB_DISPATCHER()

JOB_DISPATCHER::JOB_DISPATCHER ( KIWAY aKiway)

Definition at line 27 of file job_dispatcher.cpp.

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

Member Function Documentation

◆ Register()

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

◆ RunJob()

int JOB_DISPATCHER::RunJob ( JOB job)

Definition at line 42 of file job_dispatcher.cpp.

References CLI::EXIT_CODES::ERR_UNKNOWN, JOB::GetType(), and m_jobHandlers.

◆ SetProgressReporter()

void JOB_DISPATCHER::SetProgressReporter ( PROGRESS_REPORTER aReporter)

Definition at line 60 of file job_dispatcher.cpp.

References m_progressReporter.

◆ SetReporter()

void JOB_DISPATCHER::SetReporter ( REPORTER aReporter)

Definition at line 53 of file job_dispatcher.cpp.

References m_reporter.

Member Data Documentation

◆ m_jobHandlers

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

Definition at line 49 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: