| 195 | vtkNew<vtkDataArraySelection> FieldArraySelection; |
| 196 | |
| 197 | int CheckVersion(const char* filename) |
| 198 | { |
| 199 | if (!this->SOSFile.SetFileNamePattern(filename, true)) |
| 200 | { |
| 201 | vtkGenericWarningMacro("EnSight SOS file " << filename << " could not be opened"); |
| 202 | return false; |
| 203 | } |
| 204 | |
| 205 | auto result = this->SOSFile.ReadNextLine(); |
| 206 | bool formatFound = false; |
| 207 | do |
| 208 | { |
| 209 | if (result.second.find("FORMAT") != std::string::npos) |
| 210 | { |
| 211 | formatFound = true; |
| 212 | } |
| 213 | else if (formatFound && result.second.find("type") != std::string::npos) |
| 214 | { |
| 215 | if (result.second.find("master_server") != std::string::npos || |
| 216 | result.second.find("gold") != std::string::npos) |
| 217 | { |
| 218 | return true; |
| 219 | } |
| 220 | } |
| 221 | result = this->SOSFile.ReadNextLine(); |
| 222 | } while (result.first); |
| 223 | return false; |
| 224 | } |
| 225 | |
| 226 | bool ParseSOSFile(const char* filename) |
| 227 | { |
nothing calls this directly
no test coverage detected