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