| Taskflow: A General-purpose Task-parallel Programming System

Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
tf::TaskView Class Reference

class to access task information from the observer interface More...

`#include <taskflow/core/task.hpp>`

## Public Member Functions
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_predecessors () const
| queries the number of predecessors of the task
size_t | num_strong_dependencies () const
| queries the number of strong dependencies of the task
size_t | num_weak_dependencies () const
| 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
TaskType | type () const
| queries the task type
size_t | hash_value () const
| obtains a hash value of the underlying node

## Friends
class | Executor

## Detailed Description

class to access task information from the observer interface

## Member Function Documentation

## ◆ for_each_predecessor()

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::Task handle

Parameters

  visitor | visitor to apply to each predecessor task

This method allows you to traverse and inspect predecessor tasks of this task.

## ◆ for_each_successor()

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::Task handle

Parameters

  visitor | visitor to apply to each subflow task

This method allows you to traverse and inspect successor tasks of this task.

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

- taskflow/core/task.hpp