Fesapi  0.13.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
CategoricalProperty.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/AbstractValuesProperty.h"
22 
23 namespace RESQML2_0_1_NS
24 {
25  class DLL_IMPORT_OR_EXPORT CategoricalProperty : public RESQML2_NS::AbstractValuesProperty
26  {
27  public:
28 
32  CategoricalProperty(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : RESQML2_NS::AbstractValuesProperty(partialObject) {}
33 
34  CategoricalProperty(StringTableLookup* strLookup): stringLookup(strLookup) {}
35 
46  CategoricalProperty(RESQML2_NS::AbstractRepresentation * rep, const std::string & guid, const std::string & title,
47  const unsigned int & dimension, const gsoap_resqml2_0_1::resqml2__IndexableElements & attachmentKind,
48  class StringTableLookup* strLookup, const gsoap_resqml2_0_1::resqml2__ResqmlPropertyKind & energisticsPropertyKind);
49 
60  CategoricalProperty(RESQML2_NS::AbstractRepresentation * rep, const std::string & guid, const std::string & title,
61  const unsigned int & dimension, const gsoap_resqml2_0_1::resqml2__IndexableElements & attachmentKind,
62  class StringTableLookup* strLookup, RESQML2_NS::PropertyKind * localPropKind);
63 
67  CategoricalProperty(gsoap_resqml2_0_1::_resqml2__CategoricalProperty* fromGsoap): AbstractValuesProperty(fromGsoap), stringLookup(nullptr) {}
68 
72  virtual ~CategoricalProperty() {}
73 
74  static const char* XML_TAG;
75  virtual std::string getXmlTag() const {return XML_TAG;}
76 
83  void pushBackLongHdf5Array1dOfValues(long * values, const ULONG64 & valueCount, COMMON_NS::AbstractHdfProxy * proxy, const long & nullValue);
84 
92  void pushBackLongHdf5Array2dOfValues(long * values, const ULONG64 & valueCountInFastestDim, const ULONG64 & valueCountInSlowestDim, COMMON_NS::AbstractHdfProxy * proxy, const long & nullValue);
93 
102  void pushBackLongHdf5Array3dOfValues(long * values, const ULONG64 & valueCountInFastestDim, const ULONG64 & valueCountInMiddleDim, const ULONG64 & valueCountInSlowestDim, COMMON_NS::AbstractHdfProxy * proxy, const long & nullValue);
103 
111  void pushBackLongHdf5ArrayOfValues(long * values, unsigned long long * numValues, const unsigned int & numDimensionsInArray, COMMON_NS::AbstractHdfProxy* proxy, const long & nullValue);
112 
119  void pushBackUShortHdf5Array1dOfValues(unsigned short * values, const ULONG64 & valueCount, COMMON_NS::AbstractHdfProxy * proxy, const long & nullValue);
120 
128  void pushBackUShortHdf5Array2dOfValues(unsigned short * values, const ULONG64 & valueCountInFastestDim, const ULONG64 & valueCountInSlowestDim, COMMON_NS::AbstractHdfProxy * proxy, const long & nullValue);
129 
138  void pushBackUShortHdf5Array3dOfValues(unsigned short * values, const ULONG64 & valueCountInFastestDim, const ULONG64 & valueCountInMiddleDim, const ULONG64 & valueCountInSlowestDim, COMMON_NS::AbstractHdfProxy * proxy, const long & nullValue);
139 
147  void pushBackUShortHdf5ArrayOfValues(unsigned short * values, unsigned long long * numValues, const unsigned int & numDimensionsInArray, COMMON_NS::AbstractHdfProxy* proxy, const unsigned short & nullValue);
148 
149  std::string pushBackRefToExistingDataset(COMMON_NS::AbstractHdfProxy* hdfProxy, const std::string & dataset = "", const long & nullValue = (std::numeric_limits<long>::max)());
150 
154  class StringTableLookup* getStringLookup() {return stringLookup;}
155 
159  std::string getStringLookupUuid() const;
160 
164  bool validatePropertyKindAssociation(RESQML2_NS::PropertyKind* pk);
165 
169  bool validatePropertyKindAssociation(const gsoap_resqml2_0_1::resqml2__ResqmlPropertyKind & pk);
170 
171  protected:
172  std::vector<epc::Relationship> getAllEpcRelationships() const;
173  virtual void importRelationshipSetFromEpc(COMMON_NS::EpcDocument* epcDoc);
174 
175  // XML forward relationship
176  class StringTableLookup* stringLookup;
177  };
178 }
179 
180 
class StringTableLookup * getStringLookup()
Definition: CategoricalProperty.h:154
CategoricalProperty(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition: CategoricalProperty.h:32
virtual ~CategoricalProperty()
Definition: CategoricalProperty.h:72
Definition: AbstractRepresentation.h:31
CategoricalProperty(gsoap_resqml2_0_1::_resqml2__CategoricalProperty *fromGsoap)
Definition: CategoricalProperty.h:67
Definition: EpcDocument.h:65
Definition: CategoricalProperty.h:25
Definition: EpcDocument.h:154
Definition: StringTableLookup.h:25
Definition: AbstractHdfProxy.h:30
Definition: PropertyKind.h:25
virtual std::string getXmlTag() const
Definition: CategoricalProperty.h:75
Definition: AbstractValuesProperty.h:26
Definition: EpcDocument.h:49