Fesapi  2.0.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
DoubleTableLookup.h
1 /*-----------------------------------------------------------------------
2 Licensed to the Apache Software Foundation (ASF) under one
3 or more contributor license agreements. See the NOTICE file
4 distributed with this work for additional information
5 regarding copyright ownership. The ASF licenses this file
6 to you under the Apache License, Version 2.0 (the
7 "License"; you may not use this file except in compliance
8 with the License. You may obtain a copy of the License at
9 
10  http://www.apache.org/licenses/LICENSE-2.0
11 
12 Unless required by applicable law or agreed to in writing,
13 software distributed under the License is distributed on an
14 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 KIND, either express or implied. See the License for the
16 specific language governing permissions and limitations
17 under the License.
18 -----------------------------------------------------------------------*/
19 #pragma once
20 
21 #include "../common/AbstractObject.h"
22 
23 #include <map>
24 
25 namespace RESQML2_NS
26 {
32  class DoubleTableLookup : public COMMON_NS::AbstractObject
33  {
34  public:
35 
41  DLL_IMPORT_OR_EXPORT DoubleTableLookup(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : COMMON_NS::AbstractObject(partialObject) {}
42 
44  virtual ~DoubleTableLookup() = default;
45 
53  DLL_IMPORT_OR_EXPORT virtual bool containsKey(double key) = 0;
54 
60  DLL_IMPORT_OR_EXPORT virtual unsigned int getItemCount() const = 0;
61 
72  DLL_IMPORT_OR_EXPORT virtual double getKeyAtIndex(unsigned int index) const = 0;
73 
84  DLL_IMPORT_OR_EXPORT virtual double getValueAtIndex(unsigned int index) const = 0;
85 
94  DLL_IMPORT_OR_EXPORT virtual double getValueAtKey(double key) = 0;
95 
102  DLL_IMPORT_OR_EXPORT virtual void addValue(double key, double value) = 0;
103 
111  DLL_IMPORT_OR_EXPORT virtual void setValue(double key, double value) = 0;
112 
119  DLL_IMPORT_OR_EXPORT virtual double getMinimumValue() = 0;
120 
127  DLL_IMPORT_OR_EXPORT virtual double getMaximumValue() = 0;
128 
135  DLL_IMPORT_OR_EXPORT virtual std::map<double, double> getMap() const = 0;
136 
138  DLL_IMPORT_OR_EXPORT static const char* XML_TAG;
139 
140  DLL_IMPORT_OR_EXPORT std::string getXmlTag() const final { return XML_TAG; }
141 
142  protected:
143 
145  DoubleTableLookup() {}
146 
152  DoubleTableLookup(gsoap_resqml2_0_1::_resqml20__DoubleTableLookup* fromGsoap) : AbstractObject(fromGsoap) {}
153 
159  DoubleTableLookup(gsoap_eml2_3::_resqml22__DoubleTableLookup* fromGsoap) : AbstractObject(fromGsoap) {}
160 
162  void loadTargetRelationships() final {}
163  };
164 }
Defines a function for table lookups. For example, used for linear interpolation, such as PVT.
Definition: DoubleTableLookup.h:33
virtual void setValue(double key, double value)=0
DoubleTableLookup(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition: DoubleTableLookup.h:41
virtual double getValueAtKey(double key)=0
std::string getXmlTag() const final
Definition: DoubleTableLookup.h:140
virtual void addValue(double key, double value)=0
virtual std::map< double, double > getMap() const =0
virtual ~DoubleTableLookup()=default
virtual double getMaximumValue()=0
virtual bool containsKey(double key)=0
virtual double getMinimumValue()=0
static const char * XML_TAG
Definition: DoubleTableLookup.h:138
virtual double getKeyAtIndex(unsigned int index) const =0
virtual unsigned int getItemCount() const =0
virtual double getValueAtIndex(unsigned int index) const =0