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

Method ForwardUpstream

Common/ExecutionModel/vtkExecutive.cxx:567–614  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

565
566//------------------------------------------------------------------------------
567int 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//------------------------------------------------------------------------------
617void vtkExecutive::CopyDefaultInformation(vtkInformation* request, int direction,

Callers 3

ProcessRequestMethod · 0.95
ProcessRequestMethod · 0.45
ProcessRequestMethod · 0.45

Calls 9

GetNumberOfInputPortsMethod · 0.95
ModifyRequestMethod · 0.80
GetInformationObjectMethod · 0.80
GetInputInformationMethod · 0.45
GetMethod · 0.45
SetMethod · 0.45
ProcessRequestMethod · 0.45
GetOutputInformationMethod · 0.45

Tested by

no test coverage detected