MayaFlux 0.3.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 179 of file MathematicalTransformer.hpp.

180 {
181 if (name == "operation") {
182 if (auto r = safe_any_cast<MathematicalOperation>(value)) {
183 m_operation = *r.value;
184 return;
185 }
186 if (auto r = safe_any_cast<std::string>(value)) {
187 if (auto e = Reflect::string_to_enum_case_insensitive<MathematicalOperation>(*r.value)) {
188 m_operation = *e;
189 return;
190 }
191 }
192 }
193
195 }
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)