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

Method CheckForMultipleTimeSteps

IO/EnSight/core/EnSightFile.cxx:296–318  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

294
295//------------------------------------------------------------------------------
296bool EnSightFile::CheckForMultipleTimeSteps()
297{
298 // if there's wildcards in the name then we have multiple time steps
299 if (hasWildcards(this->FileNamePattern))
300 {
301 return true;
302 }
303
304 // we have to check if there's a BEGIN TIME STEP line to see if there's multiple time steps
305 if (!this->OpenFile())
306 {
307 vtkGenericWarningMacro("the file " << this->FileNamePattern << " could not be opened");
308 return false;
309 }
310
311 auto result = this->ReadNextLine();
312 this->ResetFile();
313 if (result.second.find("BEGIN TIME STEP") == std::string::npos)
314 {
315 return false;
316 }
317 return true;
318}
319
320//------------------------------------------------------------------------------
321void EnSightFile::CheckForBeginTimeStepLine()

Callers 1

ParseGeometrySectionMethod · 0.80

Calls 5

OpenFileMethod · 0.95
ReadNextLineMethod · 0.95
ResetFileMethod · 0.95
hasWildcardsFunction · 0.85
findMethod · 0.45

Tested by

no test coverage detected