Skip to content

Check for type in set_parameter_value of parameter maps #259

@SprGrf

Description

@SprGrf

The following does not inherently check for type:

this->parameter_map_.set_parameter_value(parameter_name, parameter_value);

void set_parameter_value(const std::string& name, const T& value);

Use of this function does not check for type, only directly inserts or assigns the value. To be fair, it is mentioned right below that the validation part should be overwritten:

virtual void validate_and_set_parameter(const std::shared_ptr<ParameterInterface>& parameter);

But probably it could be made more clear. The current workaround is to get the parameter interface and then assign the value:

this->parameter_map_.get_parameter(parameter_name)->set_parameter_value<T>(parameter_value);

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions