Rename several child() and children() functions

This commit is contained in:
Magne Sjaastad
2022-05-31 13:08:07 +02:00
parent c199f960e3
commit c74701b687
179 changed files with 429 additions and 431 deletions

View File

@@ -77,7 +77,7 @@ void RicEclipseShowOnlyFaultFeature::onActionTriggered( bool isChecked )
if ( !rimFault->parentField() ) return;
std::vector<caf::PdmObjectHandle*> children;
rimFault->parentField()->childObjects( &children );
rimFault->parentField()->children( &children );
for ( auto& child : children )
{

View File

@@ -147,7 +147,7 @@ void RicAdvancedSnapshotExportFeature::exportMultipleSnapshots( const QString& f
exportViewVariations( copyOfEclipseView, msd, folder );
eclCase->reservoirViews().removeChildObject( copyOfEclipseView );
eclCase->reservoirViews().removeChild( copyOfEclipseView );
delete copyOfEclipseView;
}
@@ -172,7 +172,7 @@ void RicAdvancedSnapshotExportFeature::exportMultipleSnapshots( const QString& f
exportViewVariations( copyOfGeoMechView, msd, folder );
geomCase->geoMechViews().removeChildObject( copyOfGeoMechView );
geomCase->geoMechViews().removeChild( copyOfGeoMechView );
delete copyOfGeoMechView;
}
@@ -210,7 +210,7 @@ void RicAdvancedSnapshotExportFeature::exportViewVariations( Rim3dView*
exportViewVariationsToFolder( copyOfView, msd, folder );
}
eclCase->reservoirViews().removeChildObject( copyOfView );
eclCase->reservoirViews().removeChild( copyOfView );
delete copyOfView;
}

View File

@@ -84,7 +84,7 @@ RicExportToLasFileResampleUi::RicExportToLasFileResampleUi( void )
//--------------------------------------------------------------------------------------------------
RicExportToLasFileResampleUi::~RicExportToLasFileResampleUi()
{
m_tvdrkbOffsets.deleteAllChildObjects();
m_tvdrkbOffsets.deleteChildren();
}
//--------------------------------------------------------------------------------------------------

View File

