From e23783c1ed83179c9cc2165a8fbd40011e21fcf4 Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 5 Oct 2017 21:16:16 +0200 Subject: [PATCH] #1947 RFT/PLT Plot: Create const string in rftAddress for wellLogChannelName --- .../FileInterface/RifEclipseRftAddress.cpp | 32 +++++++++++++++++-- .../FileInterface/RifEclipseRftAddress.h | 15 ++++++++- 2 files changed, 44 insertions(+), 3 deletions(-) diff --git a/ApplicationCode/FileInterface/RifEclipseRftAddress.cpp b/ApplicationCode/FileInterface/RifEclipseRftAddress.cpp index efcce2f51a..5cc2a87853 100644 --- a/ApplicationCode/FileInterface/RifEclipseRftAddress.cpp +++ b/ApplicationCode/FileInterface/RifEclipseRftAddress.cpp @@ -19,16 +19,26 @@ #include "RifEclipseRftAddress.h" +const QString RifEclipseRftAddress::DEPTH = "Depth"; +const QString RifEclipseRftAddress::PRESSURE = "Pressure"; +const QString RifEclipseRftAddress::SWAT = "Water Saturation"; +const QString RifEclipseRftAddress::SOIL = "Oil Saturation"; +const QString RifEclipseRftAddress::SGAS = "Gas Saturation"; +const QString RifEclipseRftAddress::WRAT = "Water Flow"; +const QString RifEclipseRftAddress::ORAT = "Oil Flow"; +const QString RifEclipseRftAddress::GRAT = "Gas Flow"; + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RifEclipseRftAddress::RifEclipseRftAddress(std::string wellName, time_t timeStep, std::string wellLogChannelName) +RifEclipseRftAddress::RifEclipseRftAddress(std::string wellName, time_t timeStep, QString wellLogChannelName): + m_wellLogChannelName(wellLogChannelName) { m_timeStep.setTimeSpec(Qt::TimeSpec::UTC); m_timeStep.setTime_t(timeStep); m_wellName = QString(wellName.c_str()); - m_wellLogChannelName = QString(wellLogChannelName.c_str()); + //m_wellLogChannelName = QString(wellLogChannelName.c_str()); } //-------------------------------------------------------------------------------------------------- @@ -43,6 +53,24 @@ RifEclipseRftAddress::RifEclipseRftAddress(QString wellName, QDateTime timeStep, m_timeStep = timeStep; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +std::vector RifEclipseRftAddress::allWellLogChannelNames() +{ + std::vector channelNames; + channelNames.push_back(RifEclipseRftAddress::DEPTH); + channelNames.push_back(RifEclipseRftAddress::PRESSURE); + channelNames.push_back(RifEclipseRftAddress::SWAT); + channelNames.push_back(RifEclipseRftAddress::SOIL); + channelNames.push_back(RifEclipseRftAddress::SGAS); + channelNames.push_back(RifEclipseRftAddress::WRAT); + channelNames.push_back(RifEclipseRftAddress::ORAT); + channelNames.push_back(RifEclipseRftAddress::GRAT); + + return channelNames; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/FileInterface/RifEclipseRftAddress.h b/ApplicationCode/FileInterface/RifEclipseRftAddress.h index 123791c394..a3b8bcea8b 100644 --- a/ApplicationCode/FileInterface/RifEclipseRftAddress.h +++ b/ApplicationCode/FileInterface/RifEclipseRftAddress.h @@ -20,6 +20,8 @@ #pragma once #include +#include + #include //================================================================================================== @@ -28,9 +30,20 @@ //================================================================================================== class RifEclipseRftAddress { +public: + static const QString DEPTH; + static const QString PRESSURE; + static const QString SWAT; + static const QString SOIL; + static const QString SGAS; + static const QString WRAT; + static const QString ORAT; + static const QString GRAT; public: RifEclipseRftAddress(QString wellName, QDateTime timeStep, QString wellLogChannelName); - RifEclipseRftAddress(std::string wellName, time_t timeStep, std::string wellLogChannelName); + RifEclipseRftAddress(std::string wellName, time_t timeStep, QString wellLogChannelName); + + static std::vector allWellLogChannelNames(); const QString& wellName() const { return m_wellName; } QDateTime timeStep() const { return m_timeStep; }