KiCad PCB EDA Suite
|
#include <background_jobs_monitor.h>
Public Member Functions | |
BACKGROUND_JOBS_MONITOR () | |
std::shared_ptr< BACKGROUND_JOB > | Create (const wxString &aName) |
Creates a background job with the given name. More... | |
void | Remove (std::shared_ptr< BACKGROUND_JOB > job) |
Removes the given background job from any lists and frees it. More... | |
void | ShowList (wxWindow *aParent, wxPoint aPos) |
Shows the background job list. More... | |
void | RegisterStatusBar (KISTATUSBAR *aStatusBar) |
Add a status bar for handling. More... | |
void | UnregisterStatusBar (KISTATUSBAR *aStatusBar) |
Removes status bar from handling. More... | |
Private Member Functions | |
void | onListWindowClosed (wxCloseEvent &aEvent) |
Handles removing the shown list window from our list of shown windows. More... | |
void | jobUpdated (std::shared_ptr< BACKGROUND_JOB > aJob) |
Handles job status updates, intended to be called by BACKGROUND_JOB_REPORTER only. More... | |
Private Attributes | |
BACKGROUND_JOB_LIST * | m_jobListDialog |
std::vector< std::shared_ptr< BACKGROUND_JOB > > | m_jobs |
Holds a reference to all active background jobs Access to this vector should be protected by locks since threads may Create or Remove at will to register their activity. More... | |
std::vector< BACKGROUND_JOB_LIST * > | m_shownDialogs |
std::vector< KISTATUSBAR * > | m_statusBars |
std::shared_mutex | m_mutex |
Mutex to protect access to the m_jobs vector. More... | |
Friends | |
class | BACKGROUND_JOB_REPORTER |
class | BACKGROUND_JOB_LIST |
Definition at line 84 of file background_jobs_monitor.h.
BACKGROUND_JOBS_MONITOR::BACKGROUND_JOBS_MONITOR | ( | ) |
Definition at line 212 of file background_jobs_monitor.cpp.
std::shared_ptr< BACKGROUND_JOB > BACKGROUND_JOBS_MONITOR::Create | ( | const wxString & | aName | ) |
Creates a background job with the given name.
aName | is the displayed title for the event |
Definition at line 218 of file background_jobs_monitor.cpp.
References m_jobs, m_mutex, and m_shownDialogs.
|
private |
Handles job status updates, intended to be called by BACKGROUND_JOB_REPORTER only.
Definition at line 322 of file background_jobs_monitor.cpp.
References m_jobs, m_mutex, m_shownDialogs, and m_statusBars.
Referenced by BACKGROUND_JOB_REPORTER::AdvancePhase(), BACKGROUND_JOB_REPORTER::Report(), and BACKGROUND_JOB_REPORTER::SetNumPhases().
|
private |
Handles removing the shown list window from our list of shown windows.
Definition at line 283 of file background_jobs_monitor.cpp.
References m_shownDialogs.
Referenced by ShowList().
void BACKGROUND_JOBS_MONITOR::RegisterStatusBar | ( | KISTATUSBAR * | aStatusBar | ) |
Add a status bar for handling.
Definition at line 360 of file background_jobs_monitor.cpp.
References m_statusBars.
void BACKGROUND_JOBS_MONITOR::Remove | ( | std::shared_ptr< BACKGROUND_JOB > | job | ) |
Removes the given background job from any lists and frees it.
Definition at line 245 of file background_jobs_monitor.cpp.
References m_jobs, m_mutex, m_shownDialogs, and m_statusBars.
void BACKGROUND_JOBS_MONITOR::ShowList | ( | wxWindow * | aParent, |
wxPoint | aPos | ||
) |
Shows the background job list.
Definition at line 297 of file background_jobs_monitor.cpp.
References BACKGROUND_JOB_LIST::Add(), BACKGROUND_JOB_LIST, m_jobs, m_mutex, m_shownDialogs, and onListWindowClosed().
void BACKGROUND_JOBS_MONITOR::UnregisterStatusBar | ( | KISTATUSBAR * | aStatusBar | ) |
Removes status bar from handling.
Definition at line 366 of file background_jobs_monitor.cpp.
References m_statusBars.
|
friend |
Definition at line 87 of file background_jobs_monitor.h.
Referenced by ShowList().
|
friend |
Definition at line 86 of file background_jobs_monitor.h.
|
private |
Definition at line 130 of file background_jobs_monitor.h.
|
private |
Holds a reference to all active background jobs Access to this vector should be protected by locks since threads may Create or Remove at will to register their activity.
Definition at line 137 of file background_jobs_monitor.h.
Referenced by Create(), jobUpdated(), Remove(), and ShowList().
|
mutableprivate |
Mutex to protect access to the m_jobs vector.
Definition at line 143 of file background_jobs_monitor.h.
Referenced by Create(), jobUpdated(), Remove(), and ShowList().
|
private |
Definition at line 138 of file background_jobs_monitor.h.
Referenced by Create(), jobUpdated(), onListWindowClosed(), Remove(), and ShowList().
|
private |
Definition at line 140 of file background_jobs_monitor.h.
Referenced by jobUpdated(), RegisterStatusBar(), Remove(), and UnregisterStatusBar().