Taskflow  3.2.0-Master-Branch
Loading...
Searching...
No Matches
tf::Graph Class Reference

class to create a graph object More...

#include <graph.hpp>

Public Member Functions

 Graph ()=default
 constructs a graph object
 
 Graph (const Graph &)=delete
 disabled copy constructor
 
 Graph (Graph &&)
 constructs a graph using move semantics
 
 ~Graph ()
 destructs the graph object
 
Graphoperator= (const Graph &)=delete
 disabled copy assignment operator
 
Graphoperator= (Graph &&)
 assigns a graph using move semantics
 
bool empty () const
 queries if the graph is empty
 
size_t size () const
 queries the number of nodes in the graph
 
void clear ()
 clears the graph
 

Friends

class Node
 
class FlowBuilder
 
class Subflow
 
class Taskflow
 
class Executor
 

Detailed Description

class to create a graph object

A graph is the ultimate storage for a task dependency graph and is the main gateway to interact with an executor. A graph manages a set of nodes in a global object pool that animates and recycles node objects efficiently without going through repetitive and expensive memory allocations and deallocations. This class is mainly used for creating an opaque graph object in a custom class to interact with the executor through taskflow composition.

A graph object is move-only.


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