mirror of
https://github.com/OPM/ResInsight.git
synced 2026-09-03 20:53:13 -05:00
Refactor classes in RigWellResultPoint.h
* Move RigWellResultFrame implementation into separate file Update/correct includes accordingly * First step of moving attributes from public to private - Move public members to private and create interface - Single public member remains due to strong dependency on usage of reference and reference to its object public members * Second step of moving attributes from public to privatee - Remove usage of reference directly to attributes. Interface with copy and set. - Moving attributes in RigWellResultFrame and RigWellResultBranch * Move class RigWellResultBranch into separate file
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigGridBase.h"
|
||||
#include "RigSimWellData.h"
|
||||
#include "RigWellResultFrame.h"
|
||||
#include "RigWellResultPoint.h"
|
||||
|
||||
#include "RimCase.h"
|
||||
@@ -58,7 +59,7 @@ grpc::Status RiaGrpcSimulationWellService::GetSimulationWellStatus( grpc::Server
|
||||
bool wellStatus = false;
|
||||
if ( currentWellResult->hasWellResult( tsIdx ) )
|
||||
{
|
||||
switch ( currentWellResult->wellResultFrame( tsIdx )->m_productionType )
|
||||
switch ( currentWellResult->wellResultFrame( tsIdx )->productionType() )
|
||||
{
|
||||
case RiaDefines::WellProductionType::PRODUCER:
|
||||
wellType = "Producer";
|
||||
@@ -74,7 +75,7 @@ grpc::Status RiaGrpcSimulationWellService::GetSimulationWellStatus( grpc::Server
|
||||
break;
|
||||
}
|
||||
|
||||
wellStatus = currentWellResult->wellResultFrame( tsIdx )->m_isOpen;
|
||||
wellStatus = currentWellResult->wellResultFrame( tsIdx )->isOpen();
|
||||
}
|
||||
|
||||
reply->set_well_type( wellType.toStdString() );
|
||||
@@ -111,10 +112,9 @@ grpc::Status RiaGrpcSimulationWellService::GetSimulationWellCells( grpc::ServerC
|
||||
std::vector<RigGridBase*> grids;
|
||||
eclipseCase->eclipseCaseData()->allGrids( &grids );
|
||||
|
||||
for ( size_t bIdx = 0; bIdx < wellResFrame->m_wellResultBranches.size(); ++bIdx )
|
||||
for ( size_t bIdx = 0; bIdx < wellResFrame->wellResultBranches().size(); ++bIdx )
|
||||
{
|
||||
const std::vector<RigWellResultPoint>& branchResPoints =
|
||||
wellResFrame->m_wellResultBranches[bIdx].m_branchResultPoints;
|
||||
const std::vector<RigWellResultPoint> branchResPoints = wellResFrame->branchResultPointsFromBranchIndex( bIdx );
|
||||
for ( size_t rpIdx = 0; rpIdx < branchResPoints.size(); ++rpIdx )
|
||||
{
|
||||
const RigWellResultPoint& resPoint = branchResPoints[rpIdx];
|
||||
|
||||
Reference in New Issue
Block a user