2019-10-30 05:05:32 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2019- Equinor ASA
|
|
|
|
//
|
|
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2019-10-30 15:11:40 -05:00
|
|
|
#include "RimEclipseInputProperty.h"
|
|
|
|
|
|
|
|
#include <set>
|
2019-10-30 05:05:32 -05:00
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
class RimEclipseInputPropertyCollection;
|
|
|
|
class RigEclipseCaseData;
|
2019-10-30 15:57:58 -05:00
|
|
|
namespace caf
|
|
|
|
{
|
|
|
|
class ProgressInfo;
|
|
|
|
}
|
2019-10-30 05:05:32 -05:00
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==================================================================================================
|
|
|
|
class RifEclipseInputPropertyLoader
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
static void loadAndSyncronizeInputProperties( RimEclipseInputPropertyCollection* inputPropertyCollection,
|
|
|
|
RigEclipseCaseData* eclipseCaseData,
|
2020-11-13 02:38:44 -06:00
|
|
|
const std::vector<QString>& filenames,
|
|
|
|
bool allowImportOfFaults );
|
2019-11-06 03:54:42 -06:00
|
|
|
|
2019-10-30 05:05:32 -05:00
|
|
|
static bool readInputPropertiesFromFiles( RimEclipseInputPropertyCollection* inputPropertyCollection,
|
|
|
|
RigEclipseCaseData* eclipseCaseData,
|
|
|
|
bool importFaults,
|
|
|
|
const std::vector<QString>& filenames );
|
|
|
|
|
2020-11-13 02:38:44 -06:00
|
|
|
static bool importFaultsFromFile( RigEclipseCaseData* eclipseCase, const QString& fileName );
|
|
|
|
|
2019-10-30 05:05:32 -05:00
|
|
|
private:
|
|
|
|
// Hide constructor to prevent instantiation
|
|
|
|
RifEclipseInputPropertyLoader();
|
2019-10-30 15:11:40 -05:00
|
|
|
|
|
|
|
static std::set<QString> extractKeywordsOnFile( const QString& filename, bool isExistingFile );
|
|
|
|
|
|
|
|
static void setResolvedState( RimEclipseInputPropertyCollection* inputPropertyCollection,
|
|
|
|
RimEclipseInputProperty::ResolveState currentState,
|
|
|
|
RimEclipseInputProperty::ResolveState newState );
|
2019-10-30 15:57:58 -05:00
|
|
|
|
|
|
|
static void readDataForEachInputProperty( RimEclipseInputPropertyCollection* inputPropertyCollection,
|
|
|
|
RigEclipseCaseData* eclipseCaseData,
|
|
|
|
const QString& filename,
|
|
|
|
bool isExistingFile,
|
2020-11-13 02:38:44 -06:00
|
|
|
bool allowImportOfFaults,
|
2019-10-30 15:57:58 -05:00
|
|
|
std::set<QString>* fileKeywordSet,
|
|
|
|
caf::ProgressInfo* progressInfo,
|
|
|
|
int progressOffset );
|
2019-10-30 16:13:41 -05:00
|
|
|
|
|
|
|
static void readInputPropertiesForRemainingKeywords( RimEclipseInputPropertyCollection* inputPropertyCollection,
|
|
|
|
RigEclipseCaseData* eclipseCaseData,
|
|
|
|
const QString& filename,
|
|
|
|
std::set<QString>* fileKeywordSet );
|
2019-10-30 05:05:32 -05:00
|
|
|
};
|