mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
RimCase reintroduced as baseclass for all cases
Refactored to handle cases generically in a lot of places. Mostly complete regarding all these issues, but not tested yet: Assigning caseId Update relative path to the case data RimProject::createDisplayModelAndRedrawAllViews RimProject::computeUtmAreaOfInterest Load case data on project open save snapshots for all views RegressionTest viewer size Finding case based on caseId Giving case information to octave
This commit is contained in:
@@ -72,14 +72,20 @@ RimEclipseCase* RiaSocketTools::findCaseFromArgs(RiaSocketServer* server, const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaSocketTools::getCaseInfoFromCase(RimEclipseCase* rimCase, qint64& caseId, QString& caseName, QString& caseType, qint64& caseGroupId)
|
||||
void RiaSocketTools::getCaseInfoFromCase(RimCase* rimCase, qint64& caseId, QString& caseName, QString& caseType, qint64& caseGroupId)
|
||||
{
|
||||
CVF_ASSERT(rimCase);
|
||||
|
||||
caseId = rimCase->caseId;
|
||||
caseName = rimCase->caseUserDescription;
|
||||
|
||||
RimCaseCollection* caseCollection = rimCase->parentCaseCollection();
|
||||
RimEclipseCase* eclCase = dynamic_cast<RimEclipseCase*> (rimCase);
|
||||
RimCaseCollection* caseCollection = NULL;
|
||||
if (eclCase)
|
||||
{
|
||||
caseCollection = eclCase->parentCaseCollection();
|
||||
}
|
||||
|
||||
if (caseCollection)
|
||||
{
|
||||
caseGroupId = caseCollection->parentCaseGroup()->groupId;
|
||||
@@ -101,6 +107,10 @@ void RiaSocketTools::getCaseInfoFromCase(RimEclipseCase* rimCase, qint64& caseId
|
||||
{
|
||||
caseType = "InputCase";
|
||||
}
|
||||
else if (eclCase)
|
||||
{
|
||||
caseType = "GeoMechCase";
|
||||
}
|
||||
else
|
||||
{
|
||||
caseType = "ResultCase";
|
||||
|
||||
Reference in New Issue
Block a user