///////////////////////////////////////////////////////////////////////////////// // // Copyright (C) Statoil ASA // // ResInsight is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. // // See the GNU General Public License at // for more details. // ///////////////////////////////////////////////////////////////////////////////// #pragma once #include #include class QDateTime; // Taken from ecl_sum.h typedef struct ecl_sum_struct ecl_sum_type; // Taken from stringlist.h typedef struct stringlist_struct stringlist_type; //================================================================================================== // // //================================================================================================== class RifReaderEclipseSummary { public: RifReaderEclipseSummary(); ~RifReaderEclipseSummary(); bool open(const std::string& headerFileName, const std::vector& dataFileNames); void close(); std::vector wellNames() const; std::vector wellGroupNames() const; std::vector wellVariableNames() const; std::vector variableNames() const; std::vector timeSteps() const; bool values(const std::string& variableName, std::vector* values); // TODO: Move this to a tools class with static members static std::vector fromTimeT(const std::vector& timeSteps); private: int variableIndexFromVariableName(const std::string& variableName) const; int timeStepCount() const; static void populateVectorFromStringList(stringlist_type* stringList, std::vector* strings); private: ecl_sum_type* ecl_sum; };