Fesapi 2.9.0.1
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
resqml2::DoubleTableLookup Class Referenceabstract

Defines a function for table lookups. For example, used for linear interpolation, such as PVT. More...

#include <DoubleTableLookup.h>

Inheritance diagram for resqml2::DoubleTableLookup:

Public Member Functions

 DoubleTableLookup (gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
 
virtual ~DoubleTableLookup ()=default
 
virtual bool containsKey (double key)=0
 
virtual unsigned int getItemCount () const =0
 
virtual double getKeyAtIndex (unsigned int index) const =0
 
virtual double getValueAtIndex (unsigned int index) const =0
 
virtual double getValueAtKey (double key)=0
 
virtual void addValue (double key, double value)=0
 
virtual void setValue (double key, double value)=0
 
virtual double getMinimumValue ()=0
 
virtual double getMaximumValue ()=0
 
virtual std::map< double, double > getMap () const =0
 
std::string getXmlTag () const final
 

Static Public Attributes

static constexpr char const * XML_TAG = "DoubleTableLookup"
 

Detailed Description

Defines a function for table lookups. For example, used for linear interpolation, such as PVT.

        Used for categorical properties, which also may use a double table lookup.

Constructor & Destructor Documentation

◆ DoubleTableLookup()

resqml2::DoubleTableLookup::DoubleTableLookup ( gsoap_resqml2_0_1::eml20__DataObjectReference * partialObject)
inline

Only to be used in partial transfer context.

Parameters
[in]partialObjectIf non-nullptr, the partial object.

◆ ~DoubleTableLookup()

virtual resqml2::DoubleTableLookup::~DoubleTableLookup ( )
virtualdefault

Destructor does nothing since the memory is managed by the gSOAP context.

Member Function Documentation

◆ addValue()

virtual void resqml2::DoubleTableLookup::addValue ( double key,
double value )
pure virtual

Adds a key/value pair to this double table lookup. No verification that the key already exists is done.

Parameters
keyA key.
valueTeh associated value.

◆ containsKey()

virtual bool resqml2::DoubleTableLookup::containsKey ( double key)
pure virtual

Checks whether a key is contained within this double table lookup.

Parameters
keyA key.
Returns
True if key is a key of this double table lookup, false if not.

◆ getItemCount()

virtual unsigned int resqml2::DoubleTableLookup::getItemCount ( ) const
pure virtual

Gets the count of items in the double table lookup (in its map).

Returns
The count of items.

◆ getKeyAtIndex()

virtual double resqml2::DoubleTableLookup::getKeyAtIndex ( unsigned int index) const
pure virtual

Gets the key of a key/value pair at a particular index of this double table lookup (in its map).

Exceptions
std::out_of_rangeIf index >= getItemCount().
Parameters
indexZero-based index of the key/value pair.
Returns
The key of the key/value pair at position index.

◆ getMap()

virtual std::map< double, double > resqml2::DoubleTableLookup::getMap ( ) const
pure virtual

Build and return a key/value map of this double table lookup. You cannot use this map to set a value since it is built at each call.

Returns
The key/value map.

◆ getMaximumValue()

virtual double resqml2::DoubleTableLookup::getMaximumValue ( )
pure virtual

Gets the maximum key in this double table lookup. It reads it from file.

Returns
The maximum key if some key/value pairs exists in this double table lookup, otherwise the double lowest value.

◆ getMinimumValue()

virtual double resqml2::DoubleTableLookup::getMinimumValue ( )
pure virtual

Gets the minimum key in this double table lookup. It reads it from file.

Returns
The minimum key if some key/value pairs exists in this double table lookup, otherwise the double maximum value.

◆ getValueAtIndex()

virtual double resqml2::DoubleTableLookup::getValueAtIndex ( unsigned int index) const
pure virtual

Gets the value of a key/value pair at a particular index of this double table lookup (in its map).

Exceptions
std::out_of_rangeIf index >= getItemCount().
Parameters
indexZero-based index of the key/value pair.
Returns
The value of the key/value pair at position index.

◆ getValueAtKey()

virtual double resqml2::DoubleTableLookup::getValueAtKey ( double key)
pure virtual

Gets a value from its associated key.

Parameters
longValueA key.
Returns
The value corresponding to the key longValue if it exists, NaN if not.

◆ setValue()

virtual void resqml2::DoubleTableLookup::setValue ( double key,
double value )
pure virtual

Modifies the value associated to a key. If the key does not exist, nothing is done.

Parameters
keyA key.
valueTeh associated value.

Member Data Documentation

◆ XML_TAG

constexpr char const* resqml2::DoubleTableLookup::XML_TAG = "DoubleTableLookup"
staticconstexpr

The standard XML tag without XML namespace for serializing this data object.


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