2017-10-12 07:30:37 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) 2017 Statoil ASA
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2017-10-12 07:30:37 +02: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-09-06 10:40:57 +02:00
|
|
|
//
|
2017-10-12 07:30:37 +02: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-09-06 10:40:57 +02:00
|
|
|
//
|
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2017-10-12 07:30:37 +02:00
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
2017-10-23 14:42:38 +02:00
|
|
|
#include "RimSummaryCalculationCollection.h"
|
2017-10-12 07:30:37 +02:00
|
|
|
|
2017-10-18 08:20:21 +02:00
|
|
|
#include "RimCalculatedSummaryCase.h"
|
2019-12-09 09:21:06 +01:00
|
|
|
#include "RimProject.h"
|
2017-10-23 14:42:38 +02:00
|
|
|
#include "RimSummaryCalculation.h"
|
2017-10-12 07:30:37 +02:00
|
|
|
|
|
|
|
|
#include "cafPdmUiGroup.h"
|
|
|
|
|
#include "cafPdmUiTreeSelectionEditor.h"
|
|
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
CAF_PDM_SOURCE_INIT( RimSummaryCalculationCollection, "RimSummaryCalculationCollection" );
|
2017-10-12 07:30:37 +02:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2017-10-12 07:30:37 +02:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2017-10-23 14:42:38 +02:00
|
|
|
RimSummaryCalculationCollection::RimSummaryCalculationCollection()
|
2017-10-12 07:30:37 +02:00
|
|
|
{
|
2022-01-07 08:31:52 +01:00
|
|
|
CAF_PDM_InitObject( "Calculation Collection", ":/chain.png" );
|
2017-10-12 07:30:37 +02:00
|
|
|
|
2021-11-14 14:15:12 +01:00
|
|
|
CAF_PDM_InitFieldNoDefault( &m_calcuationSummaryCase, "CalculationsSummaryCase", "Calculations Summary Case" );
|
2017-10-18 11:18:43 +02:00
|
|
|
m_calcuationSummaryCase.xmlCapability()->disableIO();
|
2017-10-20 10:04:05 +02:00
|
|
|
m_calcuationSummaryCase = new RimCalculatedSummaryCase;
|
2017-10-12 07:30:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2017-10-12 07:30:37 +02:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2022-04-22 12:18:34 +02:00
|
|
|
RimSummaryCalculation* RimSummaryCalculationCollection::createCalculation() const
|
2019-12-10 13:18:14 +01:00
|
|
|
{
|
2022-04-22 12:18:34 +02:00
|
|
|
return new RimSummaryCalculation;
|
2019-12-10 13:18:14 +01:00
|
|
|
}
|
|
|
|
|
|
2017-10-18 08:20:21 +02:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2017-10-18 08:20:21 +02:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2017-10-23 14:42:38 +02:00
|
|
|
RimSummaryCase* RimSummaryCalculationCollection::calculationSummaryCase()
|
2017-10-18 08:20:21 +02:00
|
|
|
{
|
|
|
|
|
return m_calcuationSummaryCase();
|
|
|
|
|
}
|
|
|
|
|
|
2017-10-18 11:18:43 +02:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2017-10-18 11:18:43 +02:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2017-10-23 14:42:38 +02:00
|
|
|
void RimSummaryCalculationCollection::rebuildCaseMetaData()
|
2017-10-18 11:18:43 +02:00
|
|
|
{
|
2022-05-09 09:32:09 +02:00
|
|
|
ensureValidCalculationIds();
|
2017-10-20 10:04:05 +02:00
|
|
|
m_calcuationSummaryCase->buildMetaData();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2017-10-20 10:04:05 +02:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2017-10-23 14:42:38 +02:00
|
|
|
void RimSummaryCalculationCollection::initAfterRead()
|
2017-10-20 10:04:05 +02:00
|
|
|
{
|
|
|
|
|
rebuildCaseMetaData();
|
2017-10-18 11:18:43 +02:00
|
|
|
}
|