21#ifndef OPM_PARSE_CONTEXT_HPP
22#define OPM_PARSE_CONTEXT_HPP
32enum class InputErrorAction;
88 explicit ParseContext(
const std::vector<std::pair<std::string , InputErrorAction>>& initial);
90 void handleError(
const std::string& errorKey,
const std::string& msg,
const std::optional<KeywordLocation>& location,
ErrorGuard& errors)
const;
91 void handleUnknownKeyword(
const std::string& keyword,
const std::optional<KeywordLocation>& location,
ErrorGuard& errors)
const;
92 bool hasKey(
const std::string& key)
const;
93 ParseContext withKey(
const std::string& key, InputErrorAction action)
const;
94 ParseContext& withKey(
const std::string& key, InputErrorAction action);
95 void updateKey(
const std::string& key , InputErrorAction action);
96 void update(InputErrorAction action);
97 void update(
const std::string& keyString , InputErrorAction action);
98 void ignoreKeyword(
const std::string& keyword);
99 InputErrorAction get(
const std::string& key)
const;
100 std::map<std::string,InputErrorAction>::const_iterator begin()
const;
101 std::map<std::string,InputErrorAction>::const_iterator end()
const;
108 void addKey(
const std::string& key, InputErrorAction default_action);
126 const static std::string PARSE_EXTRA_RECORDS;
150 const static std::string PARSE_UNKNOWN_KEYWORD;
156 const static std::string PARSE_RANDOM_TEXT;
163 const static std::string PARSE_RANDOM_SLASH;
178 const static std::string PARSE_MISSING_DIMS_KEYWORD;
188 const static std::string PARSE_EXTRA_DATA;
195 const static std::string PARSE_MISSING_INCLUDE;
203 const static std::string PARSE_INVALID_KEYWORD_COMBINATION;
226 const static std::string PARSE_LONG_KEYWORD;
232 const static std::string UNIT_SYSTEM_MISMATCH;
240 const static std::string UNSUPPORTED_INITIAL_THPRES;
247 const static std::string UNSUPPORTED_TERMINATE_IF_BHP;
249 const static std::string UDQ_PARSE_ERROR;
250 const static std::string UDQ_TYPE_ERROR;
259 const static std::string INTERNAL_ERROR_UNINITIALIZED_THPRES;
265 const static std::string PARSE_MISSING_SECTIONS;
274 const static std::string PARSE_WGNAME_SPACE;
280 const static std::string SUMMARY_UNKNOWN_WELL;
281 const static std::string SUMMARY_UNKNOWN_GROUP;
282 const static std::string SUMMARY_UNKNOWN_NODE;
283 const static std::string SUMMARY_UNKNOWN_AQUIFER;
284 const static std::string SUMMARY_UNHANDLED_KEYWORD;
285 const static std::string SUMMARY_UNDEFINED_UDQ;
286 const static std::string SUMMARY_UDQ_MISSING_UNIT;
287 const static std::string SUMMARY_INVALID_FIPNUM;
288 const static std::string SUMMARY_EMPTY_REGION;
289 const static std::string SUMMARY_REGION_TOO_LARGE;
295 const static std::string SCHEDULE_INVALID_NAME;
303 const static std::string ACTIONX_ILLEGAL_KEYWORD;
336 const static std::string RPT_MIXED_STYLE;
338 const static std::string RPT_UNKNOWN_MNEMONIC;
340 const static std::string SCHEDULE_GROUP_ERROR;
341 const static std::string SCHEDULE_IGNORED_GUIDE_RATE;
343 const static std::string SCHEDULE_COMPSEGS_INVALID;
344 const static std::string SCHEDULE_COMPSEGS_NOT_SUPPORTED;
352 const static std::string SIMULATOR_KEYWORD_NOT_SUPPORTED;
353 const static std::string SIMULATOR_KEYWORD_NOT_SUPPORTED_CRITICAL;
354 const static std::string SIMULATOR_KEYWORD_ITEM_NOT_SUPPORTED;
355 const static std::string SIMULATOR_KEYWORD_ITEM_NOT_SUPPORTED_CRITICAL;
360 void envUpdate(
const std::string& envVariable , InputErrorAction action );
361 void patternUpdate(
const std::string& pattern , InputErrorAction action);
363 std::map<std::string , InputErrorAction> m_errorContexts;
364 std::set<std::string> ignore_keywords;
Definition: ErrorGuard.hpp:29
Definition: ParseContext.hpp:84
static const std::string RUNSPEC_NUMWELLS_TOO_LARGE
Dynamic number of wells exceeds maximum declared in RUNSPEC keyword WELLDIMS (item 1).
Definition: ParseContext.hpp:207
static const std::string RUNSPEC_CONNS_PER_WELL_TOO_LARGE
Dynamic number of connections per well exceeds maximum declared in RUNSPEC keyword WELLDIMS (item 2).
Definition: ParseContext.hpp:211
static const std::string RUNSPEC_GROUPSIZE_TOO_LARGE
Dynamic group size exceeds maximum number declared in RUNSPEC keyword WELLDIMS (item 4).
Definition: ParseContext.hpp:219
static const std::string RUNSPEC_NUMGROUPS_TOO_LARGE
Dynamic number of groups exceeds maximum number declared in RUNSPEC keyword WELLDIMS (item 3).
Definition: ParseContext.hpp:215
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30