Fesapi 2.9.0.1
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
49 DLL_IMPORT_OR_EXPORT PropertySet(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : COMMON_NS::AbstractObject(partialObject) {}
50
68 PropertySet(COMMON_NS::DataObjectRepository* repo, const std::string & guid, const std::string & title,
69 bool hasMultipleRealizations, bool hasSinglePropertyKind, gsoap_resqml2_0_1::resqml20__TimeSetKind timeSetKind);
70
76 PropertySet(gsoap_resqml2_0_1::_resqml20__PropertySet* fromGsoap) : COMMON_NS::AbstractObject(fromGsoap) {}
77
79 ~PropertySet() = default;
80
88 DLL_IMPORT_OR_EXPORT void setParent(PropertySet * parent);
89
96 COMMON_NS::DataObjectReference getParentDor() const;
97
103 DLL_IMPORT_OR_EXPORT PropertySet * getParent() const;
104
111 DLL_IMPORT_OR_EXPORT std::vector<PropertySet *> getChildren() const;
112
118 DLL_IMPORT_OR_EXPORT uint64_t getChildrenCount() const noexcept {
119 return getChildren().size();
120 }
121
131 DLL_IMPORT_OR_EXPORT PropertySet* getChildren(uint64_t index) const;
132
140 DLL_IMPORT_OR_EXPORT void pushBackProperty(RESQML2_NS::AbstractProperty * prop);
141
148 DLL_IMPORT_OR_EXPORT std::vector<RESQML2_NS::AbstractProperty *> getProperties() const;
149
157 DLL_IMPORT_OR_EXPORT uint64_t getPropertyCount() const noexcept;
158
170 DLL_IMPORT_OR_EXPORT RESQML2_NS::AbstractProperty* getProperty(uint64_t index) const;
171
172 DLL_IMPORT_OR_EXPORT bool hasMultipleRealizations() const;
173
174 DLL_IMPORT_OR_EXPORT bool hasSinglePropertyKind() const;
175
176 DLL_IMPORT_OR_EXPORT gsoap_resqml2_0_1::resqml20__TimeSetKind getTimeSetKind() const;
177
181 DLL_IMPORT_OR_EXPORT static constexpr char const* XML_NS = "resqml20";
182
186 DLL_IMPORT_OR_EXPORT std::string getXmlNamespace() const final { return XML_NS; }
187
189 DLL_IMPORT_OR_EXPORT static constexpr char const* XML_TAG = "PropertySet";
190
196 DLL_IMPORT_OR_EXPORT virtual std::string getXmlTag() const final { return XML_TAG; }
197
200
201 private:
202
208 void setXmlParent(PropertySet * parent);
209
215 void pushBackXmlProperty(RESQML2_NS::AbstractProperty * prop);
216
217 std::vector<COMMON_NS::DataObjectReference> getAllPropertiesDors() const;
218 };
219}
Proxy class for a property set. A property set is a set of properties collected together for a specif...
Definition PropertySet.h:39
void pushBackProperty(resqml2 ::AbstractProperty *prop)
void setParent(PropertySet *parent)
PropertySet(gsoap_resqml2_0_1::_resqml20__PropertySet *fromGsoap)
Definition PropertySet.h:76
void loadTargetRelationships() final
common::DataObjectReference getParentDor() const
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.
uint64_t getPropertyCount() const noexcept
PropertySet * getParent() const
std::vector< resqml2 ::AbstractProperty * > getProperties() const
PropertySet(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition PropertySet.h:49
PropertySet * getChildren(uint64_t index) const
virtual std::string getXmlTag() const final
Definition PropertySet.h:196
std::vector< PropertySet * > getChildren() const
uint64_t getChildrenCount() const noexcept
Definition PropertySet.h:118