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

Method GetInputInformation

Common/ExecutionModel/vtkExecutive.cxx:62–101  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

60
61//------------------------------------------------------------------------------
62vtkInformationVector** vtkExecutiveInternals::GetInputInformation(int newNumberOfPorts)
63{
64 // Adjust the number of vectors.
65 int oldNumberOfPorts = static_cast<int>(this->InputInformation.size());
66 if (newNumberOfPorts > oldNumberOfPorts)
67 {
68 // Create new vectors.
69 this->InputInformation.resize(newNumberOfPorts, nullptr);
70 for (int i = oldNumberOfPorts; i < newNumberOfPorts; ++i)
71 {
72 this->InputInformation[i] = vtkInformationVector::New();
73 }
74 }
75 else if (newNumberOfPorts < oldNumberOfPorts)
76 {
77 // Delete old vectors.
78 for (int i = newNumberOfPorts; i < oldNumberOfPorts; ++i)
79 {
80 if (vtkInformationVector* v = this->InputInformation[i])
81 {
82 // Set the pointer to nullptr first to avoid reporting of the
83 // entry if deleting the vector causes a garbage collection
84 // reference walk.
85 this->InputInformation[i] = nullptr;
86 v->Delete();
87 }
88 }
89 this->InputInformation.resize(newNumberOfPorts);
90 }
91
92 // Return the array of information vector pointers.
93 if (newNumberOfPorts > 0)
94 {
95 return this->InputInformation.data();
96 }
97 else
98 {
99 return nullptr;
100 }
101}
102
103//------------------------------------------------------------------------------
104vtkExecutive::vtkExecutive()

Callers 3

GetInputDataMethod · 0.45
ForwardUpstreamMethod · 0.45

Calls 8

InputPortIndexInRangeMethod · 0.95
GetInformationObjectMethod · 0.80
DeleteMethod · 0.65
NewFunction · 0.50
sizeMethod · 0.45
resizeMethod · 0.45
dataMethod · 0.45
GetNumberOfInputPortsMethod · 0.45

Tested by

no test coverage detected