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

Method SetNumberOfInputPorts

Common/ExecutionModel/vtkAlgorithm.cxx:995–1012  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

993
994//------------------------------------------------------------------------------
995void vtkAlgorithm::SetNumberOfInputPorts(int n)
996{
997 // Sanity check.
998 if (n < 0)
999 {
1000 vtkErrorMacro("Attempt to set number of input ports to " << n);
1001 n = 0;
1002 }
1003
1004 // We must remove all connections from ports that are removed.
1005 for (int i = n; i < this->GetNumberOfInputPorts(); ++i)
1006 {
1007 this->SetNumberOfInputConnections(i, 0);
1008 }
1009
1010 // Set the number of input port information objects.
1011 this->InputPortInformation->SetNumberOfInformationObjects(n);
1012}
1013
1014//------------------------------------------------------------------------------
1015int vtkAlgorithm::GetNumberOfOutputPorts()

Tested by 8

TestTimeSourceMethod · 0.36
TestTimeFilterMethod · 0.36
TestMultiTsAlgoMethod · 0.36
TestTemporalAlgorithmMethod · 0.36
MySourceMethod · 0.36
TestTimeSourceMethod · 0.36
TestTimeFilterMethod · 0.36