28 #include <type_traits>
48 template <
typename T >
72 struct job_ptr : std::unique_ptr< job_iface >
76 template <
typename T >
79 new
job< std::decay_t< T > >{ std::forward< T >( item ) } )
MIT License.
Definition: dag.hpp:27
Definition: run_result.hpp:65
TODO: hide this Result of single traits run call.
Definition: run_result.hpp:55
Single task that should be executed by the system.
Definition: task.hpp:49
Job interface used by task and execution.
Definition: job.hpp:35
virtual run_result run(const task &)=0
Executes one run of the task.
virtual ~job_iface()=default
virtual inval_result is_invalidated()=0
Returns true in case the job is invalidated.
Custom unique_ptr wrapper that simplifies syntax of tasks.
Definition: job.hpp:73
job_ptr & operator=(const job_ptr &)=delete
job_ptr(const job_ptr &)=delete
job_ptr(T &&item)
Definition: job.hpp:77
job_ptr(job_ptr &&) noexcept=default
static run_result run(const task &t, T &f)
Definition: traits.hpp:41
static inval_result is_invalidated(const T &)
Definition: traits.hpp:36
Implementation of job interface, storing the specific job type that shall be used.
Definition: job.hpp:50
run_result run(const task &t) override
Executes one run of the task.
Definition: job.hpp:63
job(T thing)
Definition: job.hpp:53
inval_result is_invalidated() override
Returns true in case the job is invalidated.
Definition: job.hpp:58
T thing
Definition: job.hpp:51