Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::dsp::graph::Graph Class Referencefinal

The Graph class represents a graph of DSP nodes. More...

#include <src/dsp/graph.h>

Public Member Functions

void print () const
GraphNodeadd_node_for_processable (IProcessable &node)
 Creates a new node, adds it to the graph and returns it.
GraphNodeadd_initial_processor ()
bool is_valid () const
 Checks for cycles in the graph.
auto && steal_nodes ()
 Steals the nodes in the graph.
auto & get_nodes ()
auto & get_nodes () const
void finalize_nodes ()

Friends

class GraphExport

Detailed Description

The Graph class represents a graph of DSP nodes.

The Graph class manages the lifecycle of DSP nodes and their connections, allowing for efficient parallel processing of the graph. It provides functionality to start and terminate the processing, add and remove nodes, and manage the overall graph structure.

Definition at line 19 of file graph.h.

Member Function Documentation

◆ add_initial_processor()

GraphNode * zrythm::dsp::graph::Graph::add_initial_processor ( )
inline

Definition at line 35 of file graph.h.

◆ add_node_for_processable()

GraphNode * zrythm::dsp::graph::Graph::add_node_for_processable ( IProcessable & node)

Creates a new node, adds it to the graph and returns it.

Note
This method does not allow duplicates. If a duplicate is attempted to be added, this method will return the existing node without adding a new node.

◆ finalize_nodes()

void zrythm::dsp::graph::Graph::finalize_nodes ( )
inline

Definition at line 59 of file graph.h.

◆ get_nodes() [1/2]

auto & zrythm::dsp::graph::Graph::get_nodes ( )
inline

Definition at line 55 of file graph.h.

◆ get_nodes() [2/2]

auto & zrythm::dsp::graph::Graph::get_nodes ( ) const
inline

Definition at line 57 of file graph.h.

◆ is_valid()

bool zrythm::dsp::graph::Graph::is_valid ( ) const

Checks for cycles in the graph.

Returns
Whether valid.

◆ steal_nodes()

auto && zrythm::dsp::graph::Graph::steal_nodes ( )
inline

Steals the nodes in the graph.

After this function is called, the graph will be empty.

Definition at line 53 of file graph.h.

◆ GraphExport

friend class GraphExport
friend

Definition at line 21 of file graph.h.


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