mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2123 Formation/Well Path: Add access functions
This commit is contained in:
parent
a724049487
commit
b8848317f4
@ -28,6 +28,47 @@ RigWellPathFormations::RigWellPathFormations(std::vector<std::pair<double, QStri
|
||||
m_keyInFile = key;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::vector<std::pair<double, QString>>& RigWellPathFormations::measuredDepthAndFormationNames() const
|
||||
{
|
||||
return m_measuredDepthAndFormationNames;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigWellPathFormations::measuredDepthAndFormationNames(std::vector<QString>& names, std::vector<double>& measuredDepths) const
|
||||
{
|
||||
for (std::pair<double, QString> mdAndFormName : m_measuredDepthAndFormationNames)
|
||||
{
|
||||
measuredDepths.push_back(mdAndFormName.first);
|
||||
names.push_back(mdAndFormName.second);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigWellPathFormations::measuredDepthAndFormationNamesWithoutDuplicates(std::vector<QString>& names, std::vector<double>& measuredDepths) const
|
||||
{
|
||||
names.clear();
|
||||
measuredDepths.clear();
|
||||
|
||||
std::map<double, QString> tempMakeVectorUniqueOnMeasuredDepth;
|
||||
|
||||
for (const std::pair<double, QString>& mdAndFormName : m_measuredDepthAndFormationNames)
|
||||
{
|
||||
if (tempMakeVectorUniqueOnMeasuredDepth.find(mdAndFormName.first) == tempMakeVectorUniqueOnMeasuredDepth.end())
|
||||
{
|
||||
measuredDepths.push_back(mdAndFormName.first);
|
||||
names.push_back(mdAndFormName.second);
|
||||
tempMakeVectorUniqueOnMeasuredDepth[mdAndFormName.first] = mdAndFormName.second;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -32,6 +32,11 @@ class RigWellPathFormations : public cvf::Object
|
||||
public:
|
||||
RigWellPathFormations(std::vector<std::pair<double, QString>> measuredDepthAndFormationNames, const QString& filePath, const QString& key);
|
||||
|
||||
const std::vector<std::pair<double, QString>>& measuredDepthAndFormationNames() const;
|
||||
|
||||
void measuredDepthAndFormationNames(std::vector<QString>& names, std::vector<double>& measuredDepths) const;
|
||||
void measuredDepthAndFormationNamesWithoutDuplicates(std::vector<QString>& names, std::vector<double>& measuredDepths) const;
|
||||
|
||||
QString filePath() const;
|
||||
QString keyInFile() const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user