MCPcopy Create free account
hub / github.com/Kitware/VTK / ConsumeNextAlgorithmParameter

Method ConsumeNextAlgorithmParameter

Filters/Statistics/vtkStatisticsAlgorithm.cxx:220–260  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

218
219//------------------------------------------------------------------------------
220std::size_t vtkStatisticsAlgorithm::ConsumeNextAlgorithmParameter(
221 vtkStringToken parameterName, const std::string& algorithmParameters)
222{
223 using namespace vtk::literals;
224 std::size_t consumed = 0;
225 switch (parameterName.GetHash())
226 {
227 case "assess_names"_hash:
228 {
229 vtkNew<vtkStringArray> tuple;
230 tuple->SetName("AssessNames");
231 consumed = this->ConsumeStringTuple(algorithmParameters, tuple);
232 if (consumed > 0)
233 {
234 this->SetAssessNames(tuple);
235 }
236 }
237 break;
238 case "ghosts_to_skip"_hash:
239 {
240 int value;
241 if ((consumed = this->ConsumeInt(algorithmParameters, value)))
242 {
243 this->SetGhostsToSkip(static_cast<unsigned char>(value));
244 }
245 }
246 break;
247 case "skip_invalid_values"_hash:
248 {
249 int value;
250 if ((consumed = this->ConsumeInt(algorithmParameters, value)))
251 {
252 this->SetSkipInvalidValues(static_cast<bool>(value));
253 }
254 }
255 break;
256 default:
257 break;
258 }
259 return consumed;
260}
261
262//------------------------------------------------------------------------------
263int vtkStatisticsAlgorithm::FillInputPortInformation(int port, vtkInformation* info)

Callers 1

Calls 5

ConsumeStringTupleMethod · 0.95
ConsumeIntMethod · 0.95
GetHashMethod · 0.80
SetGhostsToSkipMethod · 0.80
SetNameMethod · 0.45

Tested by

no test coverage detected