Fesapi  2.0.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
CommentProperty.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 "AbstractValuesProperty.h"
22 
23 #include <limits>
24 
25 namespace RESQML2_NS
26 {
33  {
34  public:
35 
37  virtual ~CommentProperty() = default;
38 
42  std::string pushBackRefToExistingIntegerDataset(EML2_NS::AbstractHdfProxy*, const std::string&, int64_t) final {
43  throw std::logic_error("You cannot push back integer values in a Continuous Property.");
44  }
45 
55  DLL_IMPORT_OR_EXPORT void pushBackStringHdf5ArrayOfValues(const std::vector<std::string> & values, EML2_NS::AbstractHdfProxy* proxy);
56 
73  DLL_IMPORT_OR_EXPORT virtual std::string pushBackRefToExistingDataset(EML2_NS::AbstractHdfProxy* hdfProxy, const std::string & datasetName = "") = 0;
74 
84  DLL_IMPORT_OR_EXPORT std::vector<std::string> getStringValuesOfPatch(unsigned int patchIndex);
85 
87  DLL_IMPORT_OR_EXPORT static const char* XML_TAG;
88 
89  DLL_IMPORT_OR_EXPORT virtual std::string getXmlTag() const final { return XML_TAG; }
90 
91  protected:
92 
98  DLL_IMPORT_OR_EXPORT CommentProperty(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : AbstractValuesProperty(partialObject) {}
99 
100  CommentProperty() {}
101 
107  CommentProperty(gsoap_resqml2_0_1::_resqml20__CommentProperty* fromGsoap) : AbstractValuesProperty(fromGsoap) {}
108 
114  CommentProperty(gsoap_eml2_3::_resqml22__CommentProperty* fromGsoap) : AbstractValuesProperty(fromGsoap) {}
115 
116  virtual EML2_NS::AbstractHdfProxy* getValuesHdfProxyAndDatasetPathOfPatch(unsigned int patchIndex, std::string & datasetPath) const = 0;
117  };
118 }
Proxy class for an abstract values property.
Definition: AbstractValuesProperty.h:28
Proxy class for a comment property. It is used to capture comments or annotations associated with a g...
Definition: CommentProperty.h:33
virtual std::string getXmlTag() const final
Definition: CommentProperty.h:89
virtual ~CommentProperty()=default
void pushBackStringHdf5ArrayOfValues(const std::vector< std::string > &values, eml2::AbstractHdfProxy *proxy)
static const char * XML_TAG
Definition: CommentProperty.h:87
std::string pushBackRefToExistingIntegerDataset(eml2::AbstractHdfProxy *, const std::string &, int64_t) final
Definition: CommentProperty.h:42
virtual std::string pushBackRefToExistingDataset(eml2::AbstractHdfProxy *hdfProxy, const std::string &datasetName="")=0
std::vector< std::string > getStringValuesOfPatch(unsigned int patchIndex)