------------------------------------------------------------------------------
| 326 | |
| 327 | //------------------------------------------------------------------------------ |
| 328 | int 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 | //------------------------------------------------------------------------------ |
| 351 | int vtkExecutive::OutputPortIndexInRange(int port, const char* action) |
no test coverage detected