------------------------------------------------------------------------------
| 565 | |
| 566 | //------------------------------------------------------------------------------ |
| 567 | int vtkExecutive::ForwardUpstream(vtkInformation* request) |
| 568 | { |
| 569 | // Do not forward upstream if the input is shared with another |
| 570 | // executive. |
| 571 | if (this->SharedInputInformation) |
| 572 | { |
| 573 | return 1; |
| 574 | } |
| 575 | |
| 576 | if (!this->Algorithm->ModifyRequest(request, BeforeForward)) |
| 577 | { |
| 578 | return 0; |
| 579 | } |
| 580 | |
| 581 | // Forward the request upstream through all input connections. |
| 582 | int result = 1; |
| 583 | for (int i = 0; i < this->GetNumberOfInputPorts(); ++i) |
| 584 | { |
| 585 | int nic = this->Algorithm->GetNumberOfInputConnections(i); |
| 586 | vtkInformationVector* inVector = this->GetInputInformation()[i]; |
| 587 | for (int j = 0; j < nic; ++j) |
| 588 | { |
| 589 | vtkInformation* info = inVector->GetInformationObject(j); |
| 590 | // Get the executive producing this input. If there is none, then |
| 591 | // it is a nullptr input. |
| 592 | vtkExecutive* e; |
| 593 | int producerPort; |
| 594 | vtkExecutive::PRODUCER()->Get(info, e, producerPort); |
| 595 | if (e) |
| 596 | { |
| 597 | int port = request->Get(FROM_OUTPUT_PORT()); |
| 598 | request->Set(FROM_OUTPUT_PORT(), producerPort); |
| 599 | if (!e->ProcessRequest(request, e->GetInputInformation(), e->GetOutputInformation())) |
| 600 | { |
| 601 | result = 0; |
| 602 | } |
| 603 | request->Set(FROM_OUTPUT_PORT(), port); |
| 604 | } |
| 605 | } |
| 606 | } |
| 607 | |
| 608 | if (!this->Algorithm->ModifyRequest(request, AfterForward)) |
| 609 | { |
| 610 | return 0; |
| 611 | } |
| 612 | |
| 613 | return result; |
| 614 | } |
| 615 | |
| 616 | //------------------------------------------------------------------------------ |
| 617 | void vtkExecutive::CopyDefaultInformation(vtkInformation* request, int direction, |
no test coverage detected