2017-11-22 13:34:18 -06:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2017- Statoil ASA
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2017-11-22 13:34:18 -06:00
|
|
|
// 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.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2017-11-22 13:34:18 -06:00
|
|
|
// 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.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2017-11-22 13:34:18 -06:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "RifSummaryReaderInterface.h"
|
|
|
|
|
2019-10-30 03:12:13 -05:00
|
|
|
#include "SummaryPlotCommands/RicPasteAsciiDataToSummaryPlotFeatureUi.h"
|
2017-11-22 13:34:18 -06:00
|
|
|
|
|
|
|
#include <map>
|
|
|
|
#include <memory>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
class QString;
|
|
|
|
|
|
|
|
class RifCsvUserDataParser;
|
|
|
|
class RifEclipseSummaryAddress;
|
|
|
|
class TableData;
|
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//==================================================================================================
|
|
|
|
class RifCsvUserData : public RifSummaryReaderInterface
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
RifCsvUserData();
|
2018-10-18 12:45:57 -05:00
|
|
|
~RifCsvUserData() override;
|
2017-11-22 13:34:18 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
bool parse( const QString& fileName, const AsciiDataParseOptions& parseOptions, QString* errorText = nullptr );
|
2017-11-22 13:34:18 -06:00
|
|
|
|
2023-02-13 05:40:08 -06:00
|
|
|
std::vector<time_t> timeSteps( const RifEclipseSummaryAddress& resultAddress ) const override;
|
2017-11-22 13:34:18 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
bool values( const RifEclipseSummaryAddress& resultAddress, std::vector<double>* values ) const override;
|
2017-11-22 13:34:18 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
std::string unitName( const RifEclipseSummaryAddress& resultAddress ) const override;
|
2019-07-25 00:38:46 -05:00
|
|
|
|
2021-01-21 05:58:46 -06:00
|
|
|
RiaDefines::EclipseUnitSystem unitSystem() const override;
|
2019-07-25 00:38:46 -05:00
|
|
|
|
2017-11-22 13:34:18 -06:00
|
|
|
private:
|
2019-09-06 03:40:57 -05:00
|
|
|
void buildTimeStepsAndMappings();
|
2017-11-22 13:34:18 -06:00
|
|
|
|
|
|
|
private:
|
2019-09-06 03:40:57 -05:00
|
|
|
std::unique_ptr<RifCsvUserDataParser> m_parser;
|
2017-11-22 13:34:18 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
std::map<RifEclipseSummaryAddress, size_t> m_mapFromAddressToResultIndex;
|
2017-11-22 13:34:18 -06:00
|
|
|
};
|