7 #ifndef __FWJOBS_JOB_HPP__ 8 #define __FWJOBS_JOB_HPP__ 10 #include "fwJobs/config.hpp" 11 #include "fwJobs/IJob.hpp" 55 FWJOBS_API static sptr New(const
std::
string &name, Task task, const
SPTR(::
fwThread::Worker) &worker =
nullptr );
64 FWJOBS_API
Job(const
std::
string &name, Task task, const
SPTR(::
fwThread::Worker) &worker =
nullptr );
70 FWJOBS_API ProgressCallback progressCallback();
77 using
IJob::setTotalWorkUnits;
108 #endif //__FWJOBS_JOB_HPP__
This class is an interface for class managing job.
std::weak_ptr< ::fwJobs::IJob > wptr
Cancel request callback type.
std::shared_future< void > SharedFuture
Future type.
std::shared_ptr< ::fwJobs::IJob > sptr
Cancel request callback type.
This class encapsulate a task that will report it's progression The embeded task will be run at most ...
std::function< void(Job &) > Task
Task type.
This namespace fwThread provides few tools to execute asynchronous tasks on different threads...
This namespace fwJobs provides jobs management.
std::function< void(std::uint64_t) > ProgressCallback
Progress callback type.