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

Method InputPortIndexInRange

Common/ExecutionModel/vtkExecutive.cxx:328–348  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

326
327//------------------------------------------------------------------------------
328int vtkExecutive::InputPortIndexInRange(int port, const char* action)
329{
330 // Make sure the algorithm is set.
331 if (!this->Algorithm)
332 {
333 vtkErrorMacro("Attempt to " << (action ? action : "access") << " input port index " << port
334 << " with no algorithm set.");
335 return 0;
336 }
337
338 // Make sure the index of the input port is in range.
339 if (port < 0 || port >= this->Algorithm->GetNumberOfInputPorts())
340 {
341 vtkErrorMacro("Attempt to " << (action ? action : "access") << " input port index " << port
342 << " for algorithm " << this->Algorithm->GetObjectDescription()
343 << ", which has " << this->Algorithm->GetNumberOfInputPorts()
344 << " input ports.");
345 return 0;
346 }
347 return 1;
348}
349
350//------------------------------------------------------------------------------
351int vtkExecutive::OutputPortIndexInRange(int port, const char* action)

Callers 1

GetInputInformationMethod · 0.95

Calls 2

GetNumberOfInputPortsMethod · 0.45
GetObjectDescriptionMethod · 0.45

Tested by

no test coverage detected