|
Cpp-Taskflow
2.0.0
|
Handle to modify and access a task. More...
#include <task.hpp>
Public Member Functions | |
| Task ()=default | |
| constructs an empty task | |
| Task (const Task &other) | |
| constructs the task with the copy of the other task | |
| Task (Task &&other) | |
| constructs the task with the content of the other task using move semantics More... | |
| Task & | operator= (const Task &) |
| replaces the contents with a copy of the other task | |
| const std::string & | name () const |
| queries the name of the task | |
| size_t | num_successors () const |
| queries the number of successors of the task | |
| size_t | num_dependents () const |
| queries the number of predecessors of the task | |
| Task & | name (const std::string &name) |
| assigns a name to the task More... | |
| template<typename C > | |
| Task & | work (C &&callable) |
| assigns a new callable object to the task More... | |
| template<typename... Ts> | |
| Task & | precede (Ts &&... tasks) |
| adds precedence links from this to other tasks More... | |
| Task & | precede (std::vector< Task > &tasks) |
| adds precedence links from this to others More... | |
| Task & | precede (std::initializer_list< Task > tasks) |
| adds precedence links from this to others More... | |
| template<typename... Ts> | |
| Task & | gather (Ts &&... tasks) |
| adds precedence links from other tasks to this More... | |
| Task & | gather (std::vector< Task > &tasks) |
| adds precedence links from other tasks to this More... | |
| Task & | gather (std::initializer_list< Task > tasks) |
| adds precedence links from other tasks to this More... | |
Friends | |
| class | FlowBuilder |
| template<template< typename... > typename E> | |
| class | BasicTaskflow |
Handle to modify and access a task.
A Task is a wrapper of a node in a dependency graph. It provides a set of methods for users to access and modify the attributes of the task node, preventing direct access to the internal data storage.
|
inline |
constructs the task with the content of the other task using move semantics
After the move, other is guaranteed to be empty
| Task & tf::Task::gather | ( | Bs &&... | tasks | ) |
adds precedence links from other tasks to this
| Ts | parameter pack |
| tasks... | one or multiple tasks |
*this
|
inline |
adds precedence links from other tasks to this
| tasks | a vector of tasks |
*this
|
inline |
adds precedence links from other tasks to this
| tasks | an initializer list of tasks |
*this
|
inline |
| Task & tf::Task::precede | ( | Ts &&... | tasks | ) |
adds precedence links from this to other tasks
| Ts... | parameter pack |
| tasks... | one or multiple tasks |
*this
|
inline |
adds precedence links from this to others
| tasks | a vector of tasks to precede |
*this
|
inline |
adds precedence links from this to others
| tasks | an initializer list of tasks to precede |
*this
|
inline |
assigns a new callable object to the task
| C | callable object type |
| callable | a callable object acceptable to std::function |
*this