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

◆ add()

template<std::derived_from< RelationOperator > Op, typename... Args>
requires std::constructible_from<Op, Args...>
std::shared_ptr< Op > MayaFlux::Nodes::Network::RelationNetwork::add ( Args &&...  args)
inline

Construct an operator in place and append it to the chain.

Template Parameters
OpConcrete RelationOperator type
Parameters
argsForwarded to the Op constructor
Returns
Shared pointer to the operator, retained by the network

The operator receives the current slot storage before it is returned, so its public methods are callable immediately. An operator whose publishes_output() is true becomes a source of published outputs.

Definition at line 94 of file RelationNetwork.hpp.

95 {
96 auto op = get_operator_chain()->emplace<Op>(std::forward<Args>(args)...);
97 op->set_slots(m_slots);
98 if (op->publishes_output()) {
99 m_publishers.push_back(op);
100 }
101 return op;
102 }
std::shared_ptr< OperatorChain > get_operator_chain() const
Access the secondary operator chain.
std::vector< std::shared_ptr< RelationOperator > > m_publishers