BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
The JobWorker class provides running the domain simulation in a thread.
Definition at line 28 of file JobWorker.h.
Public Slots | |
void | start () |
void | terminate () |
Sets request for JobRunner to terminate underlying domain simulation. More... | |
Signals | |
void | finished () |
void | progressUpdate () |
void | started () |
Public Member Functions | |
JobWorker (QString identifier, ISimulation *simulation) | |
~JobWorker () | |
QString | failureMessage () const |
QString | identifier () const |
int | progress () const |
const SimulationResult * | result () const |
const QDateTime & | simulationEnd () const |
const QDateTime & | simulationStart () const |
JobStatus | status () const |
Private Member Functions | |
bool | updateProgress (int percentage_done) |
Sets current progress. Returns true if we want to continue the simulation. More... | |
Private Attributes | |
QString | m_failure_message |
QString | m_identifier |
JobStatus | m_job_status |
int | m_percentage_done |
std::unique_ptr< const SimulationResult > | m_result |
ISimulation * | m_simulation |
QDateTime | m_simulation_end |
QDateTime | m_simulation_start |
bool | m_terminate_request_flag |
JobWorker::JobWorker | ( | QString | identifier, |
ISimulation * | simulation | ||
) |
|
default |
QString JobWorker::failureMessage | ( | ) | const |
Definition at line 87 of file JobWorker.cpp.
References m_failure_message.
Referenced by JobQueueData::processFinishedJob().
|
signal |
Referenced by JobQueueData::runJob(), and start().
QString JobWorker::identifier | ( | ) | const |
Definition at line 33 of file JobWorker.cpp.
References m_identifier.
int JobWorker::progress | ( | ) | const |
Definition at line 38 of file JobWorker.cpp.
References m_percentage_done.
|
signal |
Referenced by JobQueueData::runJob(), start(), and updateProgress().
const SimulationResult * JobWorker::result | ( | ) | const |
Definition at line 102 of file JobWorker.cpp.
References m_result.
Referenced by JobQueueData::processFinishedJob(), and start().
const QDateTime & JobWorker::simulationEnd | ( | ) | const |
Definition at line 97 of file JobWorker.cpp.
References m_simulation_end.
Referenced by JobQueueData::processFinishedJob().
const QDateTime & JobWorker::simulationStart | ( | ) | const |
|
slot |
Definition at line 43 of file JobWorker.cpp.
References Canceled, Completed, Failed, finished(), m_failure_message, m_job_status, m_percentage_done, m_result, m_simulation, m_simulation_end, m_simulation_start, m_terminate_request_flag, progressUpdate(), result(), Running, started(), and updateProgress().
Referenced by JobQueueData::runJob().
|
signal |
Referenced by JobQueueData::runJob(), and start().
JobStatus JobWorker::status | ( | ) | const |
Definition at line 82 of file JobWorker.cpp.
References m_job_status.
Referenced by JobQueueData::processFinishedJob().
|
slot |
Sets request for JobRunner to terminate underlying domain simulation.
Definition at line 109 of file JobWorker.cpp.
References Canceled, m_job_status, and m_terminate_request_flag.
Referenced by JobQueueData::cancelJob().
|
private |
Sets current progress. Returns true if we want to continue the simulation.
Definition at line 117 of file JobWorker.cpp.
References m_percentage_done, m_terminate_request_flag, and progressUpdate().
Referenced by start().
|
private |
Definition at line 64 of file JobWorker.h.
Referenced by failureMessage(), and start().
|
private |
Definition at line 59 of file JobWorker.h.
Referenced by identifier().
|
private |
Definition at line 62 of file JobWorker.h.
Referenced by start(), status(), and terminate().
|
private |
Definition at line 61 of file JobWorker.h.
Referenced by progress(), start(), and updateProgress().
|
private |
Definition at line 67 of file JobWorker.h.
|
private |
Definition at line 60 of file JobWorker.h.
Referenced by start().
|
private |
Definition at line 66 of file JobWorker.h.
Referenced by simulationEnd(), and start().
|
private |
Definition at line 65 of file JobWorker.h.
Referenced by simulationStart(), and start().
|
private |
Definition at line 63 of file JobWorker.h.
Referenced by start(), terminate(), and updateProgress().