#3904 Summary : Move function

This commit is contained in:
Magne Sjaastad
2018-12-19 10:07:17 +01:00
parent cad072ba0b
commit b7e569d09a
4 changed files with 22 additions and 22 deletions

View File

@@ -185,6 +185,24 @@ std::vector<RifEclipseSummaryAddress>
return filteredAddresses;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::string RiaSummaryCurveAnalyzer::correspondingHistorySummaryCurveName(const std::string& curveName)
{
static std::string historyIdentifier = "H";
if (RiaStdStringTools::endsWith(curveName, historyIdentifier))
{
std::string candidate = curveName.substr(0, curveName.size() - 1);
return candidate;
}
else
{
return curveName + historyIdentifier;
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -58,6 +58,8 @@ public:
static std::vector<RifEclipseSummaryAddress> addressesForCategory(const std::set<RifEclipseSummaryAddress>& addresses,
RifEclipseSummaryAddress::SummaryVarCategory category);
static std::string correspondingHistorySummaryCurveName(const std::string& curveName);
private:
void assignCategoryToQuantities() const;
void computeQuantityNamesWithHistory() const;