opm-common
Loading...
Searching...
No Matches
Opm::RPTKeywordNormalisation Class Reference

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.
using MnemonicPredicate = std::function<bool(const std::string&)>
 Mnemonic validity predicate.

Public Member Functions

 RPTKeywordNormalisation (IntegerControlHandler integerControlHandler, MnemonicPredicate isMnemonic)
 Constructor.
MnemonicMap normaliseKeyword (const DeckKeyword &kw, const ParseContext &parseContext, ErrorGuard &errors) const
 Normalise report keyword specification into sequence of mnemonics and associate integer values.

Detailed Description

Normalise disparate input sources into sequence of report keyword mnemonics and associate values.

Constructor & Destructor Documentation

◆ RPTKeywordNormalisation()

Opm::RPTKeywordNormalisation::RPTKeywordNormalisation ( IntegerControlHandler integerControlHandler,
MnemonicPredicate isMnemonic )
inlineexplicit

Constructor.

Parameters
[in]integerControlHandlerCallback 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]isMnemonicCallback for checking the validity of a report mnemonic string.

Member Function Documentation

◆ normaliseKeyword()

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.

Parameters
[in]kwReport keyword specification, typically from RPTSCHED, RPTRST, or RPTSOL.
[in]parseContextError handling controls.
[in,out]errorsCollection of parse errors encountered thus far. Behaviour controlled by parseContext.
Returns
Sequence of mnemonics and associate integer values.

The documentation for this class was generated from the following files: