class
#include <taskflow/core/task.hpp>
TaskView class to access task information from the observer interface
Public functions
-
auto name() const -> const std::
string& - queries the name of the task
- auto num_successors() const -> size_t
- queries the number of successors of the task
- auto num_predecessors() const -> size_t
- queries the number of predecessors of the task
- auto num_strong_dependencies() const -> size_t
- queries the number of strong dependencies of the task
- auto num_weak_dependencies() const -> size_t
- queries the number of weak dependencies of the task
-
template<typename V>void for_each_successor(V&& visitor) const
- applies an visitor callable to each successor of the task
-
template<typename V>void for_each_predecessor(V&& visitor) const
- applies an visitor callable to each predecessor of the task
- auto type() const -> TaskType
- queries the task type
- auto hash_value() const -> size_t
- obtains a hash value of the underlying node
Function documentation
template<typename V>
void tf:: TaskView:: for_each_successor(V&& visitor) const
applies an visitor callable to each successor of the task
Template parameters | |
---|---|
V | a callable type (function, lambda, etc.) that accepts a tf:: |
Parameters | |
visitor | visitor to apply to each subflow task |
This method allows you to traverse and inspect successor tasks of this task.
template<typename V>
void tf:: TaskView:: for_each_predecessor(V&& visitor) const
applies an visitor callable to each predecessor of the task
Template parameters | |
---|---|
V | a callable type (function, lambda, etc.) that accepts a tf:: |
Parameters | |
visitor | visitor to apply to each predecessor task |
This method allows you to traverse and inspect predecessor tasks of this task.