wrench::DagOfTasks

class DagOfTasks

An internal class that uses the Boost Graph Library to implement a DAG of WorkflowTask objects.

Public Functions

void addEdge(WorkflowTask *src, WorkflowTask *dst)

Method to add an edge between to task vertices.

Parameters:
  • src – the source task

  • dst – the destination task

void addVertex(const WorkflowTask *task)

Method to add a task vertex to the DAG.

Parameters:

task – the task

bool doesEdgeExist(const WorkflowTask *src, const WorkflowTask *dst)

Method to check whether an edge exists between to task vertices.

Parameters:
  • src – the source task

  • dst – the destination task

Returns:

true if there is a path between the tasks

bool doesPathExist(const WorkflowTask *src, const WorkflowTask *dst)

Method to check whether a path exists between to task vertices.

Parameters:
  • src – the source task

  • dst – the destination task

Returns:

true if there is a path between the tasks

std::vector<WorkflowTask*> getChildren(const WorkflowTask *task)

Method to get the children of a task vertex.

Parameters:

task – the task

Returns:

the children

long getNumberOfChildren(const WorkflowTask *task)

Method to get the number of children of a task vertex.

Parameters:

task – the task

Returns:

a number children

long getNumberOfParents(const WorkflowTask *task)

Method to get the number of parents of a task vertex.

Parameters:

task – the task

Returns:

a number parents

std::vector<WorkflowTask*> getParents(const WorkflowTask *task)

Method to get the parents of a task vertex.

Parameters:

task – the task

Returns:

the parents

void removeEdge(WorkflowTask *src, WorkflowTask *dst)

Remove an edge between two task vertices.

Parameters:
  • src – the source task

  • dst – the destination task

void removeVertex(WorkflowTask *task)

Method to remove a task vertex from the DAG.

Parameters:

task – the task