MayaFlux 0.1.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 319 of file ComputePipeline.hpp.

320 {
321 auto it = std::ranges::find_if(m_operations,
322 [&name](const auto& op_pair) { return op_pair.second == name; });
323
324 if (it != m_operations.end()) {
325 m_operations.erase(it);
326 return true;
327 }
328 return false;
329 }
std::vector< std::pair< std::shared_ptr< ComputeOperation< InputType, OutputType > >, std::string > > m_operations
Operations and their names in execution order.