Janitor : Hide loading of date for one time step from public API

ResInsight assumes that loading of data is done for all time steps at a time. Special handling of data loading is required for statistics calculations. Make statistical class a friend to be able to do this operation.
This commit is contained in:
Magne Sjaastad
2021-02-26 14:16:38 +01:00
parent 9373326281
commit d9f4d4682f
4 changed files with 12 additions and 20 deletions

View File

@@ -127,7 +127,6 @@ public:
bool updateResultName( RiaDefines::ResultCatType resultType, const QString& oldName, const QString& newName );
QString makeResultNameUnique( const QString& resultNameProposal ) const;
void ensureKnownResultLoadedForTimeStep( const RigEclipseResultAddress& resultAddress, size_t timeStepIndex );
bool ensureKnownResultLoaded( const RigEclipseResultAddress& resultAddress );
bool findAndLoadResultByName( const QString& resultName,
@@ -150,7 +149,11 @@ private:
size_t findOrLoadKnownScalarResultByResultTypeOrder( const RigEclipseResultAddress& resVarAddr,
const std::vector<RiaDefines::ResultCatType>& resultCategorySearchOrder );
// Add a friend class, as this way of loading data requires careful management of state
// All other data access assumes all time steps are loaded at the same time
friend class RimEclipseStatisticsCaseEvaluator;
size_t findOrLoadKnownScalarResultForTimeStep( const RigEclipseResultAddress& resVarAddr, size_t timeStepIndex );
size_t findOrCreateScalarResultIndex( const RigEclipseResultAddress& resVarAddr, bool needsToBeStored );
size_t findScalarResultIndexFromAddress( const RigEclipseResultAddress& resVarAddr ) const;