MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / setCastValue_

Method setCastValue_

src/openms/source/FORMAT/AbsoluteQuantitationMethodFile.cpp:152–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150 }
151
152 void AbsoluteQuantitationMethodFile::setCastValue_(const String& key, const String& value, Param& params) const
153 {
154 const std::vector<String> param_doubles {
155 "slope", "intercept", "wavelength", "span", "delta", "x_datum_min", "y_datum_min", "x_datum_max", "y_datum_max"
156 };
157 const std::vector<String> param_ints {"num_nodes", "boundary_condition", "num_iterations"};
158 if (std::find(param_doubles.begin(), param_doubles.end(), key) != param_doubles.end())
159 {
160 params.setValue(key, value.empty() ? 0 : std::stod(value));
161 }
162 else if (std::find(param_ints.begin(), param_ints.end(), key) != param_ints.end())
163 {
164 params.setValue(key, value.empty() ? 0 : std::stoi(value));
165 }
166 else
167 {
168 params.setValue(key,value);
169 }
170 }
171} // namespace OpenMS

Callers

nothing calls this directly

Calls 4

beginMethod · 0.45
endMethod · 0.45
setValueMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected