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

◆ operator|() [2/7]

std::shared_ptr< Nodes::Network::NodeNetwork > MayaFlux::operator| ( const TemporalWrapper< Nodes::Network::NodeNetwork > &  wrapper,
const CreationContext ctx 
)

Definition at line 74 of file Temporal.cpp.

75{
76 auto network = wrapper.entity();
77 const auto& spec = wrapper.spec();
78 auto node_token = get_node_token(ctx.domain.value());
79 auto task_token = get_task_token(ctx.domain.value());
80
81 auto activation = std::make_shared<Kriya::TemporalActivation>(
83
84 activation->activate_network(network, spec.seconds, node_token);
85
86 static std::vector<std::shared_ptr<Kriya::TemporalActivation>> active_timers;
87 active_timers.push_back(activation);
88
89 if (active_timers.size() > 100) {
90 std::erase_if(active_timers, [](const std::shared_ptr<Kriya::TemporalActivation>& t) {
91 return !t->is_active();
92 });
93 }
94
95 return network;
96}
Core::GlobalNetworkConfig network
Definition Config.cpp:39
MAYAFLUX_API Vruta::ProcessingToken get_task_token(Domain domain)
Extracts task processing token from domain.
Definition Domain.hpp:194
MAYAFLUX_API Nodes::ProcessingToken get_node_token(Domain domain)
Extracts node processing token from domain.
Definition Domain.hpp:174
std::shared_ptr< Nodes::NodeGraphManager > get_node_graph_manager()
Gets the node graph manager from the default engine.
Definition Graph.cpp:35
std::shared_ptr< Buffers::BufferManager > get_buffer_manager()
Gets the buffer manager from the default engine.
Definition Graph.cpp:132
std::shared_ptr< Vruta::TaskScheduler > get_scheduler()
Gets the task scheduler from the default engine.
Definition Chronie.cpp:22
std::optional< Domain > domain
Definition Creator.hpp:20

References MayaFlux::CreationContext::domain, get_buffer_manager(), get_node_graph_manager(), get_node_token(), get_scheduler(), get_task_token(), and network.

+ Here is the call graph for this function: