------------------------------------------------------------------------------
| 914 | |
| 915 | //------------------------------------------------------------------------------ |
| 916 | void EnSightDataSet::ParseFileSection() |
| 917 | { |
| 918 | bool moreFileSets = true; |
| 919 | auto result = this->CaseFile.ReadNextLine(MAX_CASE_LINE_LENGTH); |
| 920 | while (moreFileSets && result.first) |
| 921 | { |
| 922 | std::shared_ptr<FileSetInfo> fsInfo(new FileSetInfo); |
| 923 | int fileSet = -1, numSteps = -1, fileIndex = -1; |
| 924 | moreFileSets = false; |
| 925 | |
| 926 | while (result.first) |
| 927 | { |
| 928 | std::string& line = result.second; |
| 929 | if (this->IsSectionHeader(line)) |
| 930 | { |
| 931 | this->CaseFile.GoBackOneLine(); |
| 932 | break; |
| 933 | } |
| 934 | |
| 935 | std::string lineType; |
| 936 | extractLinePart(GetLineTypeRegEx(), line, lineType); |
| 937 | if (lineType == "file set:") |
| 938 | { |
| 939 | extractLinePart(GetIntRegEx(), line, fileSet); |
| 940 | } |
| 941 | else if (lineType == "number of steps:") |
| 942 | { |
| 943 | extractLinePart(GetIntRegEx(), line, numSteps); |
| 944 | fsInfo->NumberOfSteps.push_back(numSteps); |
| 945 | } |
| 946 | else if (lineType == "filename index:") |
| 947 | { |
| 948 | extractLinePart(GetIntRegEx(), line, fileIndex); |
| 949 | fsInfo->FileNameIndex.push_back(fileIndex); |
| 950 | } |
| 951 | |
| 952 | result = this->CaseFile.ReadNextLine(MAX_CASE_LINE_LENGTH); |
| 953 | if (result.second.find("file set") != std::string::npos) |
| 954 | { |
| 955 | moreFileSets = true; |
| 956 | break; |
| 957 | } |
| 958 | } |
| 959 | this->FileSetInfoMap.insert(std::make_pair(fileSet, fsInfo)); |
| 960 | } |
| 961 | } |
| 962 | |
| 963 | //------------------------------------------------------------------------------ |
| 964 | std::string EnSightDataSet::GetFullPath(const std::string& fname) |
no test coverage detected