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

Method OutputPortIndexInRange

Common/ExecutionModel/vtkExecutive.cxx:351–371  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

349
350//------------------------------------------------------------------------------
351int vtkExecutive::OutputPortIndexInRange(int port, const char* action)
352{
353 // Make sure the algorithm is set.
354 if (!this->Algorithm)
355 {
356 vtkErrorMacro("Attempt to " << (action ? action : "access") << " output port index " << port
357 << " with no algorithm set.");
358 return 0;
359 }
360
361 // Make sure the index of the output port is in range.
362 if (port < 0 || port >= this->Algorithm->GetNumberOfOutputPorts())
363 {
364 vtkErrorMacro("Attempt to " << (action ? action : "access") << " output port index " << port
365 << " for algorithm " << this->Algorithm->GetObjectDescription()
366 << ", which has " << this->Algorithm->GetNumberOfOutputPorts()
367 << " output ports.");
368 return 0;
369 }
370 return 1;
371}
372
373//------------------------------------------------------------------------------
374// vtkAlgorithmOutput* vtkExecutive::GetProducerPort(vtkDataObject* d)

Callers 1

GetOutputDataMethod · 0.95

Calls 2

GetObjectDescriptionMethod · 0.45

Tested by

no test coverage detected