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

◆ remove_operation()

template<ComputeData InputType = std::vector<Kakshya::DataVariant>, ComputeData OutputType = InputType>
bool MayaFlux::Yantra::ComputationPipeline< InputType, OutputType >::remove_operation ( const std::string &  name)
inline

Remove operation by name.

Parameters
nameName of the operation to remove
Returns
True if operation was found and removed, false otherwise

Removes the first operation with the given name from the pipeline. If multiple operations have the same name, only the first one is removed.

Definition at line 328 of file ComputePipeline.hpp.

329 {
330 auto it = std::ranges::find_if(m_operations,
331 [&name](const auto& op_pair) { return op_pair.second == name; });
332
333 if (it != m_operations.end()) {
334 m_operations.erase(it);
335 return true;
336 }
337 return false;
338 }
std::vector< std::pair< std::shared_ptr< ComputeOperation< InputType, OutputType > >, std::string > > m_operations
Operations and their names in execution order.