@@ -127,7 +127,7 @@ void RiuCreateMultipleFractionsUi::setValues( RimEclipseCase* eclipseCase,
void RiuCreateMultipleFractionsUi::resetValues()
{
m_sourceCase = nullptr;
m_options.deleteAllChildObjects();
m_options.deleteChildren();
}
//--------------------------------------------------------------------------------------------------
@@ -135,7 +135,7 @@ void RiuCreateMultipleFractionsUi::resetValues()
//--------------------------------------------------------------------------------------------------
std::vector<RicCreateMultipleFracturesOptionItemUi*> RiuCreateMultipleFractionsUi::options() const
{
return m_options.childObjects();
return m_options.children();
}
//--------------------------------------------------------------------------------------------------
@@ -160,7 +160,7 @@ void RiuCreateMultipleFractionsUi::insertOptionItem( RicCreateMultipleFracturesO
//--------------------------------------------------------------------------------------------------
void RiuCreateMultipleFractionsUi::deleteOptionItem( RicCreateMultipleFracturesOptionItemUi* optionsItem )
{
m_options.removeChildObject( optionsItem );
m_options.removeChild( optionsItem );
delete optionsItem;
}
@@ -169,7 +169,7 @@ void RiuCreateMultipleFractionsUi::deleteOptionItem( RicCreateMultipleFracturesO
//--------------------------------------------------------------------------------------------------
void RiuCreateMultipleFractionsUi::clearOptions()
{
m_options.deleteAllChildObjects();
m_options.deleteChildren();
}
//--------------------------------------------------------------------------------------------------

View File

@@ -152,7 +152,7 @@ void RicCloseCaseFeature::deleteEclipseCase( RimEclipseCase* eclipseCase )
RimIdenticalGridCaseGroup* caseGroup = caseCollection->parentCaseGroup();
CVF_ASSERT( caseGroup );
caseGroup->statisticsCaseCollection()->reservoirs.removeChildObject( eclipseCase );
caseGroup->statisticsCaseCollection()->reservoirs.removeChild( eclipseCase );
caseGroup->updateConnectedEditors();
}
else
@@ -165,7 +165,7 @@ void RicCloseCaseFeature::deleteEclipseCase( RimEclipseCase* eclipseCase )
if ( caseGroup->caseCollection()->reservoirs.size() == 1 )
{
std::vector<caf::PdmObjectHandle*> children;
caseGroup->statisticsCaseCollection()->reservoirs.childObjects( &children );
caseGroup->statisticsCaseCollection()->reservoirs.children( &children );
for ( size_t i = children.size(); i-- > 0; )
{
@@ -213,7 +213,7 @@ void RicCloseCaseFeature::deleteEclipseCase( RimEclipseCase* eclipseCase )
if ( cases.empty() )
{
project->multiSnapshotDefinitions.deleteAllChildObjects();
project->multiSnapshotDefinitions.deleteChildren();
}
else
{

View File

@@ -52,7 +52,7 @@ void RicDeleteItemExec::redo()
if ( listField )
{
std::vector<caf::PdmObjectHandle*> children;
listField->childObjects( &children );
listField->children( &children );
caf::PdmObjectHandle* obj = children[m_commandData.m_indexToObject];
caf::SelectionManager::instance()->removeObjectFromAllSelections( obj );

View File

@@ -80,7 +80,7 @@ void RicDeleteItemFeature::onActionTriggered( bool isChecked )
int indexAfter = -1;
std::vector<caf::PdmObjectHandle*> childObjects;
childArrayFieldHandle->childObjects( &childObjects );
childArrayFieldHandle->children( &childObjects );
for ( size_t i = 0; i < childObjects.size(); i++ )
{

View File

@@ -166,7 +166,7 @@ std::vector<QString> RicElasticPropertiesImportTools::getFormationNames()
RimOilField* oilField = project->activeOilField();
RimFormationNamesCollection* formationNamesCollection = oilField->formationNamesCollection();
for ( RimFormationNames* formationNames : formationNamesCollection->formationNamesList().childObjects() )
for ( RimFormationNames* formationNames : formationNamesCollection->formationNamesList().children() )
{
if ( formationNames && formationNames->formationNamesData() )
{

View File

@@ -53,7 +53,7 @@ RimOilFieldEntry::RimOilFieldEntry()
//--------------------------------------------------------------------------------------------------
RimOilFieldEntry::~RimOilFieldEntry()
{
wells.deleteAllChildObjects();
wells.deleteChildren();
}
//--------------------------------------------------------------------------------------------------

View File

@@ -41,7 +41,7 @@ RimOilRegionEntry::RimOilRegionEntry()
//--------------------------------------------------------------------------------------------------
RimOilRegionEntry::~RimOilRegionEntry()
{
fields.deleteAllChildObjects();
fields.deleteChildren();
}
//--------------------------------------------------------------------------------------------------

View File

@@ -99,7 +99,7 @@ void RimWellPathImport::updateRegions( const QStringList& regionStrings,
for ( size_t i = 0; i < fieldsToRemove.size(); i++ )
{
this->regions[regionIdx]->fields.removeChildObject( fieldsToRemove[i] );
this->regions[regionIdx]->fields.removeChild( fieldsToRemove[i] );
delete fieldsToRemove[i];
}
@@ -108,7 +108,7 @@ void RimWellPathImport::updateRegions( const QStringList& regionStrings,
for ( size_t i = 0; i < regionsToRemove.size(); i++ )
{
this->regions.removeChildObject( regionsToRemove[i] );
this->regions.removeChild( regionsToRemove[i] );
delete regionsToRemove[i];
}
@@ -218,7 +218,7 @@ void RimWellPathImport::defineObjectEditorAttribute( QString uiConfigName, caf::
//--------------------------------------------------------------------------------------------------
RimWellPathImport::~RimWellPathImport()
{
regions.deleteAllChildObjects();
regions.deleteChildren();
}
//--------------------------------------------------------------------------------------------------

View File

@@ -728,7 +728,7 @@ void RiuWellImportWizard::parseWellsResponse( RimOilFieldEntry* oilFieldEntry )
for ( size_t i = 0; i < wellsToRemove.size(); i++ )
{
oilFieldEntry->wells.removeChildObject( wellsToRemove[i] );
oilFieldEntry->wells.removeChild( wellsToRemove[i] );
delete wellsToRemove[i];
}
@@ -902,7 +902,7 @@ void WellSelectionPage::buildWellTreeView()
}
// Delete all temporary pdm object groups
m_regionsWithVisibleWells->objects.deleteAllChildObjects();
m_regionsWithVisibleWells->objects.deleteChildren();
for ( size_t rIdx = 0; rIdx < m_wellPathImportObject->regions.size(); rIdx++ )
{
@@ -982,7 +982,7 @@ void WellSelectionPage::selectedWellPathEntries( std::vector<DownloadEntity>& do
for ( size_t i = 0; i < childFields.size(); i++ )
{
std::vector<caf::PdmObjectHandle*> childObjects;
childFields[i]->childObjects( &childObjects );
childFields[i]->children( &childObjects );
for ( size_t j = 0; j < childObjects.size(); j++ )
{
@@ -1117,7 +1117,7 @@ void WellSummaryPage::initializePage()
//--------------------------------------------------------------------------------------------------
void WellSummaryPage::updateSummaryPage()
{
m_objectGroup->objects.clear();
m_objectGroup->objects.clearWithoutDelete();
m_textEdit->setText( "Summary of imported wells\n\n" );

View File

@@ -122,7 +122,7 @@ std::vector<caf::PdmObjectHandle*> RicToggleItemsOnOthersOffFeature::childObject
std::vector<caf::PdmObjectHandle*> children;
if ( parent )
{
parent->childObjects( &children );
parent->children( &children );
}
return children;
}

View File

@@ -42,7 +42,7 @@ public:
{
// Remove the view linker object from the view linker collection
// viewLinkerCollection->viewLinker is a PdmChildField containing one RimViewLinker child object
proj->viewLinkerCollection->viewLinker.removeChildObject( viewLinker );
proj->viewLinkerCollection->viewLinker.removeChild( viewLinker );
viewLinker->applyCellFilterCollectionByUserChoice();

View File

@@ -87,7 +87,7 @@ void RicUnLinkViewFeature::onActionTriggered( bool isChecked )
{
// Remove the view linker object from the view linker collection
// viewLinkerCollection->viewLinker is a PdmChildField containing one RimViewLinker child object
RimProject::current()->viewLinkerCollection->viewLinker.removeChildObject( viewLinker );
RimProject::current()->viewLinkerCollection->viewLinker.removeChild( viewLinker );
delete viewLinker;
}