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

◆ add_processor()

void MayaFlux::Kakshya::DataProcessingChain::add_processor ( std::shared_ptr< DataProcessor processor,
std::shared_ptr< SignalSourceContainer container,
const std::string &  tag = "" 
)

Adds a processor to the chain for a specific container.

Parameters
processorThe data processor to add
containerThe signal container the processor will operate on
tagOptional tag for categorizing processors (enables logical grouping and selective execution)

Processors are appended to the end of the container's processing sequence by default.

Definition at line 5 of file DataProcessingChain.cpp.

6{
7 processor->on_attach(container);
8 m_container_processors[container].emplace_back(processor);
9 if (!tag.empty()) {
10 m_processor_tags[processor] = tag;
11 }
12}
std::unordered_map< std::shared_ptr< DataProcessor >, std::string > m_processor_tags
Maps processors to their associated tags for categorization and filtering.
std::unordered_map< std::shared_ptr< SignalSourceContainer >, std::vector< std::shared_ptr< DataProcessor > > > m_container_processors
Maps containers to their associated processors in sequence order.

References m_container_processors, and m_processor_tags.