joque
task orchestration library
joque::process Struct Reference

Job-friendly structure for definition of subprocess to be executed. More...

#include <process.hpp>

+ Collaboration diagram for joque::process:

Public Member Functions

process add_output (std::filesystem::path p) &&
 Adds an output path to the output files. More...
 
process add_input (std::filesystem::path p) &&
 
process set_retcode_file (std::filesystem::path p) &&
 

Static Public Member Functions

template<typename... Args>
static process derive (Args &&... args)
 Takes input command for process as any arguments and builds process instance out of those. More...
 

Public Attributes

std::vector< std::string > cmd
 cmd for the process execution More...
 
std::vector< std::filesystem::path > input
 input files that shall be monitored for changes More...
 
std::vector< std::filesystem::path > output
 output files that shall be monitored for timestamps More...
 
std::optional< std::filesystem::path > retcode_file
 

Detailed Description

Job-friendly structure for definition of subprocess to be executed.

This closely mirrors native make behavior.

Subprocess is defined by a cmd as a vector of strings. Contains list of input and output files, if any of the input files is more recent than any of the output files, process is marked as invalidated.

Member Function Documentation

◆ derive()

template<typename... Args>
process joque::process::derive ( Args &&...  args)
static

Takes input command for process as any arguments and builds process instance out of those.

In case std::filesystem::path is present, it is considered an input file and added to input attribute.

In case std::filesystem::path wrapped in out is present, it is unwrapped and considered an output fil and added to the output attribute.

References cmd, joque::f, input, and output.

◆ add_output()

process joque::process::add_output ( std::filesystem::path  p) &&

Adds an output path to the output files.

API is designed for tail chaining.

◆ add_input()

process joque::process::add_input ( std::filesystem::path  p) &&

◆ set_retcode_file()

process joque::process::set_retcode_file ( std::filesystem::path  p) &&

Member Data Documentation

◆ cmd

std::vector< std::string > joque::process::cmd

cmd for the process execution

◆ input

std::vector< std::filesystem::path > joque::process::input

input files that shall be monitored for changes

◆ output

std::vector< std::filesystem::path > joque::process::output

output files that shall be monitored for timestamps

◆ retcode_file

std::optional< std::filesystem::path > joque::process::retcode_file

The documentation for this struct was generated from the following file: