2013-03-18 11:40:39 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
2014-09-24 07:14:52 +02:00
|
|
|
// Copyright (C) Statoil ASA
|
|
|
|
|
// Copyright (C) Ceetron Solutions AS
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2013-03-18 11:40:39 +01:00
|
|
|
// 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.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2013-03-18 11:40:39 +01:00
|
|
|
// 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.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2013-03-18 11:40:39 +01:00
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2017-06-13 15:41:52 +02:00
|
|
|
#include "RiaDefines.h"
|
2015-07-31 18:58:23 +02:00
|
|
|
|
2014-07-24 10:11:43 +02:00
|
|
|
#include "cafAppEnum.h"
|
2015-07-31 18:58:23 +02:00
|
|
|
#include "cafPdmChildArrayField.h"
|
2013-03-18 11:40:39 +01:00
|
|
|
#include "cafPdmField.h"
|
|
|
|
|
#include "cafPdmObject.h"
|
2015-07-31 18:58:23 +02:00
|
|
|
|
2014-07-24 10:11:43 +02:00
|
|
|
#include "cvfObject.h"
|
|
|
|
|
|
|
|
|
|
#include <QDateTime>
|
|
|
|
|
|
2013-03-19 10:29:34 +01:00
|
|
|
class RimReservoirCellResultsStorageEntryInfo;
|
2013-03-22 15:43:42 +01:00
|
|
|
class RigCaseCellResultsData;
|
2013-03-18 14:34:29 +01:00
|
|
|
class RifReaderInterface;
|
|
|
|
|
class RigMainGrid;
|
2013-03-18 11:40:39 +01:00
|
|
|
|
2013-03-19 10:29:34 +01:00
|
|
|
class RimReservoirCellResultsStorage : public caf::PdmObject
|
2013-03-18 11:40:39 +01:00
|
|
|
{
|
|
|
|
|
CAF_PDM_HEADER_INIT;
|
2019-09-06 10:40:57 +02:00
|
|
|
|
2013-03-18 11:40:39 +01:00
|
|
|
public:
|
2013-03-19 10:29:34 +01:00
|
|
|
RimReservoirCellResultsStorage();
|
2018-10-18 19:45:57 +02:00
|
|
|
~RimReservoirCellResultsStorage() override;
|
2013-03-18 11:40:39 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void setCellResults( RigCaseCellResultsData* cellResults );
|
2013-03-18 11:40:39 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
size_t storedResultsCount();
|
2013-03-21 15:31:47 +01:00
|
|
|
|
|
|
|
|
protected:
|
2013-03-18 14:34:29 +01:00
|
|
|
// Overridden methods from PdmObject
|
2019-09-06 10:40:57 +02:00
|
|
|
void setupBeforeSave() override;
|
2013-03-18 11:40:39 +01:00
|
|
|
|
2013-03-18 14:34:29 +01:00
|
|
|
private:
|
2019-09-06 10:40:57 +02:00
|
|
|
QString getValidCacheFileName();
|
|
|
|
|
QString getCacheDirectoryPath();
|
2013-03-21 15:31:47 +01:00
|
|
|
// Fields
|
2019-09-06 10:40:57 +02:00
|
|
|
caf::PdmField<QString> m_resultCacheFileName;
|
|
|
|
|
caf::PdmChildArrayField<RimReservoirCellResultsStorageEntryInfo*> m_resultCacheMetaData;
|
2013-03-21 15:31:47 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
RigCaseCellResultsData* m_cellResults;
|
2013-03-18 11:40:39 +01:00
|
|
|
};
|
|
|
|
|
|
2013-03-19 10:29:34 +01:00
|
|
|
class RimReservoirCellResultsStorageEntryInfo : public caf::PdmObject
|
2013-03-18 11:40:39 +01:00
|
|
|
{
|
|
|
|
|
CAF_PDM_HEADER_INIT;
|
2019-09-06 10:40:57 +02:00
|
|
|
|
2013-03-18 11:40:39 +01:00
|
|
|
public:
|
2013-03-19 10:29:34 +01:00
|
|
|
RimReservoirCellResultsStorageEntryInfo();
|
2018-10-18 19:45:57 +02:00
|
|
|
~RimReservoirCellResultsStorageEntryInfo() override;
|
2013-03-18 11:40:39 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
caf::PdmField<caf::AppEnum<RiaDefines::ResultCatType>> m_resultType;
|
|
|
|
|
caf::PdmField<QString> m_resultName;
|
|
|
|
|
caf::PdmField<std::vector<QDateTime>> m_timeStepDates;
|
|
|
|
|
caf::PdmField<std::vector<double>> m_daysSinceSimulationStart;
|
|
|
|
|
caf::PdmField<qint64> m_filePosition;
|
2013-03-18 11:40:39 +01:00
|
|
|
};
|