------------------------------------------------------------------------------
| 1620 | |
| 1621 | //------------------------------------------------------------------------------ |
| 1622 | vtkAlgorithmOutput* vtkAlgorithm::GetInputConnection(int port, int index) |
| 1623 | { |
| 1624 | if (port < 0 || port >= this->GetNumberOfInputPorts()) |
| 1625 | { |
| 1626 | vtkErrorMacro("Attempt to get connection index " << index << " for input port " << port |
| 1627 | << ", for an algorithm with " |
| 1628 | << this->GetNumberOfInputPorts() << " ports."); |
| 1629 | return nullptr; |
| 1630 | } |
| 1631 | if (index < 0 || index >= this->GetNumberOfInputConnections(port)) |
| 1632 | { |
| 1633 | return nullptr; |
| 1634 | } |
| 1635 | if (vtkInformation* info = this->GetExecutive()->GetInputInformation(port, index)) |
| 1636 | { |
| 1637 | // Get the executive producing this input. If there is none, then |
| 1638 | // it is a nullptr input. |
| 1639 | vtkExecutive* producer; |
| 1640 | int producerPort; |
| 1641 | vtkExecutive::PRODUCER()->Get(info, producer, producerPort); |
| 1642 | if (producer) |
| 1643 | { |
| 1644 | return producer->GetAlgorithm()->GetOutputPort(producerPort); |
| 1645 | } |
| 1646 | } |
| 1647 | return nullptr; |
| 1648 | } |
| 1649 | |
| 1650 | //------------------------------------------------------------------------------ |
| 1651 | void vtkAlgorithm::Update() |
no test coverage detected