My Project
CategoricalProperty.h
1 /*-----------------------------------------------------------------------
2 Copyright F2I-CONSULTING, (2014-2017)
3 
4 philippe.verney@f2i-consulting.com
5 
6 This software is a computer program whose purpose is to access to data formatted using Energistics standards.
7 
8 This software is governed by the CeCILL-B license under French law and
9 abiding by the rules of distribution of free software. You can use,
10 modify and/ or redistribute the software under the terms of the CeCILL-B
11 license as circulated by CEA, CNRS and INRIA at the following URL
12 "http://www.cecill.info".
13 
14 As a counterpart to the access to the source code and rights to copy,
15 modify and redistribute granted by the license, users are provided only
16 with a limited warranty and the software's author, the holder of the
17 economic rights, and the successive licensors have only limited
18 liability.
19 
20 In this respect, the user's attention is drawn to the risks associated
21 with loading, using, modifying and/or developing or reproducing the
22 software by the user in light of its specific status of free software,
23 that may mean that it is complicated to manipulate, and that also
24 therefore means that it is reserved for developers and experienced
25 professionals having in-depth computer knowledge. Users are therefore
26 encouraged to load and test the software's suitability as regards their
27 requirements in conditions enabling the security of their systems and/or
28 data to be ensured and, more generally, to use and operate it in the
29 same conditions as regards security.
30 
31 The fact that you are presently reading this means that you have had
32 knowledge of the CeCILL-B license and that you accept its terms.
33 -----------------------------------------------------------------------*/
34 #pragma once
35 
36 #include "resqml2/AbstractValuesProperty.h"
37 
38 namespace resqml2_0_1
39 {
40  class DLL_IMPORT_OR_EXPORT CategoricalProperty : public resqml2::AbstractValuesProperty
41  {
42  public:
43 
47  CategoricalProperty(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : resqml2::AbstractValuesProperty(partialObject) {}
48 
49  CategoricalProperty(StringTableLookup* strLookup): stringLookup(strLookup) {}
50 
61  CategoricalProperty(resqml2::AbstractRepresentation * rep, const std::string & guid, const std::string & title,
62  const unsigned int & dimension, const gsoap_resqml2_0_1::resqml2__IndexableElements & attachmentKind,
63  class StringTableLookup* strLookup, const gsoap_resqml2_0_1::resqml2__ResqmlPropertyKind & energisticsPropertyKind);
64 
75  CategoricalProperty(resqml2::AbstractRepresentation * rep, const std::string & guid, const std::string & title,
76  const unsigned int & dimension, const gsoap_resqml2_0_1::resqml2__IndexableElements & attachmentKind,
77  class StringTableLookup* strLookup, resqml2::PropertyKind * localPropKind);
78 
82  CategoricalProperty(gsoap_resqml2_0_1::_resqml2__CategoricalProperty* fromGsoap): AbstractValuesProperty(fromGsoap), stringLookup(nullptr) {}
83 
87  virtual ~CategoricalProperty() {}
88 
89  static const char* XML_TAG;
90  virtual std::string getXmlTag() const {return XML_TAG;}
91 
98  void pushBackLongHdf5Array1dOfValues(long * values, const ULONG64 & valueCount, common::AbstractHdfProxy * proxy, const long & nullValue);
99 
107  void pushBackLongHdf5Array2dOfValues(long * values, const ULONG64 & valueCountInFastestDim, const ULONG64 & valueCountInSlowestDim, common::AbstractHdfProxy * proxy, const long & nullValue);
108 
117  void pushBackLongHdf5Array3dOfValues(long * values, const ULONG64 & valueCountInFastestDim, const ULONG64 & valueCountInMiddleDim, const ULONG64 & valueCountInSlowestDim, common::AbstractHdfProxy * proxy, const long & nullValue);
118 
126  void pushBackLongHdf5ArrayOfValues(long * values, unsigned long long * numValues, const unsigned int & numDimensionsInArray, common::AbstractHdfProxy* proxy, const long & nullValue);
127 
134  void pushBackUShortHdf5Array1dOfValues(unsigned short * values, const ULONG64 & valueCount, common::AbstractHdfProxy * proxy, const long & nullValue);
135 
143  void pushBackUShortHdf5Array2dOfValues(unsigned short * values, const ULONG64 & valueCountInFastestDim, const ULONG64 & valueCountInSlowestDim, common::AbstractHdfProxy * proxy, const long & nullValue);
144 
153  void pushBackUShortHdf5Array3dOfValues(unsigned short * values, const ULONG64 & valueCountInFastestDim, const ULONG64 & valueCountInMiddleDim, const ULONG64 & valueCountInSlowestDim, common::AbstractHdfProxy * proxy, const long & nullValue);
154 
162  void pushBackUShortHdf5ArrayOfValues(unsigned short * values, unsigned long long * numValues, const unsigned int & numDimensionsInArray, common::AbstractHdfProxy* proxy, const unsigned short & nullValue);
163 
164  std::string pushBackRefToExistingDataset(common::AbstractHdfProxy* hdfProxy, const std::string & dataset = "", const long & nullValue = (std::numeric_limits<long>::max)());
165 
169  class StringTableLookup* getStringLookup() {return stringLookup;}
170 
174  std::string getStringLookupUuid() const;
175 
179  bool validatePropertyKindAssociation(resqml2::PropertyKind* pk);
180 
184  bool validatePropertyKindAssociation(const gsoap_resqml2_0_1::resqml2__ResqmlPropertyKind & pk);
185 
186  protected:
187  std::vector<epc::Relationship> getAllEpcRelationships() const;
188  virtual void importRelationshipSetFromEpc(common::EpcDocument* epcDoc);
189 
190  // XML forward relationship
191  class StringTableLookup* stringLookup;
192  };
193 }
194 
virtual ~CategoricalProperty()
Definition: CategoricalProperty.h:87
class StringTableLookup * getStringLookup()
Definition: CategoricalProperty.h:169
Definition: AbstractValuesProperty.h:41
Definition: PropertyKind.h:40
Definition: CategoricalProperty.h:40
virtual std::string getXmlTag() const
Definition: CategoricalProperty.h:90
Definition: StringTableLookup.h:40
Definition: EpcDocument.h:78
Definition: EpcDocument.h:168
Definition: AbstractRepresentation.h:44
Definition: EpcDocument.h:62
CategoricalProperty(gsoap_resqml2_0_1::_resqml2__CategoricalProperty *fromGsoap)
Definition: CategoricalProperty.h:82
Definition: AbstractHdfProxy.h:45
CategoricalProperty(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition: CategoricalProperty.h:47