MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Nodes::Network::OperatorChain Class Reference

Ordered sequence of secondary operators applied after the primary operator. More...

#include <OperatorChain.hpp>

+ Collaboration diagram for MayaFlux::Nodes::Network::OperatorChain:

Public Member Functions

void add (std::shared_ptr< NetworkOperator > op)
 Append an already-constructed operator to the chain.
 
void clear ()
 Remove all operators from the chain.
 
template<typename OpType , typename... Args>
std::shared_ptr< OpType > emplace (Args &&... args)
 Construct an operator in-place and append it.
 
bool empty () const
 Returns true when the chain contains no operators.
 
template<typename OpType >
std::shared_ptr< OpType > find () const
 Return the first operator whose dynamic type matches OpType, or nullptr.
 
std::shared_ptr< NetworkOperatorget (size_t index) const
 Return the operator at the given index, or nullptr if out of range.
 
OperatorChainoperator= (const OperatorChain &)=delete
 
OperatorChainoperator= (OperatorChain &&)=default
 
 OperatorChain ()=default
 
 OperatorChain (const OperatorChain &)=delete
 
 OperatorChain (OperatorChain &&)=default
 
const std::vector< std::shared_ptr< NetworkOperator > > & operators () const
 Read-only access to the underlying operator vector.
 
void process (float dt)
 Call process(dt) on each operator in insertion order.
 
void remove (const std::shared_ptr< NetworkOperator > &op)
 Remove a specific operator by pointer identity.
 
size_t size () const
 Number of operators currently in the chain.
 
 ~OperatorChain ()=default
 

Private Attributes

std::vector< std::shared_ptr< NetworkOperator > > m_operators
 

Detailed Description

Ordered sequence of secondary operators applied after the primary operator.

Mirrors the role of BufferProcessingChain relative to a Buffer's default processor. NodeNetwork subclasses hold one primary operator (m_operator / create_operator<T>) whose contract and external API remain unchanged. OperatorChain holds zero or more additional operators that run in insertion order immediately after the primary.

Ownership is shared: callers receive a shared_ptr<OpType> from emplace() and may retain it for runtime reconfiguration (rebinding Tendency fields, adjusting parameters) while the chain also holds a reference. Removal by pointer identity is supported via remove().

The chain has no knowledge of vertex layouts, domains, or which operator holds final vertex state. Those concerns belong to the owning NodeNetwork subclass, exposed via NodeNetwork::get_graphics_operator().

Thread safety: not internally synchronised. All mutations must occur outside the network's process_batch() call.

Definition at line 28 of file OperatorChain.hpp.


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