adding hasTable() method to the VFP properties

and give a clear message about non-accessible table ID in the function
isVFPActive() in WellInterface.
This commit is contained in:
Kai Bao
2018-11-14 14:29:28 +01:00
parent cf2eb1c336
commit bf967e50a7
6 changed files with 35 additions and 3 deletions

View File

@@ -557,6 +557,15 @@ const T* getTable(const std::map<int, T*> tables, int table_id) {
}
}
/**
* Check whether we have a table with the table number
*/
template <typename T>
bool hasTable(const std::map<int, T*> tables, int table_id) {
const auto entry = tables.find(table_id);
return (entry != tables.end() );
}
/**
* Returns the type variable for FLO/GFR/WFR for production tables