77 catch (
const std::exception&) {}
152 throw std::bad_function_call();
173 std::exception_ptr exc =
207 if ((*it)->canceled())
213 for (
auto it =
m_Jobs.begin(); it !=
m_Jobs.end(); ++it) {
214 if ((*it)->complete()) {
CAppJobNotification Notification send by CAppJobEventTranslator.
CEvent - generic event implementation TODO TODO - Attachments.
virtual void OnJobResult(CObject *result)=0
virtual void OnJobCanceled()=0
virtual void OnJobFailed(const IAppJobError *error)=0
Here is set of classes to implement launching jobs (to execute code on a worker thread using C++ Tool...
IJobCallback * m_Callback
void x_OnJobNotification(CEvent *evt)
CAppJobDispatcher::TJobID m_JobId
list< async_job * > m_Jobs
static CJobHandler & Instance()
void x_RemoveJob(async_job *job)
virtual void OnJobFailed(const IAppJobError *error)
CRef< CJobFutureAdapter > m_JobAdapter
CConstRef< CJobFutureError > m_Error
virtual void OnJobResult(CObject *result)
virtual void OnJobCanceled()
static const char * m_BadJobResponse
job_future_base
CConstIRef< IAppJobError > GetError() const
returns non-null pointer only if job Failed
static CAppJobDispatcher & GetInstance()
CRef< CObject > GetResult() const
returns non-null pointer only if Completed or Running and has temporary results available
bool DeleteJob(TJobID job_id)
when a Job is deleted the listener is not notified
TJobID StartJob(IAppJob &job, const string &engine_name, IEngineParams *params=NULL)
Starts a Job on the specified engine in "passive mode" - no notifications or progress reports will be...
#define ON_EVENT(type, id, handler)
#define END_EVENT_MAP()
Ends definition of Command Map.
#define BEGIN_EVENT_MAP(thisClass, baseClass)
Begins definition of Command Map for CEventHandler-derived class.
TJobState GetState() const
void CancelJob(TJobID job_id)
void Reset(void)
Reset reference object.
void Reset(void)
Reset reference object.
TObjectType * GetPointerOrNull(void) THROWS_NONE
Get pointer value.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.