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

◆ apply_context_parameters()

template<typename OperationType >
void MayaFlux::Yantra::apply_context_parameters ( std::shared_ptr< OperationType operation,
const ExecutionContext ctx 
)

Applies context parameters to an operation.

Template Parameters
OperationTypeType of operation to configure
Parameters
operationOperation instance to configure
ctxExecution context containing parameters

Definition at line 148 of file GrammarHelper.hpp.

149{
150 for (const auto& [ctx_name, ctx_value] : ctx.execution_metadata) {
151 try {
152 operation->set_parameter(ctx_name, ctx_value);
153 } catch (...) {
154 MF_DEBUG(
155 Journal::Component::Yantra,
156 Journal::Context::Runtime,
157 "Context parameter '{}' with type {} does not apply to operation '{}'",
158 ctx_name,
159 ctx_value.type().name(),
160 operation->get_name());
161 }
162 }
163}
#define MF_DEBUG(comp, ctx,...)

References MayaFlux::Yantra::ExecutionContext::execution_metadata, MF_DEBUG, MayaFlux::Journal::Runtime, and MayaFlux::Journal::Yantra.

Referenced by MayaFlux::Yantra::Granular::process(), and MayaFlux::Yantra::Granular::process().

+ Here is the caller graph for this function: