diff --git a/ApplicationCode/GrpcInterface/Python/rips/case.py b/ApplicationCode/GrpcInterface/Python/rips/case.py index 263bfda163..ba325c6bbc 100644 --- a/ApplicationCode/GrpcInterface/Python/rips/case.py +++ b/ApplicationCode/GrpcInterface/Python/rips/case.py @@ -19,6 +19,7 @@ from rips.grid import Grid from rips.pdmobject import PdmObject from rips.view import View + class Case(PdmObject): """ResInsight case class diff --git a/ApplicationCode/GrpcInterface/Python/rips/grid.py b/ApplicationCode/GrpcInterface/Python/rips/grid.py index 5858f58429..ba306d932e 100644 --- a/ApplicationCode/GrpcInterface/Python/rips/grid.py +++ b/ApplicationCode/GrpcInterface/Python/rips/grid.py @@ -9,6 +9,7 @@ import rips.generated.Case_pb2 as Case_pb2 import rips.generated.Grid_pb2 as Grid_pb2 import rips.generated.Grid_pb2_grpc as Grid_pb2_grpc + class Grid: """Grid Information. Not meant to be constructed separately diff --git a/ApplicationCode/GrpcInterface/Python/rips/gridcasegroup.py b/ApplicationCode/GrpcInterface/Python/rips/gridcasegroup.py index 7c11e7a439..b9feb7de23 100644 --- a/ApplicationCode/GrpcInterface/Python/rips/gridcasegroup.py +++ b/ApplicationCode/GrpcInterface/Python/rips/gridcasegroup.py @@ -8,6 +8,7 @@ from rips.case import Case import rips.generated.Commands_pb2 as Cmd + class GridCaseGroup(PdmObject): """ResInsight Grid Case Group class diff --git a/ApplicationCode/GrpcInterface/Python/rips/pdmobject.py b/ApplicationCode/GrpcInterface/Python/rips/pdmobject.py index b2dedcac3d..2d8f9cdc0c 100644 --- a/ApplicationCode/GrpcInterface/Python/rips/pdmobject.py +++ b/ApplicationCode/GrpcInterface/Python/rips/pdmobject.py @@ -23,6 +23,14 @@ class PdmObject: self._channel) self._commands = CmdRpc.CommandsStub(channel) + def pb2_object(self): + """ Private method""" + return self._pb2_object + + def channel(self): + """ Private method""" + return self._channel + def address(self): """Get the unique address of the PdmObject diff --git a/ApplicationCode/GrpcInterface/Python/rips/view.py b/ApplicationCode/GrpcInterface/Python/rips/view.py index 99f30aa38f..3e9aabb67b 100644 --- a/ApplicationCode/GrpcInterface/Python/rips/view.py +++ b/ApplicationCode/GrpcInterface/Python/rips/view.py @@ -15,10 +15,9 @@ class View(PdmObject): """ def __init__(self, pdm_object): + PdmObject.__init__(self, pdm_object.pb2_object(), pdm_object.channel()) self.view_id = pdm_object.get_value("ViewId") - PdmObject.__init__(self, pdm_object._pb2_object, pdm_object._channel) - def show_grid_box(self): """Check if the grid box is meant to be shown in the view""" return self.get_value("ShowGridBox")