Fesapi  2.0.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
ContinuousProperty.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 "../resqml2/ContinuousProperty.h"
22 #include "../eml2/AbstractHdfProxy.h"
23 
24 #include <stdexcept>
25 #include <sstream>
26 
27 namespace RESQML2_2_NS
28 {
36  class ContinuousProperty final : public RESQML2_NS::ContinuousProperty
37  {
38  public:
39 
45  DLL_IMPORT_OR_EXPORT ContinuousProperty(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : RESQML2_NS::ContinuousProperty(partialObject) {}
46 
69  ContinuousProperty(RESQML2_NS::AbstractRepresentation * rep, const std::string & guid, const std::string & title,
70  unsigned int dimension, gsoap_eml2_3::resqml22__IndexableElement attachmentKind, gsoap_resqml2_0_1::resqml20__ResqmlUom uom, EML2_NS::PropertyKind * propKind);
71 
92  ContinuousProperty(RESQML2_NS::AbstractRepresentation * rep, const std::string & guid, const std::string & title,
93  unsigned int dimension, gsoap_eml2_3::resqml22__IndexableElement attachmentKind, const std::string & nonStandardUom, EML2_NS::PropertyKind * propKind);
94 
100  ContinuousProperty(gsoap_eml2_3::_resqml22__ContinuousProperty* fromGsoap): RESQML2_NS::ContinuousProperty(fromGsoap) {}
101 
103  ~ContinuousProperty() = default;
104 
105  DLL_IMPORT_OR_EXPORT gsoap_resqml2_0_1::resqml20__ResqmlUom getUom() const final;
106 
107  DLL_IMPORT_OR_EXPORT std::string getUomAsString() const final;
108 
109  DLL_IMPORT_OR_EXPORT double getMinimumValue(unsigned int index = 0) const final;
110 
111  DLL_IMPORT_OR_EXPORT double getMaximumValue(unsigned int index = 0) const final;
112 
113  DLL_IMPORT_OR_EXPORT void setMinimumValue(double value, unsigned int index = 0) const final;
114 
115  DLL_IMPORT_OR_EXPORT void setMaximumValue(double value, unsigned int index = 0) const final;
116 
117  bool validatePropertyKindAssociation(EML2_NS::PropertyKind*) final { return true; }
118 
119  bool validatePropertyKindAssociation(gsoap_resqml2_0_1::resqml20__ResqmlPropertyKind) final { return true; }
120 
124  DLL_IMPORT_OR_EXPORT static const char* XML_NS;
125 
129  DLL_IMPORT_OR_EXPORT std::string getXmlNamespace() const final { return XML_NS; }
130 
131  private:
132 
143  void init(RESQML2_NS::AbstractRepresentation * rep, const std::string & guid, const std::string & title,
144  unsigned int dimension, gsoap_eml2_3::resqml22__IndexableElement attachmentKind);
145 
146  size_t getMinimumValueSize() const;
147  size_t getMaximumValueSize() const;
148  };
149 }
Definition: ContinuousProperty.h:37
ContinuousProperty(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition: ContinuousProperty.h:45
gsoap_resqml2_0_1::resqml20__ResqmlUom getUom() const final
ContinuousProperty(resqml2::AbstractRepresentation *rep, const std::string &guid, const std::string &title, unsigned int dimension, gsoap_eml2_3::resqml22__IndexableElement attachmentKind, const std::string &nonStandardUom, eml2::PropertyKind *propKind)
static const char * XML_NS
Definition: ContinuousProperty.h:124
ContinuousProperty(resqml2::AbstractRepresentation *rep, const std::string &guid, const std::string &title, unsigned int dimension, gsoap_eml2_3::resqml22__IndexableElement attachmentKind, gsoap_resqml2_0_1::resqml20__ResqmlUom uom, eml2::PropertyKind *propKind)
std::string getXmlNamespace() const final
Definition: ContinuousProperty.h:129
bool validatePropertyKindAssociation(gsoap_resqml2_0_1::resqml20__ResqmlPropertyKind) final
Definition: ContinuousProperty.h:119
ContinuousProperty(gsoap_eml2_3::_resqml22__ContinuousProperty *fromGsoap)
Definition: ContinuousProperty.h:100