|
opm-common
|
Normalise disparate input sources into sequence of report keyword mnemonics and associate values. More...
#include <RPTKeywordNormalisation.hpp>
Public Types | |
| using | MnemonicMap = std::vector< std::pair< std::string, int > > |
| Mnemonic sequence. Preserves input ordering. | |
| using | IntegerControlHandler = std::function< MnemonicMap(const std::vector< int > &)> |
| Callback for translating a sequence of integer controls into a sequence of mnemonics. More... | |
| using | MnemonicPredicate = std::function< bool(const std::string &)> |
| Mnemonic validity predicate. | |
Public Member Functions | |
| RPTKeywordNormalisation (IntegerControlHandler integerControlHandler, MnemonicPredicate isMnemonic) | |
| Constructor. More... | |
| MnemonicMap | normaliseKeyword (const DeckKeyword &kw, const ParseContext &parseContext, ErrorGuard &errors) const |
| Normalise report keyword specification into sequence of mnemonics and associate integer values. More... | |
Normalise disparate input sources into sequence of report keyword mnemonics and associate values.
| using Opm::RPTKeywordNormalisation::IntegerControlHandler = std::function<MnemonicMap(const std::vector<int>&)> |
Callback for translating a sequence of integer controls into a sequence of mnemonics.
|
inlineexplicit |
Constructor.
| [in] | integerControlHandler | Callback for translating a sequence of integer controls, typically from the RPTSCHED, RPTRST, or RPTSOL keywords, into a sequence of mnemonics. It is the caller's responsibility to provide a callback that matches the current report keyword context. |
| [in] | isMnemonic | Callback for checking the validity of a report mnemonic string. |
| Opm::RPTKeywordNormalisation::MnemonicMap Opm::RPTKeywordNormalisation::normaliseKeyword | ( | const DeckKeyword & | kw, |
| const ParseContext & | parseContext, | ||
| ErrorGuard & | errors | ||
| ) | const |
Normalise report keyword specification into sequence of mnemonics and associate integer values.
| [in] | kw | Report keyword specification, typically from RPTSCHED, RPTRST, or RPTSOL. |
| [in] | parseContext | Error handling controls. |
| [in,out] | errors | Collection of parse errors encountered thus far. Behaviour controlled by parseContext. |