MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ connect()

void MayaFlux::Nodes::NodeGraphManager::connect ( const std::string &  source_id,
const std::string &  target_id 
)

Connects two nodes by their string identifiers.

Parameters
source_idIdentifier of the source node
target_idIdentifier of the target node

Looks up both nodes by their identifiers and establishes a connection where the output of the source node becomes an input to the target node.

Equivalent to:

connect(get_node(source_id), get_node(target_id));
void connect(const std::string &source_id, const std::string &target_id)
Connects two nodes by their string identifiers.
std::shared_ptr< Node > get_node(const std::string &id)
Looks up a node by its string identifier.

Throws an exception if either node identifier is not found.

Definition at line 461 of file NodeGraphManager.cpp.

462{
463 auto source = get_node(source_id);
464 auto target = get_node(target_id);
465
466 if (source && target) {
467 auto chain = std::make_shared<ChainNode>(source, target, *this);
468 chain->initialize();
469 }
470}
Tendency< A, C > chain(const Tendency< A, B > &first, const Tendency< B, C > &second)
Sequential composition: evaluate first, feed result into second.
Definition Tendency.hpp:82

References get_node().

+ Here is the call graph for this function: