32 #include <type_traits>
47 std::vector< std::string >
cmd;
49 std::vector< std::filesystem::path >
input;
51 std::vector< std::filesystem::path >
output;
65 template <
typename... Args >
92 template <
typename... Args >
97 auto f = [&]<
typename T >( T&& thing ) {
98 if constexpr ( std::derived_from< std::decay_t< T >,
out_tag > ) {
99 res.
cmd.push_back( thing.p );
100 res.
output.push_back( thing.p );
101 }
else if constexpr ( std::same_as< std::decay_t< T >, std::filesystem::path > ) {
102 res.
cmd.push_back( thing );
103 res.
input.push_back( thing );
105 res.
cmd.push_back( thing );
MIT License.
Definition: dag.hpp:27
Fun && f
Definition: task.hpp:93
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
static inval_result is_invalidated(const process &p)
Proces becames invalidated in case one of it's input files is more recent than any of output files.
static run_result run(const task &, const process &p)
Executes the process, captures output of both stdout and stderr.
Default job traits for all types.
Definition: traits.hpp:35
Baseclass for tagging system.
Definition: out.hpp:31
Job-friendly structure for definition of subprocess to be executed.
Definition: process.hpp:45
process add_output(std::filesystem::path p) &&
Adds an output path to the output files.
process set_retcode_file(std::filesystem::path p) &&
static process derive(Args &&... args)
Takes input command for process as any arguments and builds process instance out of those.
Definition: process.hpp:93
std::vector< std::filesystem::path > output
output files that shall be monitored for timestamps
Definition: process.hpp:51
process add_input(std::filesystem::path p) &&
std::vector< std::string > cmd
cmd for the process execution
Definition: process.hpp:47
std::optional< std::filesystem::path > retcode_file
Definition: process.hpp:53
std::vector< std::filesystem::path > input
input files that shall be monitored for changes
Definition: process.hpp:49