------------------------------------------------------------------------------
| 178 | |
| 179 | //------------------------------------------------------------------------------ |
| 180 | int vtkHDFWriter::RequestData(vtkInformation* request, |
| 181 | vtkInformationVector** vtkNotUsed(inputVector), vtkInformationVector* vtkNotUsed(outputVector)) |
| 182 | { |
| 183 | if (!this->FileName) |
| 184 | { |
| 185 | return 1; |
| 186 | } |
| 187 | |
| 188 | this->WriteData(); |
| 189 | |
| 190 | if (this->IsTemporal) |
| 191 | { |
| 192 | if (this->CurrentTimeIndex == 0) |
| 193 | { |
| 194 | // Tell the pipeline to start looping in order to write all the timesteps |
| 195 | request->Set(vtkStreamingDemandDrivenPipeline::CONTINUE_EXECUTING(), 1); |
| 196 | } |
| 197 | |
| 198 | this->CurrentTimeIndex++; |
| 199 | |
| 200 | if (this->CurrentTimeIndex >= this->NumberOfTimeSteps) |
| 201 | { |
| 202 | // Tell the pipeline to stop looping. |
| 203 | request->Set(vtkStreamingDemandDrivenPipeline::CONTINUE_EXECUTING(), 0); |
| 204 | this->CurrentTimeIndex = 0; |
| 205 | this->Impl->CloseFile(); |
| 206 | } |
| 207 | } |
| 208 | else |
| 209 | { |
| 210 | this->Impl->CloseFile(); |
| 211 | } |
| 212 | |
| 213 | return 1; |
| 214 | } |
| 215 | |
| 216 | //------------------------------------------------------------------------------ |
| 217 | int vtkHDFWriter::FillInputPortInformation(int port, vtkInformation* info) |
no test coverage detected