Remove direct access to the well path field in RimWellPathCollection

This commit is contained in:
Gaute Lindkvist
2020-10-06 15:00:39 +02:00
parent aceac43652
commit 6622328622
16 changed files with 126 additions and 153 deletions

View File

@@ -28,6 +28,7 @@
RigWellPath::RigWellPath()
: m_hasDatumElevation( false )
, m_datumElevation( 0.0 )
, objectBeingDeleted( this )
{
}
@@ -39,6 +40,7 @@ RigWellPath::RigWellPath( const RigWellPath& rhs )
, m_measuredDepths( rhs.m_measuredDepths )
, m_hasDatumElevation( rhs.m_hasDatumElevation )
, m_datumElevation( rhs.m_datumElevation )
, objectBeingDeleted( this )
{
}
@@ -48,6 +50,7 @@ RigWellPath::RigWellPath( const RigWellPath& rhs )
RigWellPath::RigWellPath( const std::vector<cvf::Vec3d>& wellPathPoints, const std::vector<double>& measuredDepths )
: m_wellPathPoints( wellPathPoints )
, m_measuredDepths( measuredDepths )
, objectBeingDeleted( this )
{
}
@@ -63,6 +66,11 @@ RigWellPath& RigWellPath::operator=( const RigWellPath& rhs )
return *this;
}
RigWellPath::~RigWellPath()
{
objectBeingDeleted.send();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -18,27 +18,33 @@
#pragma once
#include "cafSignal.h"
#include "cvfMath.h"
#include "cvfObject.h"
#include "cvfVector3.h"
#include <vector>
namespace cvf
{
class BoundingBox;
}
#include <vector>
//==================================================================================================
///
//==================================================================================================
class RigWellPath : public cvf::Object
class RigWellPath : public cvf::Object, public caf::SignalEmitter
{
public:
caf::Signal<> objectBeingDeleted;
public:
RigWellPath();
RigWellPath( const std::vector<cvf::Vec3d>& wellPathPoints, const std::vector<double>& measuredDepths );
RigWellPath( const RigWellPath& rhs );
RigWellPath& operator=( const RigWellPath& rhs );
~RigWellPath();
const std::vector<cvf::Vec3d>& wellPathPoints() const;
const std::vector<double>& measuredDepths() const;