Added constructor with three parameters

Added reading of grid dimensions
p4#: 21155
This commit is contained in:
Magne Sjaastad 2013-04-07 17:20:58 +02:00
parent 6c9f5d1978
commit da8480a91b
2 changed files with 25 additions and 0 deletions

View File

@ -26,6 +26,7 @@
#include "RifReaderEclipseInput.h"
#include "cafProgressInfo.h"
#include "RimProject.h"
#include "RifEclipseOutputFileTools.h"
CAF_PDM_SOURCE_INIT(RimResultCase, "EclipseCase");
@ -41,6 +42,18 @@ RimResultCase::RimResultCase()
CAF_PDM_InitField(&caseDirectory, "CaseFolder", QString(), "Directory", "", "" ,"");
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimResultCase::RimResultCase(const QString& caseName, const QString& caseFileName, const QString& caseDirectory)
{
RimResultCase();
this->caseName = caseName;
this->caseFileName = caseFileName;
this->caseDirectory = caseDirectory;
}
//--------------------------------------------------------------------------------------------------
///
@ -286,3 +299,13 @@ QString RimResultCase::createAbsoluteFilenameFromCase(const QString& caseName)
return QString();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimResultCase::readGridDimensions(std::vector< std::vector<int> >& gridDimensions)
{
QString fname = createAbsoluteFilenameFromCase(caseName);
RifEclipseOutputFileTools::readGridDimensions(fname, gridDimensions);
}

View File

@ -38,6 +38,7 @@ class RimResultCase : public RimCase
public:
RimResultCase();
RimResultCase(const QString& caseName, const QString& caseFileName, const QString& caseDirectory);
virtual ~RimResultCase();
@ -47,6 +48,7 @@ public:
virtual bool openEclipseGridFile();
bool openAndReadActiveCellData(RigCaseData* mainEclipseCase);
void readGridDimensions(std::vector< std::vector<int> >& gridDimensions);
//virtual caf::PdmFieldHandle* userDescriptionField() { return &caseName;}