mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-27 07:30:20 -05:00
Refactor: migrate fourteen more collections to caf::PdmObjectCollection<T>
Migrated to the templated base, preserving each collection's existing XML field keyword for project-file backward compatibility: - RimEnsembleFractureStatisticsCollection - RimEclipseInputPropertyCollection - RimPlotDataFilterCollection - RimGeoMechContourMapViewCollection - RimIntersectionResultsDefinitionCollection - RimCustomObjectiveFunctionCollection - RimStimPlanModelTemplateCollection - RimEnsembleWellLogsCollection - RimEclipseContourMapViewCollection - RimSeismicViewCollection - RimGridInfoCollection - RimEclipseStatisticsCaseCollection - RimWellIASettingsCollection - RimVfpDataCollection External callers that accessed the old public/named array fields directly (RimEclipseInputPropertyCollection::inputProperties, RimEclipseStatisticsCaseCollection::cases) now use addItem/items() from the base. RimCustomObjectiveFunction.h replaced its include of the collection header with a forward declaration to break the new include cycle introduced by the migration.
This commit is contained in:
1 parent
ddd413cb0b
commit
5e880ffc26
37 files changed
+133
-212
No files matched your search
+5
-5
@@ -32,7 +32,7 @@ RimVfpDataCollection::RimVfpDataCollection()
|
||||
{
|
||||
CAF_PDM_InitObject( "VFP Data", ":/VfpPlotCollection.svg" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_vfpTableData, "VfpPlots", "Vertical Flow Performance Data" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_items, "VfpPlots", "Vertical Flow Performance Data" );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -50,7 +50,7 @@ RimVfpTable* RimVfpDataCollection::appendTableDataObject( const QString& fileNam
|
||||
{
|
||||
auto* vfpTableData = new RimVfpTableData();
|
||||
vfpTableData->setFileName( fileName );
|
||||
m_vfpTableData.push_back( vfpTableData );
|
||||
addItem( vfpTableData );
|
||||
|
||||
vfpTableData->ensureDataIsImported();
|
||||
auto dataSources = vfpTableData->tableDataSources();
|
||||
@@ -70,7 +70,7 @@ std::vector<RimVfpTable*> RimVfpDataCollection::vfpTableData() const
|
||||
{
|
||||
std::vector<RimVfpTable*> tableDataSources;
|
||||
|
||||
for ( auto vfpTableData : m_vfpTableData.childrenByType() )
|
||||
for ( auto vfpTableData : items() )
|
||||
{
|
||||
for ( auto table : vfpTableData->tableDataSources() )
|
||||
{
|
||||
@@ -86,7 +86,7 @@ std::vector<RimVfpTable*> RimVfpDataCollection::vfpTableData() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimVfpDataCollection::loadDataAndUpdate()
|
||||
{
|
||||
for ( auto vfpTableData : m_vfpTableData.childrenByType() )
|
||||
for ( auto vfpTableData : items() )
|
||||
{
|
||||
vfpTableData->ensureDataIsImported();
|
||||
}
|
||||
@@ -97,7 +97,7 @@ void RimVfpDataCollection::loadDataAndUpdate()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimVfpDataCollection::deleteAllData()
|
||||
{
|
||||
m_vfpTableData.deleteChildren();
|
||||
deleteAllItems();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user