Add some friends to protect direct access to internal cell storage

This commit is contained in:
jonjenssen
2024-10-25 17:59:43 +02:00
committed by jonjenssen
parent f21d1545f8
commit f7ecd38592
2 changed files with 12 additions and 2 deletions

View File

@@ -34,7 +34,8 @@ public:
size_t totalCellCount() const override;
size_t totalActiveCellCount() const;
public: // only for use by file readers!
protected: // only for use by file readers!
friend class RifReaderOpmCommonActive;
std::map<size_t, RigCell>& nativeCells();
const std::map<size_t, RigCell>& nativeCells() const;
void setTotalCellCount( size_t totalCellCount );

View File

@@ -113,7 +113,16 @@ public:
bool isDualPorosity() const;
void setDualPorosity( bool enable );
public: // only for use by file readers!
protected: // only for use by file readers and internal services. TODO: replace with a better API
friend class RigGridBase;
friend class RigReservoirBuilder;
friend class RifRoffFileTools;
friend class RifEclipseOutputFileTools;
friend class RifReaderEclipseOutput;
friend class RifReaderOpmCommon;
friend class RiaGrpcCaseService;
friend class RiaActiveCellInfoStateHandler;
friend class RicCreateTemporaryLgrFeature;
std::vector<RigCell>& reservoirCells();
const std::vector<RigCell>& reservoirCells() const;