My Project
Loading...
Searching...
No Matches
Opm::RPTConfig Class Reference

Configuration manager for RPTSCHED and RPTSOL keywords. More...

#include <RPTConfig.hpp>

Public Member Functions

 RPTConfig ()=default
 Default constructor.
 
 RPTConfig (const DeckKeyword &keyword)
 Constructor.
 
 RPTConfig (const DeckKeyword &keyword, const RPTConfig *prev, const ParseContext &parseContext, ErrorGuard &errors)
 Constructor.
 
bool contains (const std::string &key) const
 Mnemonic existence predicate.
 
auto begin () const
 Start of internal mnemonic sequence.
 
auto end () const
 End of internal mnemonic sequence.
 
auto size () const
 Number of mnemonics in internal sequence.
 
unsigned & at (const std::string &key)
 Get read/write access to particular mnemonic value.
 
unsigned at (const std::string &key) const
 Get read-only access to particular mnemonic value.
 
bool operator== (const RPTConfig &other) const
 Equality predicate.
 
template<class Serializer >
void serializeOp (Serializer &serializer)
 Convert between byte array and object representation.
 

Static Public Member Functions

static RPTConfig serializationTestObject ()
 Create a serialisation test object.
 

Detailed Description

Configuration manager for RPTSCHED and RPTSOL keywords.

Constructor & Destructor Documentation

◆ RPTConfig() [1/3]

Opm::RPTConfig::RPTConfig ( )
default

Default constructor.

Creates a configuration object that's mostly usable as a target for a deserialisation operation.

◆ RPTConfig() [2/3]

Opm::RPTConfig::RPTConfig ( const DeckKeyword keyword)
explicit

Constructor.

Internalises and normalises the specification of an RPTSOL keyword into a set of mnemonics and associate values. Supports both regular mnemonics and integer controls. Performs no error checking and therefore accepts all mnemonics.

Parameters
[in]keywordRPTSCHED keyword specification.

◆ RPTConfig() [3/3]

Opm::RPTConfig::RPTConfig ( const DeckKeyword keyword,
const RPTConfig prev,
const ParseContext parseContext,
ErrorGuard errors 
)
explicit

Constructor.

Internalises and normalises the specification of an RPTSCHED keyword into a set of mnemonics and associate values. Checks the input specification against a known set of mnemonics and rejects unknown mnemonics. Expands an existing set of mnemonics if provided as input. Supports both regular mnemonics and integer controls.

Parameters
[in]keywordRPTSCHED keyword specification.
[in]prevExisting set of mnemonics that will potentially be expanded by the requests in keyword. Pass nullptr if there is no existing set of mnemonics.
[in]parseContextError handling controls.
[in,out]errorsCollection of parse errors encountered thus far. Behaviour controlled by parseContext.

Member Function Documentation

◆ at() [1/2]

unsigned & Opm::RPTConfig::at ( const std::string &  key)
inline

Get read/write access to particular mnemonic value.

Will throw an exception if the mnemonic does not exist in the internal collection. Use predicate contains() to check existence.

Parameters
[in]keyMnemonic string.
Returns
Reference to mutable mnemonic value for key.

◆ at() [2/2]

unsigned Opm::RPTConfig::at ( const std::string &  key) const
inline

Get read-only access to particular mnemonic value.

Will throw an exception if the mnemonic does not exist in the internal collection. Use predicate contains() to check existence.

Parameters
[in]keyMnemonic string.
Returns
Mnemonic value for key.

◆ begin()

auto Opm::RPTConfig::begin ( ) const
inline

Start of internal mnemonic sequence.

To support iteration.

◆ contains()

bool Opm::RPTConfig::contains ( const std::string &  key) const

Mnemonic existence predicate.

Queries the internal, normalised collection, for whether or not a particular mnemonic exists.

Parameters
[in]keyMnemonic string.
Returns
Whether or not key exists in the internal collection.

◆ end()

auto Opm::RPTConfig::end ( ) const
inline

End of internal mnemonic sequence.

To support iteration.

◆ operator==()

bool Opm::RPTConfig::operator== ( const RPTConfig other) const

Equality predicate.

Parameters
[in]otherObject against which
*this
will be tested for equality.
Returns
Whether or not
*this
is the same as other.

◆ serializeOp()

template<class Serializer >
void Opm::RPTConfig::serializeOp ( Serializer serializer)
inline

Convert between byte array and object representation.

Template Parameters
SerializerByte array conversion protocol.
Parameters
[in,out]serializerByte array conversion object.

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