2016-05-31 13:42:27 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) 2016 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 <http://www.gnu.org/licenses/gpl.html>
|
|
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2018-03-26 13:11:36 +02:00
|
|
|
#include "RigCaseRealizationParameters.h"
|
|
|
|
|
|
2016-05-31 13:42:27 +02:00
|
|
|
#include "cafPdmField.h"
|
2017-09-22 09:21:12 +02:00
|
|
|
#include "cafPdmObject.h"
|
2016-05-31 13:42:27 +02:00
|
|
|
|
2018-05-03 09:53:25 +02:00
|
|
|
#include <memory>
|
|
|
|
|
|
2017-09-22 08:23:50 +02:00
|
|
|
class RifSummaryReaderInterface;
|
2018-05-15 10:11:49 +02:00
|
|
|
class RimSummaryCaseCollection;
|
2016-05-31 13:42:27 +02:00
|
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
//==================================================================================================
|
|
|
|
|
|
|
|
|
|
class RimSummaryCase : public caf::PdmObject
|
|
|
|
|
{
|
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
|
public:
|
|
|
|
|
RimSummaryCase();
|
|
|
|
|
virtual ~RimSummaryCase();
|
|
|
|
|
|
2017-09-25 14:37:41 +02:00
|
|
|
virtual QString summaryHeaderFilename() const;
|
2017-04-04 12:14:13 +02:00
|
|
|
virtual QString caseName() = 0;
|
2016-08-05 11:05:58 +02:00
|
|
|
QString shortName() const;
|
2016-05-31 13:42:27 +02:00
|
|
|
|
2016-08-05 11:05:58 +02:00
|
|
|
void updateAutoShortName();
|
|
|
|
|
void updateOptionSensitivity();
|
2016-05-31 13:42:27 +02:00
|
|
|
|
2017-09-22 09:11:39 +02:00
|
|
|
virtual void createSummaryReaderInterface() = 0;
|
|
|
|
|
virtual RifSummaryReaderInterface* summaryReader() = 0;
|
2017-11-03 08:11:27 +01:00
|
|
|
virtual QString errorMessagesFromReader() { return QString(); }
|
2016-05-31 13:42:27 +02:00
|
|
|
|
2017-05-03 12:31:45 +02:00
|
|
|
virtual void updateFilePathsFromProjectPath(const QString& newProjectPath, const QString& oldProjectPath) = 0;
|
|
|
|
|
|
2017-09-25 14:37:41 +02:00
|
|
|
void setSummaryHeaderFileName(const QString& fileName);
|
|
|
|
|
|
2017-09-15 14:30:09 +02:00
|
|
|
bool isObservedData();
|
|
|
|
|
|
2018-05-03 09:53:25 +02:00
|
|
|
void setCaseRealizationParameters(const std::shared_ptr<RigCaseRealizationParameters>& crlParameters);
|
|
|
|
|
std::shared_ptr<RigCaseRealizationParameters> caseRealizationParameters() const;
|
2018-05-03 11:03:43 +02:00
|
|
|
bool hasCaseRealizationParameters() const;
|
2018-05-15 10:11:49 +02:00
|
|
|
RimSummaryCaseCollection* ensemble() const;
|
|
|
|
|
bool isEnsembleCase() const;
|
2018-05-15 15:43:04 +02:00
|
|
|
void copyFrom(const RimSummaryCase& rhs);
|
2018-03-26 13:11:36 +02:00
|
|
|
|
2016-07-06 13:35:24 +02:00
|
|
|
protected:
|
2017-10-03 22:07:07 +02:00
|
|
|
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
2016-08-05 11:05:58 +02:00
|
|
|
void updateTreeItemName();
|
|
|
|
|
|
2017-09-19 11:26:29 +02:00
|
|
|
caf::PdmField<QString> m_shortName;
|
|
|
|
|
caf::PdmField<bool> m_useAutoShortName;
|
|
|
|
|
caf::PdmField<QString> m_summaryHeaderFilename;
|
|
|
|
|
bool m_isObservedData;
|
2018-03-26 13:11:36 +02:00
|
|
|
|
2018-05-03 09:53:25 +02:00
|
|
|
std::shared_ptr<RigCaseRealizationParameters> m_crlParameters;
|
2016-07-06 13:35:24 +02:00
|
|
|
|
|
|
|
|
private:
|
2016-08-05 11:05:58 +02:00
|
|
|
virtual void initAfterRead() override;
|
2016-05-31 13:42:27 +02:00
|
|
|
};
|