2017-09-15 07:26:06 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2017- Statoil ASA
|
2019-06-07 07:41:55 -05:00
|
|
|
//
|
2017-09-15 07:26:06 -05:00
|
|
|
// 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.
|
2019-06-07 07:41:55 -05:00
|
|
|
//
|
2017-09-15 07:26:06 -05:00
|
|
|
// 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.
|
2019-06-07 07:41:55 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2017-09-15 07:26:06 -05:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "RifSummaryReaderInterface.h"
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include <QDateTime>
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-06-07 07:41:55 -05:00
|
|
|
///
|
2017-09-15 07:26:06 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2018-06-25 08:14:47 -05:00
|
|
|
const std::set<RifEclipseSummaryAddress>& RifSummaryReaderInterface::allResultAddresses() const
|
2017-09-15 07:26:06 -05:00
|
|
|
{
|
|
|
|
return m_allResultAddresses;
|
|
|
|
}
|
|
|
|
|
2018-05-25 04:10:03 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-06-07 07:41:55 -05:00
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
const std::set<RifEclipseSummaryAddress>& RifSummaryReaderInterface::allErrorAddresses() const
|
|
|
|
{
|
|
|
|
return m_allErrorAddresses;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
2018-05-25 04:10:03 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
RifEclipseSummaryAddress RifSummaryReaderInterface::errorAddress( const RifEclipseSummaryAddress& resultAddress ) const
|
2018-05-25 04:10:03 -05:00
|
|
|
{
|
|
|
|
RifEclipseSummaryAddress errAddr = resultAddress;
|
|
|
|
errAddr.setAsErrorResult();
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
return m_allErrorAddresses.find( errAddr ) != m_allErrorAddresses.end() ? errAddr : RifEclipseSummaryAddress();
|
2018-05-25 04:10:03 -05:00
|
|
|
}
|
|
|
|
|
2017-09-15 07:26:06 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-06-07 07:41:55 -05:00
|
|
|
///
|
2017-09-15 07:26:06 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
bool RifSummaryReaderInterface::hasAddress( const RifEclipseSummaryAddress& resultAddress ) const
|
2017-09-15 07:26:06 -05:00
|
|
|
{
|
2022-05-03 01:55:31 -05:00
|
|
|
static const RifEclipseSummaryAddress defaultAdr = RifEclipseSummaryAddress();
|
|
|
|
if ( resultAddress == defaultAdr ) return true;
|
|
|
|
|
2022-06-07 14:09:36 -05:00
|
|
|
return ( m_allResultAddresses.count( resultAddress ) > 0 );
|
2017-09-15 07:26:06 -05:00
|
|
|
}
|