diff --git a/ApplicationCode/FileInterface/RifEclipseOutputFileTools.cpp b/ApplicationCode/FileInterface/RifEclipseOutputFileTools.cpp index 8d05154f7b..764736e624 100644 --- a/ApplicationCode/FileInterface/RifEclipseOutputFileTools.cpp +++ b/ApplicationCode/FileInterface/RifEclipseOutputFileTools.cpp @@ -123,7 +123,7 @@ void getDayMonthYear(const ecl_kw_type* intehead_kw, int* day, int* month, int* //-------------------------------------------------------------------------------------------------- /// Get list of time step texts (dates) //-------------------------------------------------------------------------------------------------- -void RifEclipseOutputFileTools::timeSteps(ecl_file_type* ecl_file, std::vector* timeSteps, std::vector* daysSinceSimulationStart) +void RifEclipseOutputFileTools::timeSteps(const ecl_file_type* ecl_file, std::vector* timeSteps, std::vector* daysSinceSimulationStart) { if (!ecl_file) return; @@ -183,7 +183,7 @@ void RifEclipseOutputFileTools::timeSteps(ecl_file_type* ecl_file, std::vector* values) +bool RifEclipseOutputFileTools::keywordData(const ecl_file_type* ecl_file, const QString& keyword, size_t fileKeywordOccurrence, std::vector* values) { bool result = false; @@ -210,7 +210,7 @@ bool RifEclipseOutputFileTools::keywordData(ecl_file_type* ecl_file, const QStri //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RifEclipseOutputFileTools::keywordData(ecl_file_type* ecl_file, const QString& keyword, size_t fileKeywordOccurrence, std::vector* values) +bool RifEclipseOutputFileTools::keywordData(const ecl_file_type* ecl_file, const QString& keyword, size_t fileKeywordOccurrence, std::vector* values) { bool result = false; @@ -365,7 +365,7 @@ void RifEclipseOutputFileTools::readGridDimensions(const QString& gridFileName, /// 3 : LAB /// -1 : No INTEHEAD keyword found //-------------------------------------------------------------------------------------------------- -int RifEclipseOutputFileTools::readUnitsType(ecl_file_type* ecl_file) +int RifEclipseOutputFileTools::readUnitsType(const ecl_file_type* ecl_file) { int unitsType = -1; @@ -427,7 +427,7 @@ QString RifEclipseOutputFileTools::createIndexFileName(const QString& resultFile //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -std::set RifEclipseOutputFileTools::findAvailablePhases(ecl_file_type* ecl_file) +std::set RifEclipseOutputFileTools::findAvailablePhases(const ecl_file_type* ecl_file) { std::set phaseTypes; @@ -462,7 +462,7 @@ std::set RifEclipseOutputFileTools::findAvailablePhases(e /// //-------------------------------------------------------------------------------------------------- void RifEclipseOutputFileTools::transferNncFluxData(const ecl_grid_type* grid, - ecl_file_view_type* summaryView, + const ecl_file_view_type* summaryView, std::vector* waterFlux, std::vector* oilFlux, std::vector* gasFlux) @@ -501,7 +501,7 @@ void RifEclipseOutputFileTools::transferNncFluxData(const ecl_grid_type* grid, //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RifEclipseOutputFileTools::isExportedFromIntersect(ecl_file_type* ecl_file) +bool RifEclipseOutputFileTools::isExportedFromIntersect(const ecl_file_type* ecl_file) { // This code is taken from ecl_file_get_ecl_version() in ecl_file.cpp diff --git a/ApplicationCode/FileInterface/RifEclipseOutputFileTools.h b/ApplicationCode/FileInterface/RifEclipseOutputFileTools.h index 0486cfd337..88e509ef07 100644 --- a/ApplicationCode/FileInterface/RifEclipseOutputFileTools.h +++ b/ApplicationCode/FileInterface/RifEclipseOutputFileTools.h @@ -51,10 +51,10 @@ public: static void findKeywordsAndItemCount(std::vector ecl_files, QStringList* resultNames, std::vector* resultDataItemCounts); - static bool keywordData(ecl_file_type* ecl_file, const QString& keyword, size_t fileKeywordOccurrence, std::vector* values); - static bool keywordData(ecl_file_type* ecl_file, const QString& keyword, size_t fileKeywordOccurrence, std::vector* values); + static bool keywordData(const ecl_file_type* ecl_file, const QString& keyword, size_t fileKeywordOccurrence, std::vector* values); + static bool keywordData(const ecl_file_type* ecl_file, const QString& keyword, size_t fileKeywordOccurrence, std::vector* values); - static void timeSteps(ecl_file_type* ecl_file, std::vector* timeSteps, std::vector* daysSinceSimulationStart); + static void timeSteps(const ecl_file_type* ecl_file, std::vector* timeSteps, std::vector* daysSinceSimulationStart); static bool isValidEclipseFileName(const QString& fileName); static QByteArray md5sum(const QString& fileName); @@ -65,18 +65,18 @@ public: static void readGridDimensions(const QString& gridFileName, std::vector< std::vector >& gridDimensions); - static int readUnitsType(ecl_file_type* ecl_file); + static int readUnitsType(const ecl_file_type* ecl_file); static cvf::ref createDynamicResultAccess(const QString& fileName); static QString createIndexFileName(const QString& resultFileName); - static std::set findAvailablePhases(ecl_file_type* ecl_file); + static std::set findAvailablePhases(const ecl_file_type* ecl_file); - static void transferNncFluxData(const ecl_grid_type* grid, ecl_file_view_type* summaryView, + static void transferNncFluxData(const ecl_grid_type* grid, const ecl_file_view_type* summaryView, std::vector* waterFlux, std::vector* oilFlux, std::vector* gasFlux); - static bool isExportedFromIntersect(ecl_file_type* ecl_file); + static bool isExportedFromIntersect(const ecl_file_type* ecl_file); static ecl_kw_type* createActnumFromPorv(ecl_file_type* ecl_file);