------------------------------------------------------------------------------
| 814 | |
| 815 | //------------------------------------------------------------------------------ |
| 816 | void EnSightDataSet::ParseTimeSection() |
| 817 | { |
| 818 | bool moreTimeSets = true; |
| 819 | auto result = this->CaseFile.ReadNextLine(MAX_CASE_LINE_LENGTH); |
| 820 | while (moreTimeSets && result.first) |
| 821 | { |
| 822 | std::shared_ptr<TimeSetInfo> tsInfo(new TimeSetInfo); |
| 823 | int timeSet, startNum = -1, increment = -1; |
| 824 | |
| 825 | while (result.first) |
| 826 | { |
| 827 | std::string& line = result.second; |
| 828 | if (this->IsSectionHeader(line)) |
| 829 | { |
| 830 | this->CaseFile.GoBackOneLine(); |
| 831 | break; |
| 832 | } |
| 833 | |
| 834 | std::string lineType; |
| 835 | extractLinePart(GetLineTypeRegEx(), line, lineType); |
| 836 | if (lineType == "time set:") |
| 837 | { |
| 838 | moreTimeSets = false; |
| 839 | extractLinePart(GetIntRegEx(), line, timeSet); |
| 840 | } |
| 841 | else if (lineType == "number of steps:") |
| 842 | { |
| 843 | extractLinePart(GetIntRegEx(), line, tsInfo->NumberOfSteps); |
| 844 | } |
| 845 | else if (lineType == "filename start number:") |
| 846 | { |
| 847 | extractLinePart(GetIntRegEx(), line, startNum); |
| 848 | } |
| 849 | else if (lineType == "filename increment:") |
| 850 | { |
| 851 | extractLinePart(GetIntRegEx(), line, increment); |
| 852 | } |
| 853 | else if (lineType == "time values:") |
| 854 | { |
| 855 | readCaseFileValues(this->CaseFile, line, tsInfo->TimeValues); |
| 856 | this->AllTimeSteps.insert( |
| 857 | this->AllTimeSteps.end(), tsInfo->TimeValues.begin(), tsInfo->TimeValues.end()); |
| 858 | } |
| 859 | else if (lineType == "filename numbers:") |
| 860 | { |
| 861 | readCaseFileValues(this->CaseFile, line, tsInfo->FileNameNumbers); |
| 862 | } |
| 863 | else if (lineType == "filename numbers file:") |
| 864 | { |
| 865 | std::string filename; |
| 866 | extractFileName(line, filename); |
| 867 | readFileValues(this->GetFullPath(filename), tsInfo->FileNameNumbers); |
| 868 | } |
| 869 | else if (lineType == "time values file:") |
| 870 | { |
| 871 | std::string filename; |
| 872 | extractFileName(line, filename); |
| 873 | readFileValues(this->GetFullPath(filename), tsInfo->TimeValues); |
no test coverage detected