#1816 Move functions from SummaryReaderInterface to EclipseSummaryReader

This commit is contained in:
Rebecca Cox
2017-09-21 12:20:09 +02:00
parent 68a101fe2d
commit 62d9978504
6 changed files with 28 additions and 38 deletions

View File

@@ -49,22 +49,6 @@ std::vector<QDateTime> RifSummaryReaderInterface::fromTimeT(const std::vector<ti
return a;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
int RifSummaryReaderInterface::indexFromAddress(const RifEclipseSummaryAddress& resultAddress)
{
this->buildMetaData();
auto it = m_resultAddressToErtNodeIdx.find(resultAddress);
if (it != m_resultAddressToErtNodeIdx.end())
{
return it->second;
}
return -1;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -72,7 +56,13 @@ bool RifSummaryReaderInterface::hasAddress(const RifEclipseSummaryAddress& resul
{
this->buildMetaData();
auto it = m_resultAddressToErtNodeIdx.find(resultAddress);
for (RifEclipseSummaryAddress summaryAddress : m_allResultAddresses)
{
if (summaryAddress == resultAddress)
{
return true;
}
}
return (it != m_resultAddressToErtNodeIdx.end());
return false;
}