mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Extract method for reading input property data for remaing keywords.
This commit is contained in:
@@ -72,25 +72,9 @@ void RifEclipseInputPropertyLoader::loadAndSyncronizeInputProperties(
|
||||
|
||||
progInfo.setProgress( static_cast<int>( progress + inputPropCount ) );
|
||||
|
||||
// Check if there are more known property keywords left on file. If it is, read them and create inputProperty
|
||||
// objects
|
||||
for ( const QString& fileKeyword : fileKeywordSet )
|
||||
{
|
||||
{
|
||||
QString resultName = eclipseCaseData->results( RiaDefines::MATRIX_MODEL )->makeResultNameUnique( fileKeyword );
|
||||
if ( RifEclipseInputFileTools::readProperty( filename, eclipseCaseData, fileKeyword, resultName ) )
|
||||
{
|
||||
RimEclipseInputProperty* inputProperty = new RimEclipseInputProperty;
|
||||
inputProperty->resultName = resultName;
|
||||
inputProperty->eclipseKeyword = fileKeyword;
|
||||
inputProperty->fileName = filename;
|
||||
inputProperty->resolvedState = RimEclipseInputProperty::RESOLVED;
|
||||
inputPropertyCollection->inputProperties.push_back( inputProperty );
|
||||
}
|
||||
}
|
||||
|
||||
progInfo.setProgress( static_cast<int>( progress + inputPropCount ) );
|
||||
}
|
||||
// Check if there are more known property keywords left on file.
|
||||
// If it is, read them and create inputProperty objects
|
||||
readInputPropertiesForRemainingKeywords( inputPropertyCollection, eclipseCaseData, filename, &fileKeywordSet );
|
||||
i++;
|
||||
}
|
||||
|
||||
@@ -202,3 +186,24 @@ void RifEclipseInputPropertyLoader::readDataForEachInputProperty( RimEclipseInpu
|
||||
progress++;
|
||||
}
|
||||
}
|
||||
|
||||
void RifEclipseInputPropertyLoader::readInputPropertiesForRemainingKeywords(
|
||||
RimEclipseInputPropertyCollection* inputPropertyCollection,
|
||||
RigEclipseCaseData* eclipseCaseData,
|
||||
const QString& filename,
|
||||
std::set<QString>* fileKeywordSet )
|
||||
{
|
||||
for ( const QString& fileKeyword : *fileKeywordSet )
|
||||
{
|
||||
QString resultName = eclipseCaseData->results( RiaDefines::MATRIX_MODEL )->makeResultNameUnique( fileKeyword );
|
||||
if ( RifEclipseInputFileTools::readProperty( filename, eclipseCaseData, fileKeyword, resultName ) )
|
||||
{
|
||||
RimEclipseInputProperty* inputProperty = new RimEclipseInputProperty;
|
||||
inputProperty->resultName = resultName;
|
||||
inputProperty->eclipseKeyword = fileKeyword;
|
||||
inputProperty->fileName = filename;
|
||||
inputProperty->resolvedState = RimEclipseInputProperty::RESOLVED;
|
||||
inputPropertyCollection->inputProperties.push_back( inputProperty );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,4 +66,9 @@ private:
|
||||
std::set<QString>* fileKeywordSet,
|
||||
caf::ProgressInfo* progressInfo,
|
||||
int progressOffset );
|
||||
|
||||
static void readInputPropertiesForRemainingKeywords( RimEclipseInputPropertyCollection* inputPropertyCollection,
|
||||
RigEclipseCaseData* eclipseCaseData,
|
||||
const QString& filename,
|
||||
std::set<QString>* fileKeywordSet );
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user