ResInsight/ApplicationCode/ProjectDataModel/RimReservoir.h

77 lines
2.6 KiB
C
Raw Normal View History

/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2011-2012 Statoil ASA, Ceetron AS
//
// 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
#include "cvfBase.h"
#include "cvfObject.h"
#include "cafPdmField.h"
#include "cafPdmObject.h"
class QString;
2012-08-31 12:12:47 -05:00
class RigEclipseCase;
class RigGridBase;
2012-06-26 09:10:41 -05:00
class RimReservoirView;
//==================================================================================================
//
2012-06-26 09:10:41 -05:00
// Interface for reservoirs.
// As this is a pure virtual class, the factory macros are not relevant (nor possible) to use
// CAF_PDM_HEADER_INIT and CAF_PDM_SOURCE_INIT
//
//==================================================================================================
2012-06-26 09:10:41 -05:00
class RimReservoir : public caf::PdmObject
{
public:
RimReservoir();
virtual ~RimReservoir();
2012-06-26 09:10:41 -05:00
virtual bool openEclipseGridFile() = 0;
2013-02-14 03:19:27 -06:00
RigEclipseCase* reservoirData();
const RigEclipseCase* reservoirData() const;
RimReservoirView* createAndAddReservoirView();
void removeReservoirView(RimReservoirView* reservoirView);
2012-06-26 09:10:41 -05:00
void removeResult(const QString& resultName);
// Fields:
caf::PdmField<QString> caseName;
2012-08-31 12:12:47 -05:00
caf::PdmField<bool> releaseResultMemory;
caf::PdmPointersField<RimReservoirView*> reservoirViews;
2012-06-26 09:10:41 -05:00
virtual caf::PdmFieldHandle* userDescriptionField() { return &caseName; }
2013-02-14 03:19:27 -06:00
virtual QString locationOnDisc() const { return QString(); }
protected:
// Overridden methods
virtual void initAfterRead();
2012-08-31 12:12:47 -05:00
virtual void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue );
2012-06-26 09:10:41 -05:00
protected:
2013-02-14 03:19:27 -06:00
cvf::ref<RigEclipseCase> m_rigEclipseCase;
};