#4683 clang-format on all files in ApplicationCode

This commit is contained in:
Magne Sjaastad
2019-09-06 10:40:57 +02:00
parent 3a317504bb
commit fe9e567825
2092 changed files with 117952 additions and 111846 deletions

View File

@@ -2,17 +2,17 @@
//
// Copyright (C) 2015- Statoil ASA
// Copyright (C) 2015- Ceetron Solutions AS
//
//
// 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.
//
//
// 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.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
@@ -26,27 +26,27 @@
#include "RimEclipseCase.h"
#include "RimGeoMechCase.h"
#include "RimWellLogPlot.h"
#include "RimWellRftPlot.h"
#include "RimWellPath.h"
#include "RimWellPathCollection.h"
#include "RimWellRftPlot.h"
#include "cvfAssert.h"
CAF_PDM_SOURCE_INIT(RimRftPlotCollection, "WellRftPlotCollection");
CAF_PDM_SOURCE_INIT( RimRftPlotCollection, "WellRftPlotCollection" );
//--------------------------------------------------------------------------------------------------
///
///
//--------------------------------------------------------------------------------------------------
RimRftPlotCollection::RimRftPlotCollection()
{
CAF_PDM_InitObject("RFT Plots", ":/RFTPlots16x16.png", "", "");
CAF_PDM_InitObject( "RFT Plots", ":/RFTPlots16x16.png", "", "" );
CAF_PDM_InitFieldNoDefault(&m_rftPlots, "RftPlots", "", "", "", "");
m_rftPlots.uiCapability()->setUiHidden(true);
CAF_PDM_InitFieldNoDefault( &m_rftPlots, "RftPlots", "", "", "", "" );
m_rftPlots.uiCapability()->setUiHidden( true );
}
//--------------------------------------------------------------------------------------------------
///
///
//--------------------------------------------------------------------------------------------------
RimRftPlotCollection::~RimRftPlotCollection()
{
@@ -54,139 +54,146 @@ RimRftPlotCollection::~RimRftPlotCollection()
}
//--------------------------------------------------------------------------------------------------
///
///
//--------------------------------------------------------------------------------------------------
RigEclipseWellLogExtractor* RimRftPlotCollection::findOrCreateSimWellExtractor(const QString& simWellName,
const QString& caseUserDescription,
const RigWellPath* wellPathGeom,
const RigEclipseCaseData* eclCaseData)
RigEclipseWellLogExtractor* RimRftPlotCollection::findOrCreateSimWellExtractor( const QString& simWellName,
const QString& caseUserDescription,
const RigWellPath* wellPathGeom,
const RigEclipseCaseData* eclCaseData )
{
if (!(wellPathGeom && eclCaseData))
if ( !( wellPathGeom && eclCaseData ) )
{
return nullptr;
}
for (size_t exIdx = 0; exIdx < m_extractors.size(); ++exIdx)
for ( size_t exIdx = 0; exIdx < m_extractors.size(); ++exIdx )
{
if (m_extractors[exIdx]->caseData() == eclCaseData && m_extractors[exIdx]->wellPathData() == wellPathGeom)
if ( m_extractors[exIdx]->caseData() == eclCaseData && m_extractors[exIdx]->wellPathData() == wellPathGeom )
{
return m_extractors[exIdx].p();
}
}
std::string errorIdName = (simWellName + " " + caseUserDescription).toStdString();
cvf::ref<RigEclipseWellLogExtractor> extractor = new RigEclipseWellLogExtractor(eclCaseData, wellPathGeom, errorIdName);
m_extractors.push_back(extractor.p());
std::string errorIdName = ( simWellName + " " + caseUserDescription ).toStdString();
cvf::ref<RigEclipseWellLogExtractor> extractor = new RigEclipseWellLogExtractor( eclCaseData,
wellPathGeom,
errorIdName );
m_extractors.push_back( extractor.p() );
return extractor.p();
}
//--------------------------------------------------------------------------------------------------
///
///
//--------------------------------------------------------------------------------------------------
RigEclipseWellLogExtractor* RimRftPlotCollection::findOrCreateExtractor(RimWellPath* wellPath, RimEclipseCase* eclCase)
RigEclipseWellLogExtractor* RimRftPlotCollection::findOrCreateExtractor( RimWellPath* wellPath, RimEclipseCase* eclCase )
{
if (!(wellPath && eclCase && wellPath->wellPathGeometry() && eclCase->eclipseCaseData()))
if ( !( wellPath && eclCase && wellPath->wellPathGeometry() && eclCase->eclipseCaseData() ) )
{
return nullptr;
}
RigEclipseCaseData* eclCaseData = eclCase->eclipseCaseData();
RigWellPath* wellPathGeom = wellPath->wellPathGeometry();
for (size_t exIdx = 0; exIdx < m_extractors.size(); ++exIdx)
RigEclipseCaseData* eclCaseData = eclCase->eclipseCaseData();
RigWellPath* wellPathGeom = wellPath->wellPathGeometry();
for ( size_t exIdx = 0; exIdx < m_extractors.size(); ++exIdx )
{
if (m_extractors[exIdx]->caseData() == eclCaseData && m_extractors[exIdx]->wellPathData() == wellPathGeom)
{
if ( m_extractors[exIdx]->caseData() == eclCaseData && m_extractors[exIdx]->wellPathData() == wellPathGeom )
{
return m_extractors[exIdx].p();
}
}
}
std::string errorIdName = (wellPath->name() + " " + eclCase->caseUserDescription()).toStdString();
cvf::ref<RigEclipseWellLogExtractor> extractor = new RigEclipseWellLogExtractor(eclCaseData, wellPathGeom, errorIdName);
m_extractors.push_back(extractor.p());
std::string errorIdName = ( wellPath->name() + " " + eclCase->caseUserDescription() ).toStdString();
cvf::ref<RigEclipseWellLogExtractor> extractor = new RigEclipseWellLogExtractor( eclCaseData,
wellPathGeom,
errorIdName );
m_extractors.push_back( extractor.p() );
return extractor.p();
}
//--------------------------------------------------------------------------------------------------
///
///
//--------------------------------------------------------------------------------------------------
RigGeoMechWellLogExtractor* RimRftPlotCollection::findOrCreateExtractor(RimWellPath* wellPath, RimGeoMechCase* geomCase)
RigGeoMechWellLogExtractor* RimRftPlotCollection::findOrCreateExtractor( RimWellPath* wellPath, RimGeoMechCase* geomCase )
{
if (!(wellPath && geomCase && wellPath->wellPathGeometry() && geomCase->geoMechData()))
if ( !( wellPath && geomCase && wellPath->wellPathGeometry() && geomCase->geoMechData() ) )
{
return nullptr;
}
RigGeoMechCaseData* geomCaseData = geomCase->geoMechData();
RigWellPath* wellPathGeom = wellPath->wellPathGeometry();
for (size_t exIdx = 0; exIdx < m_geomExtractors.size(); ++exIdx)
RigWellPath* wellPathGeom = wellPath->wellPathGeometry();
for ( size_t exIdx = 0; exIdx < m_geomExtractors.size(); ++exIdx )
{
if (m_geomExtractors[exIdx]->caseData() == geomCaseData && m_geomExtractors[exIdx]->wellPathData() == wellPathGeom)
{
if ( m_geomExtractors[exIdx]->caseData() == geomCaseData &&
m_geomExtractors[exIdx]->wellPathData() == wellPathGeom )
{
return m_geomExtractors[exIdx].p();
}
}
}
std::string errorIdName = (wellPath->name() + " " + geomCase->caseUserDescription()).toStdString();
cvf::ref<RigGeoMechWellLogExtractor> extractor = new RigGeoMechWellLogExtractor(geomCaseData, wellPathGeom, errorIdName);
m_geomExtractors.push_back(extractor.p());
std::string errorIdName = ( wellPath->name() + " " + geomCase->caseUserDescription() ).toStdString();
cvf::ref<RigGeoMechWellLogExtractor> extractor = new RigGeoMechWellLogExtractor( geomCaseData,
wellPathGeom,
errorIdName );
m_geomExtractors.push_back( extractor.p() );
return extractor.p();
}
//--------------------------------------------------------------------------------------------------
///
///
//--------------------------------------------------------------------------------------------------
void RimRftPlotCollection::removeExtractors(const RigWellPath* wellPath)
void RimRftPlotCollection::removeExtractors( const RigWellPath* wellPath )
{
for (int eIdx = (int) m_extractors.size() - 1; eIdx >= 0; eIdx--)
for ( int eIdx = (int)m_extractors.size() - 1; eIdx >= 0; eIdx-- )
{
if (m_extractors[eIdx]->wellPathData() == wellPath)
if ( m_extractors[eIdx]->wellPathData() == wellPath )
{
m_extractors.eraseAt(eIdx);
m_extractors.eraseAt( eIdx );
}
}
for (int eIdx = (int) m_geomExtractors.size() - 1; eIdx >= 0; eIdx--)
for ( int eIdx = (int)m_geomExtractors.size() - 1; eIdx >= 0; eIdx-- )
{
if (m_geomExtractors[eIdx]->wellPathData() == wellPath)
if ( m_geomExtractors[eIdx]->wellPathData() == wellPath )
{
m_geomExtractors.eraseAt(eIdx);
m_geomExtractors.eraseAt( eIdx );
}
}
}
//--------------------------------------------------------------------------------------------------
///
///
//--------------------------------------------------------------------------------------------------
void RimRftPlotCollection::removeExtractors(const RigEclipseCaseData* caseData)
void RimRftPlotCollection::removeExtractors( const RigEclipseCaseData* caseData )
{
for (int eIdx = (int) m_extractors.size() - 1; eIdx >= 0; eIdx--)
for ( int eIdx = (int)m_extractors.size() - 1; eIdx >= 0; eIdx-- )
{
if (m_extractors[eIdx]->caseData() == caseData)
if ( m_extractors[eIdx]->caseData() == caseData )
{
m_extractors.eraseAt(eIdx);
m_extractors.eraseAt( eIdx );
}
}
}
//--------------------------------------------------------------------------------------------------
///
///
//--------------------------------------------------------------------------------------------------
void RimRftPlotCollection::removeExtractors(const RigGeoMechCaseData* caseData)
void RimRftPlotCollection::removeExtractors( const RigGeoMechCaseData* caseData )
{
for (int eIdx = (int) m_geomExtractors.size() - 1; eIdx >= 0; eIdx--)
for ( int eIdx = (int)m_geomExtractors.size() - 1; eIdx >= 0; eIdx-- )
{
if (m_geomExtractors[eIdx]->caseData() == caseData)
if ( m_geomExtractors[eIdx]->caseData() == caseData )
{
m_geomExtractors.eraseAt(eIdx);
m_geomExtractors.eraseAt( eIdx );
}
}
}
//--------------------------------------------------------------------------------------------------
///
///
//--------------------------------------------------------------------------------------------------
void RimRftPlotCollection::deleteAllExtractors()
{
@@ -195,38 +202,37 @@ void RimRftPlotCollection::deleteAllExtractors()
}
//--------------------------------------------------------------------------------------------------
///
///
//--------------------------------------------------------------------------------------------------
const std::vector<RimWellRftPlot*> RimRftPlotCollection::rftPlots() const
{
std::vector<RimWellRftPlot*> plots;
for (const auto& plot : m_rftPlots)
for ( const auto& plot : m_rftPlots )
{
plots.push_back(plot);
plots.push_back( plot );
}
return plots;
}
//--------------------------------------------------------------------------------------------------
///
///
//--------------------------------------------------------------------------------------------------
void RimRftPlotCollection::addPlot(RimWellRftPlot* newPlot)
void RimRftPlotCollection::addPlot( RimWellRftPlot* newPlot )
{
m_rftPlots.push_back(newPlot);
m_rftPlots.push_back( newPlot );
}
//--------------------------------------------------------------------------------------------------
///
///
//--------------------------------------------------------------------------------------------------
void RimRftPlotCollection::removePlot(RimWellRftPlot* plot)
void RimRftPlotCollection::removePlot( RimWellRftPlot* plot )
{
size_t index = m_rftPlots.index(plot);
if (index < m_rftPlots.size())
m_rftPlots.erase(index);
size_t index = m_rftPlots.index( plot );
if ( index < m_rftPlots.size() ) m_rftPlots.erase( index );
}
//--------------------------------------------------------------------------------------------------
///
///
//--------------------------------------------------------------------------------------------------
void RimRftPlotCollection::deleteAllPlots()
{