2017-12-12 13:22:16 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
2023-10-23 08:12:19 +02:00
|
|
|
// Copyright (C) 2023- Equinor ASA
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2017-12-12 13:22:16 +01: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-12-12 13:22:16 +01: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-12-12 13:22:16 +01:00
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
2023-10-23 08:12:19 +02:00
|
|
|
#include "RimcIdenticalGridCaseGroup.h"
|
2017-12-12 13:22:16 +01:00
|
|
|
|
2023-10-23 08:12:19 +02:00
|
|
|
#include "RimEclipseStatisticsCase.h"
|
|
|
|
|
#include "RimIdenticalGridCaseGroup.h"
|
2017-12-12 13:22:16 +01:00
|
|
|
|
2023-10-23 08:12:19 +02:00
|
|
|
#include "cafPdmFieldScriptingCapability.h"
|
2017-12-12 13:22:16 +01:00
|
|
|
|
2023-10-23 08:12:19 +02:00
|
|
|
CAF_PDM_OBJECT_METHOD_SOURCE_INIT( RimIdenticalGridCaseGroup, RimcIdenticalGridCaseGroup_createStatisticsCase, "create_statistics_case" );
|
2017-12-12 13:22:16 +01:00
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2017-12-12 13:22:16 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2023-10-23 08:12:19 +02:00
|
|
|
RimcIdenticalGridCaseGroup_createStatisticsCase::RimcIdenticalGridCaseGroup_createStatisticsCase( caf::PdmObjectHandle* self )
|
|
|
|
|
: caf::PdmObjectMethod( self )
|
2017-12-12 13:22:16 +01:00
|
|
|
{
|
2023-10-23 08:12:19 +02:00
|
|
|
}
|
2017-12-12 13:22:16 +01:00
|
|
|
|
2023-10-23 08:12:19 +02:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
caf::PdmObjectHandle* RimcIdenticalGridCaseGroup_createStatisticsCase::execute()
|
|
|
|
|
{
|
|
|
|
|
auto gridCaseGroup = self<RimIdenticalGridCaseGroup>();
|
|
|
|
|
auto statCase = gridCaseGroup->createAndAppendEmptyStatisticsCase();
|
2017-12-12 13:22:16 +01:00
|
|
|
|
2023-10-23 08:12:19 +02:00
|
|
|
gridCaseGroup->updateConnectedEditors();
|
2017-12-12 13:22:16 +01:00
|
|
|
|
2023-10-23 08:12:19 +02:00
|
|
|
return statCase;
|
2017-12-12 13:22:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2017-12-12 13:22:16 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2023-10-23 08:12:19 +02:00
|
|
|
bool RimcIdenticalGridCaseGroup_createStatisticsCase::resultIsPersistent() const
|
2017-12-12 13:22:16 +01:00
|
|
|
{
|
2023-10-23 08:12:19 +02:00
|
|
|
return true;
|
2017-12-12 13:22:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2017-12-12 13:22:16 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2023-10-23 08:12:19 +02:00
|
|
|
std::unique_ptr<caf::PdmObjectHandle> RimcIdenticalGridCaseGroup_createStatisticsCase::defaultResult() const
|
2017-12-12 13:22:16 +01:00
|
|
|
{
|
2023-10-23 08:12:19 +02:00
|
|
|
return std::unique_ptr<caf::PdmObjectHandle>( new RimEclipseStatisticsCase );
|
2017-12-12 13:22:16 +01:00
|
|
|
}
|