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

◆ set_transformation_parameter()

template<ComputeData InputType = std::vector<Kakshya::DataVariant>, ComputeData OutputType = InputType>
void MayaFlux::Yantra::MathematicalTransformer< InputType, OutputType >::set_transformation_parameter ( const std::string &  name,
std::any  value 
)
inlineoverrideprotectedvirtual

Sets transformation parameters.

Parameters
nameParameter name
valueParameter value

Handles setting of operation type and delegates other parameters to base class. Supports both enum and string values for the "operation" parameter.

Reimplemented from MayaFlux::Yantra::UniversalTransformer< InputType, OutputType >.

Definition at line 194 of file MathematicalTransformer.hpp.

195 {
196 if (name == "operation") {
197 if (auto op_result = safe_any_cast<MathematicalOperation>(value)) {
198 m_operation = *op_result.value;
199 return;
200 }
201 if (auto str_result = safe_any_cast<std::string>(value)) {
202 if (auto op_enum = Utils::string_to_enum_case_insensitive<MathematicalOperation>(*str_result.value)) {
203 m_operation = *op_enum;
204 return;
205 }
206 }
207 }
208
210 }
MathematicalOperation m_operation
Current mathematical operation.
virtual void set_transformation_parameter(const std::string &name, std::any value)
Transformation-specific parameter handling (override for custom parameters)