Fesapi  2.0.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
DiscreteProperty.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/DiscreteProperty.h"
22 
23 namespace RESQML2_2_NS
24 {
30  class DiscreteProperty final : public RESQML2_NS::DiscreteProperty
31  {
32  public:
33 
39  DLL_IMPORT_OR_EXPORT DiscreteProperty(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : RESQML2_NS::DiscreteProperty(partialObject) {}
40 
58  DiscreteProperty(RESQML2_NS::AbstractRepresentation* rep, const std::string& guid, const std::string& title,
59  unsigned int dimension, gsoap_eml2_3::resqml22__IndexableElement attachmentKind, EML2_NS::PropertyKind* propKind);
60 
66  DiscreteProperty(gsoap_eml2_3::_resqml22__DiscreteProperty* fromGsoap): RESQML2_NS::DiscreteProperty(fromGsoap) {}
67 
69  ~DiscreteProperty() = default;
70 
71  DLL_IMPORT_OR_EXPORT std::string pushBackRefToExistingIntegerDataset(EML2_NS::AbstractHdfProxy* proxy, const std::string & datasetName, int64_t nullValue, int64_t minimumValue, int64_t maximumValue) final;
72  using AbstractValuesProperty::pushBackRefToExistingIntegerDataset;
73 
74  DLL_IMPORT_OR_EXPORT int64_t getNullValue(unsigned int patchIndex = (std::numeric_limits<unsigned int>::max)()) const final;
75 
76  DLL_IMPORT_OR_EXPORT bool hasMinimumValue(unsigned int index = 0) const final;
77 
78  DLL_IMPORT_OR_EXPORT int64_t getMinimumValue(unsigned int index = 0) const final;
79 
80  DLL_IMPORT_OR_EXPORT bool hasMaximumValue(unsigned int index = 0) const final;
81 
82  DLL_IMPORT_OR_EXPORT int64_t getMaximumValue(unsigned int index = 0) const final;
83 
84  DLL_IMPORT_OR_EXPORT void setMinimumValue(int64_t value, unsigned int index = 0) const final;
85 
86  DLL_IMPORT_OR_EXPORT void setMaximumValue(int64_t value, unsigned int index = 0) const final;
87 
88  bool validatePropertyKindAssociation(EML2_NS::PropertyKind*) final { return true; }
89 
90  bool validatePropertyKindAssociation(gsoap_resqml2_0_1::resqml20__ResqmlPropertyKind) final { return true; }
91 
95  DLL_IMPORT_OR_EXPORT static const char* XML_NS;
96 
100  DLL_IMPORT_OR_EXPORT std::string getXmlNamespace() const final { return XML_NS; }
101 
102  private:
103 
104  size_t getMinimumValueSize() const;
105  size_t getMaximumValueSize() const;
106  };
107 }
Definition: DiscreteProperty.h:31
DiscreteProperty(gsoap_eml2_3::_resqml22__DiscreteProperty *fromGsoap)
Definition: DiscreteProperty.h:66
DiscreteProperty(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition: DiscreteProperty.h:39
std::string pushBackRefToExistingIntegerDataset(eml2::AbstractHdfProxy *proxy, const std::string &datasetName, int64_t nullValue, int64_t minimumValue, int64_t maximumValue) final
DiscreteProperty(resqml2::AbstractRepresentation *rep, const std::string &guid, const std::string &title, unsigned int dimension, gsoap_eml2_3::resqml22__IndexableElement attachmentKind, eml2::PropertyKind *propKind)
int64_t getNullValue(unsigned int patchIndex=(std::numeric_limits< unsigned int >::max)()) const final
Gets the null value in this discrete property.
bool validatePropertyKindAssociation(gsoap_resqml2_0_1::resqml20__ResqmlPropertyKind) final
Definition: DiscreteProperty.h:90
std::string getXmlNamespace() const final
Definition: DiscreteProperty.h:100
static const char * XML_NS
Definition: DiscreteProperty.h:95