7 #ifndef __FWJOBS_OBSERVER_HPP__ 8 #define __FWJOBS_OBSERVER_HPP__ 10 #include "fwJobs/config.hpp" 11 #include "fwJobs/IJob.hpp" 42 FWJOBS_API static sptr New(const
std::
string& name,
std::uint64_t workUnits = 100);
49 FWJOBS_API
Observer(const
std::
string& name,
std::uint64_t workUnits = 100);
56 using
IJob::setTotalWorkUnits;
63 FWJOBS_API
void finish();
70 FWJOBS_API ProgressCallback progressCallback();
88 PackagedTask m_finishTask;
94 #endif //__FWJOBS_OBSERVER_HPP__ std::function< void(std::uint64_t) > ProgressCallback
Progress callback type.
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.
std::packaged_task< void() > PackagedTask
Task type.
This namespace fwJobs provides jobs management.
This class manages a job.