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

Method UpdateProgress

Common/ExecutionModel/vtkAlgorithm.cxx:203–220  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Update the progress of the process object. If a ProgressMethod exists, executes it. Then set the Progress ivar to amount. The parameter amount should range between (0,1).

Source from the content-addressed store, hash-verified

201// executes it. Then set the Progress ivar to amount. The parameter amount
202// should range between (0,1).
203void vtkAlgorithm::UpdateProgress(double amount)
204{
205 amount = this->GetProgressShift() + this->GetProgressScale() * amount;
206
207 // clamp to [0, 1].
208 amount = vtkMath::Min(amount, 1.0);
209 amount = vtkMath::Max(amount, 0.0);
210
211 if (this->ProgressObserver)
212 {
213 this->ProgressObserver->UpdateProgress(amount);
214 }
215 else
216 {
217 this->Progress = amount;
218 this->InvokeEvent(vtkCommand::ProgressEvent, static_cast<void*>(&amount));
219 }
220}
221
222//------------------------------------------------------------------------------
223// Check to see if an input's ABORTED flag is set or if an upstream

Callers 3

RequestDataMethod · 0.45
ExecuteDataStartMethod · 0.45
ExecuteDataEndMethod · 0.45

Calls 3

MinFunction · 0.85
InvokeEventMethod · 0.80
MaxFunction · 0.50

Tested by

no test coverage detected