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

Method RequestDataObject

IO/Infovis/vtkDIMACSGraphReader.cxx:505–527  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

503
504//------------------------------------------------------------------------------
505int vtkDIMACSGraphReader::RequestDataObject(
506 vtkInformation*, vtkInformationVector**, vtkInformationVector*)
507{
508 ReadGraphMetaData();
509
510 vtkDataObject* current = this->GetExecutive()->GetOutputData(0);
511 if (!current || (this->Directed && !vtkDirectedGraph::SafeDownCast(current)) ||
512 (!this->Directed && vtkDirectedGraph::SafeDownCast(current)))
513 {
514 vtkGraph* output = nullptr;
515 if (this->Directed)
516 {
517 output = vtkDirectedGraph::New();
518 }
519 else
520 {
521 output = vtkUndirectedGraph::New();
522 }
523 this->GetExecutive()->SetOutputData(0, output);
524 output->Delete();
525 }
526 return 1;
527}
528VTK_ABI_NAMESPACE_END

Callers

nothing calls this directly

Calls 5

SetOutputDataMethod · 0.80
DeleteMethod · 0.65
NewFunction · 0.50
GetOutputDataMethod · 0.45
GetExecutiveMethod · 0.45

Tested by

no test coverage detected