Janitor : Use enum class

This commit is contained in:
Magne Sjaastad
2021-05-26 10:56:21 +02:00
parent 19d650f619
commit 3fca5f15ae
18 changed files with 100 additions and 90 deletions

View File

@@ -400,7 +400,7 @@ void RigReservoirBuilderMock::addWellData( RigEclipseCaseData* eclipseCase, RigG
{
RigWellResultFrame& wellCells = wellCellsTimeHistory->m_wellCellsTimeSteps[timeIdx];
wellCells.m_productionType = RigWellResultFrame::PRODUCER;
wellCells.m_productionType = RiaDefines::WellProductionType::PRODUCER;
wellCells.m_isOpen = true;
wellCells.m_wellHead.m_gridIndex = 0;

View File

@@ -311,7 +311,7 @@ bool RigSimWellData::isMultiSegmentWell() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RigWellResultFrame::WellProductionType RigSimWellData::wellProductionType( size_t resultTimeStepIndex ) const
RiaDefines::WellProductionType RigSimWellData::wellProductionType( size_t resultTimeStepIndex ) const
{
if ( hasWellResult( resultTimeStepIndex ) )
{
@@ -320,7 +320,7 @@ RigWellResultFrame::WellProductionType RigSimWellData::wellProductionType( size_
}
else
{
return RigWellResultFrame::UNDEFINED_PRODUCTION_TYPE;
return RiaDefines::WellProductionType::UNDEFINED_PRODUCTION_TYPE;
}
}

View File

@@ -41,9 +41,9 @@ public:
bool hasWellResult( size_t resultTimeStepIndex ) const;
bool hasAnyValidCells( size_t resultTimeStepIndex ) const;
const RigWellResultFrame& wellResultFrame( size_t resultTimeStepIndex ) const;
bool isOpen( size_t resultTimeStepIndex ) const;
RigWellResultFrame::WellProductionType wellProductionType( size_t resultTimeStepIndex ) const;
const RigWellResultFrame& wellResultFrame( size_t resultTimeStepIndex ) const;
bool isOpen( size_t resultTimeStepIndex ) const;
RiaDefines::WellProductionType wellProductionType( size_t resultTimeStepIndex ) const;
const RigWellResultFrame& staticWellCells() const;

View File

@@ -18,6 +18,8 @@
#pragma once
#include "RiaDefines.h"
#include "cvfVector3.h"
#include <QDateTime>
@@ -83,19 +85,9 @@ struct RigWellResultBranch
//==================================================================================================
class RigWellResultFrame
{
public:
enum WellProductionType
{
PRODUCER,
OIL_INJECTOR,
GAS_INJECTOR,
WATER_INJECTOR,
UNDEFINED_PRODUCTION_TYPE
};
public:
RigWellResultFrame()
: m_productionType( UNDEFINED_PRODUCTION_TYPE )
: m_productionType( RiaDefines::WellProductionType::UNDEFINED_PRODUCTION_TYPE )
, m_isOpen( false )
{
}
@@ -103,11 +95,11 @@ public:
const RigWellResultPoint* findResultCellWellHeadIncluded( size_t gridIndex, size_t gridCellIndex ) const;
const RigWellResultPoint* findResultCellWellHeadExcluded( size_t gridIndex, size_t gridCellIndex ) const;
RigWellResultPoint wellHeadOrStartCell() const;
WellProductionType m_productionType;
bool m_isOpen;
RigWellResultPoint m_wellHead;
QDateTime m_timestamp;
RigWellResultPoint wellHeadOrStartCell() const;
RiaDefines::WellProductionType m_productionType;
bool m_isOpen;
RigWellResultPoint m_wellHead;
QDateTime m_timestamp;
std::vector<RigWellResultBranch> m_wellResultBranches;
};