2017-10-16 08:13:31 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2017- Statoil ASA
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2017-10-16 08:13:31 -05: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-10-16 08:13:31 -05: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-10-16 08:13:31 -05:00
|
|
|
// for more details.B
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2018-08-30 04:17:37 -05:00
|
|
|
#include "RifEclipseSummaryAddress.h"
|
|
|
|
|
2017-10-24 07:19:36 -05:00
|
|
|
#include <string>
|
2021-09-12 05:48:28 -05:00
|
|
|
#include <unordered_map>
|
2017-10-16 08:13:31 -05:00
|
|
|
|
2017-10-24 07:19:36 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-10-24 07:19:36 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-10-18 07:28:02 -05:00
|
|
|
class RiuSummaryQuantityNameInfoProvider
|
2017-10-16 08:13:31 -05:00
|
|
|
{
|
|
|
|
public:
|
2019-10-18 07:28:02 -05:00
|
|
|
static RiuSummaryQuantityNameInfoProvider* instance();
|
2017-10-16 08:13:31 -05:00
|
|
|
|
2019-10-18 07:28:02 -05:00
|
|
|
RifEclipseSummaryAddress::SummaryVarCategory categoryFromQuantityName( const std::string& quantity ) const;
|
|
|
|
std::string longNameFromQuantityName( const std::string& quantity, bool returnVectorNameIfNotFound = false ) const;
|
2017-10-16 08:13:31 -05:00
|
|
|
|
|
|
|
private:
|
2019-10-18 07:28:02 -05:00
|
|
|
class RiuSummaryQuantityInfo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
RiuSummaryQuantityInfo()
|
|
|
|
: category( RifEclipseSummaryAddress::SUMMARY_INVALID )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
RiuSummaryQuantityInfo( RifEclipseSummaryAddress::SummaryVarCategory category, const std::string& longName )
|
|
|
|
: category( category )
|
|
|
|
, longName( longName )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
RifEclipseSummaryAddress::SummaryVarCategory category;
|
|
|
|
std::string longName;
|
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
|
|
|
RiuSummaryQuantityNameInfoProvider();
|
2017-10-16 08:13:31 -05:00
|
|
|
|
2019-10-18 07:28:02 -05:00
|
|
|
RiuSummaryQuantityInfo quantityInfo( const std::string& quantity ) const;
|
|
|
|
|
2021-09-12 05:48:28 -05:00
|
|
|
static std::unordered_map<std::string, RiuSummaryQuantityInfo> createInfoForEclipseKeywords();
|
|
|
|
static std::unordered_map<std::string, RiuSummaryQuantityInfo> createInfoFor6xKeywords();
|
2020-10-02 11:25:53 -05:00
|
|
|
|
2017-10-16 08:13:31 -05:00
|
|
|
private:
|
2021-09-12 05:48:28 -05:00
|
|
|
std::unordered_map<std::string, RiuSummaryQuantityInfo> m_summaryToDescMap;
|
2017-10-16 08:13:31 -05:00
|
|
|
};
|