------------------------------------------------------------------------------
| 75 | |
| 76 | //------------------------------------------------------------------------------ |
| 77 | int 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 | //------------------------------------------------------------------------------ |
| 107 | int vtkCollectGraph::RequestData(vtkInformation* vtkNotUsed(request), |
nothing calls this directly
no test coverage detected