#1957 Observed Data : Add setters for well name and well group name

This commit is contained in:
Magne Sjaastad
2017-10-03 22:05:33 +02:00
parent b36fcb5f09
commit 2546dc631a
2 changed files with 70 additions and 0 deletions

View File

@@ -192,6 +192,72 @@ std::string RifEclipseSummaryAddress::uiText(RifEclipseSummaryAddress::SummaryId
return "";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RifEclipseSummaryAddress::isValid() const
{
switch (category())
{
case SUMMARY_REGION:
if (m_regionNumber == -1) return false;
return true;
case SUMMARY_REGION_2_REGION:
if (m_regionNumber == -1) return false;
if (m_regionNumber2 == -1) return false;
return true;
case SUMMARY_WELL_GROUP:
if (m_wellGroupName.size() == 0) return false;
return true;
case SUMMARY_WELL:
if (m_wellName.size() == 0) return false;
return true;
case SUMMARY_WELL_COMPLETION:
if (m_wellName.size() == 0) return false;
if (m_cellI == -1) return false;
if (m_cellJ == -1) return false;
if (m_cellK == -1) return false;
return true;
case SUMMARY_WELL_LGR:
if (m_lgrName.size() == 0) return false;
if (m_wellName.size() == 0) return false;
return true;
case SUMMARY_WELL_COMPLETION_LGR:
if (m_lgrName.size() == 0) return false;
if (m_wellName.size() == 0) return false;
if (m_cellI == -1) return false;
if (m_cellJ == -1) return false;
if (m_cellK == -1) return false;
return true;
case SUMMARY_WELL_SEGMENT:
if (m_wellName.size() == 0) return false;
if (m_wellSegmentNumber == -1) return false;
return true;
case SUMMARY_BLOCK:
if (m_cellI == -1) return false;
if (m_cellJ == -1) return false;
if (m_cellK == -1) return false;
return true;
case SUMMARY_BLOCK_LGR:
if (m_lgrName.size() == 0) return false;
if (m_cellI == -1) return false;
if (m_cellJ == -1) return false;
if (m_cellK == -1) return false;
return true;
}
return true;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------