mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Reduce memory use for summary address object
* Use one common variable for object name, use three ints * Move enums to separate file * Refactor use of enums * Move implementation to cpp * Refactor includes
This commit is contained in:
@@ -45,9 +45,9 @@ RifReaderObservedData::~RifReaderObservedData()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifReaderObservedData::open( const QString& headerFileName,
|
||||
const QString& identifierName,
|
||||
RifEclipseSummaryAddress::SummaryVarCategory summaryCategory )
|
||||
bool RifReaderObservedData::open( const QString& headerFileName,
|
||||
const QString& identifierName,
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory summaryCategory )
|
||||
{
|
||||
AsciiDataParseOptions parseOptions;
|
||||
parseOptions.dateFormat = "yyyy-MM-dd";
|
||||
@@ -154,9 +154,9 @@ std::vector<time_t> RifReaderObservedData::timeSteps( const RifEclipseSummaryAdd
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifEclipseSummaryAddress RifReaderObservedData::address( const QString& vectorName,
|
||||
const QString& identifierName,
|
||||
RifEclipseSummaryAddress::SummaryVarCategory summaryCategory )
|
||||
RifEclipseSummaryAddress RifReaderObservedData::address( const QString& vectorName,
|
||||
const QString& identifierName,
|
||||
RifEclipseSummaryAddressDefines::SummaryVarCategory summaryCategory )
|
||||
{
|
||||
std::string stdVectorName = vectorName.toStdString();
|
||||
int regionNumber( -1 );
|
||||
@@ -175,13 +175,13 @@ RifEclipseSummaryAddress RifReaderObservedData::address( const QString&
|
||||
|
||||
switch ( summaryCategory )
|
||||
{
|
||||
case RifEclipseSummaryAddress::SUMMARY_GROUP:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_GROUP:
|
||||
groupName = identifierName.toStdString();
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL:
|
||||
wellName = identifierName.toStdString();
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL_LGR:
|
||||
case RifEclipseSummaryAddressDefines::SummaryVarCategory::SUMMARY_WELL_LGR:
|
||||
lgrName = identifierName.toStdString();
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user