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

Method RequestInformation

Common/ExecutionModel/vtkTimeRange.cxx:33–69  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

31
32//------------------------------------------------------------------------------
33int vtkTimeRange::RequestInformation(
34 vtkInformationVector** inputVector, vtkInformationVector* outputVector)
35{
36 if (!inputVector || !inputVector[0])
37 {
38 vtkErrorMacro("Input vector is nullptr");
39 return 0;
40 }
41
42 auto inInfo = inputVector[0]->GetInformationObject(0);
43 if (!inInfo)
44 {
45 vtkErrorMacro("Input info is nullptr");
46 return 0;
47 }
48
49 if (inInfo->Has(vtkStreamingDemandDrivenPipeline::TIME_STEPS()))
50 {
51 this->NumberOfTimeSteps = inInfo->Length(vtkStreamingDemandDrivenPipeline::TIME_STEPS());
52 this->TimeValues.resize(this->NumberOfTimeSteps, 0.0);
53 auto timeValues = inInfo->Get(vtkStreamingDemandDrivenPipeline::TIME_STEPS());
54 std::copy(timeValues, timeValues + this->NumberOfTimeSteps, this->TimeValues.begin());
55 }
56 else
57 {
58 this->NumberOfTimeSteps = 1;
59 this->TimeValues.resize(this->NumberOfTimeSteps, 0.0);
60 this->TimeValues[0] = 0.0;
61 }
62
63 // Output is no longer temporal
64 auto outInfo = outputVector->GetInformationObject(0);
65 outInfo->Remove(vtkStreamingDemandDrivenPipeline::TIME_STEPS());
66 outInfo->Remove(vtkStreamingDemandDrivenPipeline::TIME_RANGE());
67
68 return 1;
69}
70
71//------------------------------------------------------------------------------
72int vtkTimeRange::RequestUpdateExtent(std::size_t iteration, vtkInformationVector** inputVector,

Callers

nothing calls this directly

Calls 8

GetInformationObjectMethod · 0.80
copyFunction · 0.50
HasMethod · 0.45
LengthMethod · 0.45
resizeMethod · 0.45
GetMethod · 0.45
beginMethod · 0.45
RemoveMethod · 0.45

Tested by

no test coverage detected