From e8d765a2a9393691e798aa8a380fd589ecb8a706 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Jensen?= Date: Fri, 6 Apr 2018 15:52:16 +0200 Subject: [PATCH] #2610 Add default constructor and setter --- .../RifCaseRealizationParametersReader.cpp | 19 +++++++++++++++++++ .../RifCaseRealizationParametersReader.h | 2 ++ 2 files changed, 21 insertions(+) diff --git a/ApplicationCode/FileInterface/RifCaseRealizationParametersReader.cpp b/ApplicationCode/FileInterface/RifCaseRealizationParametersReader.cpp index f6ec9b11b8..c4d77d7b1d 100644 --- a/ApplicationCode/FileInterface/RifCaseRealizationParametersReader.cpp +++ b/ApplicationCode/FileInterface/RifCaseRealizationParametersReader.cpp @@ -44,6 +44,17 @@ RifCaseRealizationParametersReader::RifCaseRealizationParametersReader(const QSt m_textStream = nullptr; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RifCaseRealizationParametersReader::RifCaseRealizationParametersReader() +{ + m_parameters = new RigCaseRealizationParameters(); + m_fileName = ""; + m_file = nullptr; + m_textStream = nullptr; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -56,6 +67,14 @@ RifCaseRealizationParametersReader::~RifCaseRealizationParametersReader() closeFile(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RifCaseRealizationParametersReader::setFileName(const QString& fileName) +{ + m_fileName = fileName; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/FileInterface/RifCaseRealizationParametersReader.h b/ApplicationCode/FileInterface/RifCaseRealizationParametersReader.h index fd8b89f652..56e8a793db 100644 --- a/ApplicationCode/FileInterface/RifCaseRealizationParametersReader.h +++ b/ApplicationCode/FileInterface/RifCaseRealizationParametersReader.h @@ -42,9 +42,11 @@ class QFile; class RifCaseRealizationParametersReader { public: + RifCaseRealizationParametersReader(); RifCaseRealizationParametersReader(const QString& fileName); ~RifCaseRealizationParametersReader(); + void setFileName(const QString& fileName); void parse(); const cvf::ref parameters() const;