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

◆ register_node() [1/2]

MAYAFLUX_API void MayaFlux::register_node ( const std::shared_ptr< Nodes::Node > &  node,
const CreationContext ctx 
)

Definition at line 16 of file Creator.cpp.

17{
18 auto token = get_node_token(ctx.domain.value());
19
20 if (ctx.channel.has_value()) {
21 register_node(node, token, ctx.channel.value());
22 } else if (ctx.channels.has_value()) {
23 for (uint32_t ch : ctx.channels.value()) {
24 register_node(node, token, ch);
25 }
26 } else if (node->get_channel_mask() != 0) {
27 for (uint32_t ch = 0; ch < 32; ++ch) {
28 if (node->get_channel_mask() & (1 << ch)) {
29 register_node(node, token, ch);
30 }
31 }
32 } else {
33 register_node(node, token, 0);
34 }
35}
static MayaFlux::Nodes::ProcessingToken token
Definition Timers.cpp:8
void register_node(const std::shared_ptr< Nodes::Node > &node, const Nodes::ProcessingToken &token, uint32_t channel)
Definition Graph.cpp:72
MAYAFLUX_API Nodes::ProcessingToken get_node_token(Domain domain)
Extracts node processing token from domain.
Definition Domain.hpp:174
std::optional< uint32_t > channel
Definition Creator.hpp:10
std::optional< std::vector< uint32_t > > channels
Definition Creator.hpp:11
std::optional< Domain > domain
Definition Creator.hpp:9

References MayaFlux::CreationContext::channel, MayaFlux::CreationContext::channels, MayaFlux::CreationContext::domain, get_node_token(), register_node(), and token.

+ Here is the call graph for this function: