#2122 Formation/Well Path: Use reader in WellPath classes

This commit is contained in:
Unknown
2017-11-24 15:18:25 +01:00
committed by Rebecca Cox
parent 7e28039ffd
commit e80cd8de7c
6 changed files with 155 additions and 22 deletions
@@ -20,22 +20,22 @@
#include "RimWellPath.h"
#include "RifWellPathFormationsImporter.h"
#include "RifWellPathImporter.h"
#include "RigWellPath.h"
#include "RimFishbonesMultipleSubs.h"
#include "RimMainPlotCollection.h"
#include "RimProject.h"
#include "RimTools.h"
#include "RimWellLogFile.h"
#include "RimWellLogPlotCollection.h"
#include "RimWellPathCollection.h"
#include "RimWellPathCompletions.h"
#include "RimWellPathFracture.h"
#include "RimWellPathFractureCollection.h"
#include "RimFishbonesMultipleSubs.h"
#include "RimWellPathCompletions.h"
#include "RiuMainWindow.h"
#include "RivWellPathPartMgr.h"
@@ -50,6 +50,7 @@
#include <QDir>
#include <QFileInfo>
#include <QMessageBox>
#include <QString>
#include <regex>
@@ -677,6 +678,39 @@ void RimWellPath::detachWellLogFile(RimWellLogFile* logFileInfo)
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellPath::setWellFormationFile(const QString& formationFilePath)
{
m_wellPathFormationFilePath = formationFilePath;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RimWellPath::wellFormationFile() const
{
return m_wellPathFormationFilePath;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimWellPath::readWellPathFormationsFile(QString* errorMessage, RifWellPathFormationsImporter* wellPathFormationsImporter)
{
if (caf::Utils::fileExists(m_wellPathFormationFilePath()))
{
m_wellPathFormations = wellPathFormationsImporter->readWellPathFormations(m_wellPathFormationFilePath(), m_name());
return true;
}
else
{
if (errorMessage) (*errorMessage) = "Could not find the well path formation file: " + m_wellPathFormationFilePath();
return false;
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------