Fesapi 2.10.1.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
Loading...
Searching...
No Matches
PropertySet.h
1/*-----------------------------------------------------------------------
2Licensed to the Apache Software Foundation (ASF) under one
3or more contributor license agreements. See the NOTICE file
4distributed with this work for additional information
5regarding copyright ownership. The ASF licenses this file
6to you under the Apache License, Version 2.0 (the
7"License"; you may not use this file except in compliance
8with the License. You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12Unless required by applicable law or agreed to in writing,
13software distributed under the License is distributed on an
14"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15KIND, either express or implied. See the License for the
16specific language governing permissions and limitations
17under the License.
18-----------------------------------------------------------------------*/
19#pragma once
20
21#include "../common/AbstractObject.h"
22
23namespace RESQML2_NS
24{
25 class AbstractProperty;
26}
27
28namespace RESQML2_0_1_NS
29{
38 class PropertySet final : public COMMON_NS::AbstractObject
39 {
40 public:
41
47 DLL_IMPORT_OR_EXPORT PropertySet(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : COMMON_NS::AbstractObject(partialObject) {}
48
66 PropertySet(COMMON_NS::DataObjectRepository* repo, const std::string & guid, const std::string & title,
67 bool hasMultipleRealizations, bool hasSinglePropertyKind, gsoap_resqml2_0_1::resqml20__TimeSetKind timeSetKind);
68
74 PropertySet(gsoap_resqml2_0_1::_resqml20__PropertySet* fromGsoap) : COMMON_NS::AbstractObject(fromGsoap) {}
75
77 ~PropertySet() = default;
78
86 DLL_IMPORT_OR_EXPORT void setParent(PropertySet * parent);
87
94 COMMON_NS::DataObjectReference getParentDor() const;
95
101 DLL_IMPORT_OR_EXPORT PropertySet * getParent() const;
102
109 DLL_IMPORT_OR_EXPORT std::vector<PropertySet *> getChildren() const;
110
116 DLL_IMPORT_OR_EXPORT uint64_t getChildrenCount() const noexcept {
117 return getChildren().size();
118 }
119
129 DLL_IMPORT_OR_EXPORT PropertySet* getChildren(uint64_t index) const;
130
138 DLL_IMPORT_OR_EXPORT void pushBackProperty(RESQML2_NS::AbstractProperty * prop);
139
146 DLL_IMPORT_OR_EXPORT std::vector<RESQML2_NS::AbstractProperty *> getProperties() const;
147
155 DLL_IMPORT_OR_EXPORT uint64_t getPropertyCount() const noexcept;
156
168 DLL_IMPORT_OR_EXPORT RESQML2_NS::AbstractProperty* getProperty(uint64_t index) const;
169
170 DLL_IMPORT_OR_EXPORT bool hasMultipleRealizations() const;
171
172 DLL_IMPORT_OR_EXPORT bool hasSinglePropertyKind() const;
173
174 DLL_IMPORT_OR_EXPORT gsoap_resqml2_0_1::resqml20__TimeSetKind getTimeSetKind() const;
175
179 DLL_IMPORT_OR_EXPORT static constexpr char const* XML_NS = "resqml20";
180
184 DLL_IMPORT_OR_EXPORT std::string getXmlNamespace() const final { return XML_NS; }
185
187 DLL_IMPORT_OR_EXPORT static constexpr char const* XML_TAG = "PropertySet";
188
194 DLL_IMPORT_OR_EXPORT virtual std::string getXmlTag() const final { return XML_TAG; }
195
198
200 static constexpr char const* FAKE_PROP_UUID = "6b6656bb-32c4-4c4a-84ec-f66cf50bd4dd";
201
202 private:
203
209 void setXmlParent(PropertySet * parent);
210
216 void pushBackXmlProperty(RESQML2_NS::AbstractProperty * prop);
217
218 std::vector<COMMON_NS::DataObjectReference> getAllPropertiesDors() const;
219 };
220}
Proxy class for a property set. A property set is a set of properties collected together for a specif...
Definition PropertySet.h:39
PropertySet(common::DataObjectRepository *repo, const std::string &guid, const std::string &title, bool hasMultipleRealizations, bool hasSinglePropertyKind, gsoap_resqml2_0_1::resqml20__TimeSetKind timeSetKind)
Creates an instance of this class in a gsoap context.
void pushBackProperty(resqml2::AbstractProperty *prop)
void setParent(PropertySet *parent)
std::vector< resqml2::AbstractProperty * > getProperties() const
PropertySet(gsoap_resqml2_0_1::_resqml20__PropertySet *fromGsoap)
Definition PropertySet.h:74
void loadTargetRelationships() final
common::DataObjectReference getParentDor() const
uint64_t getPropertyCount() const noexcept
PropertySet * getParent() const
PropertySet(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition PropertySet.h:47
PropertySet * getChildren(uint64_t index) const
virtual std::string getXmlTag() const final
Definition PropertySet.h:194
std::vector< PropertySet * > getChildren() const
uint64_t getChildrenCount() const noexcept
Definition PropertySet.h:116