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

Method RequestDataObject

Filters/Parallel/vtkCollectGraph.cxx:77–104  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

75
76//------------------------------------------------------------------------------
77int vtkCollectGraph::RequestDataObject(
78 vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector)
79{
80 if (this->OutputType == USE_INPUT_TYPE)
81 {
82 return Superclass::RequestDataObject(request, inputVector, outputVector);
83 }
84
85 vtkGraph* output = nullptr;
86 if (this->OutputType == DIRECTED_OUTPUT)
87 {
88 output = vtkDirectedGraph::New();
89 }
90 else if (this->OutputType == UNDIRECTED_OUTPUT)
91 {
92 output = vtkUndirectedGraph::New();
93 }
94 else
95 {
96 vtkErrorMacro(<< "Invalid output type setting.");
97 return 0;
98 }
99 vtkInformation* info = outputVector->GetInformationObject(0);
100 info->Set(vtkDataObject::DATA_OBJECT(), output);
101 output->Delete();
102
103 return 1;
104}
105
106//------------------------------------------------------------------------------
107int vtkCollectGraph::RequestData(vtkInformation* vtkNotUsed(request),

Callers

nothing calls this directly

Calls 5

GetInformationObjectMethod · 0.80
DeleteMethod · 0.65
RequestDataObjectFunction · 0.50
NewFunction · 0.50
SetMethod · 0.45

Tested by

no test coverage detected