Deprecated extensions to the flow graph classes to support traversal and extraction of graph nodes:
#define TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1 #include "tbb/flow_graph.h"
The flow graph node classes additionally define the following typedefs and methods:
namespace tbb { namespace flow { class graph_node { public: typedef implementation-defined predecessor_type; // all but source_node typedef implementation-defined predecessor_list_type; // all but source_node typedef implementation-defined successor_type; typedef implementation-defined successor_list_type; size_t predecessor_count(); // all but source_node size_t successor_count(); void copy_predecessors(predecessor_list_type &pv); // all but source_node void copy_successors(successor_list_type &sv); void extract( ); }; } }
The methods added to the graph_node class are not thread-safe. The graph should not be active when they are used.
Member | Description |
---|---|
predecessor_type |
Defines the type of the elements of predecessor_list_type. This type is not defined for source_node. |
predecessor_list_type |
Defines the type returned by copy_predecessors(). This class will have size(), begin(), end() and iterator types defined. This type is not defined for source_node. |
successor_type |
Defines the type of the element of successor_list_type. |
successor_list_type |
Defines the type returned by copy_successors(). This class will have size(), begin(), end() and iterator types defined. |
size_t predecessor_count(); |
Returns the number of graph nodes which have been attached as predecessors to the current node with make_edge() and not removed with remove_edge() or by calling extract() or reset(rf_clear_edges). This method is not defined for source_node. |
size_t successor_count(); |
Returns the number of graph nodes which have been attached as successors to the current node with make_edge() and not removed with remove_edge() or by calling extract() or reset(rf_clear_edges) . |
void copy_predecessors(predecessor_list_type &pv); |
Returns a data structure containing pointers to all the predecessors of the node. This method is not defined for source_node. |
void copy_successors(successor_list_type &sv); |
Returns a data structure containing pointers to all the successors of the node. |
void extract( ) |
Removes all edges to the node. |