Fesapi  2.0.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
PropertySet.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 "../common/AbstractObject.h"
22 
23 namespace RESQML2_NS
24 {
25  class AbstractProperty;
26 
35  class PropertySet : public COMMON_NS::AbstractObject
36  {
37  public:
38 
44  DLL_IMPORT_OR_EXPORT PropertySet(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : COMMON_NS::AbstractObject(partialObject) {}
45 
47  virtual ~PropertySet() = default;
48 
56  DLL_IMPORT_OR_EXPORT void setParent(PropertySet * parent);
57 
64  virtual COMMON_NS::DataObjectReference getParentDor() const = 0;
65 
71  DLL_IMPORT_OR_EXPORT PropertySet * getParent() const;
72 
79  DLL_IMPORT_OR_EXPORT std::vector<PropertySet *> getChildren() const;
80 
89  DLL_IMPORT_OR_EXPORT unsigned int getChildrenCount() const;
90 
100  DLL_IMPORT_OR_EXPORT PropertySet* getChildren(unsigned int index) const;
101 
109  DLL_IMPORT_OR_EXPORT void pushBackProperty(RESQML2_NS::AbstractProperty * prop);
110 
117  DLL_IMPORT_OR_EXPORT std::vector<RESQML2_NS::AbstractProperty *> getProperties() const;
118 
126  DLL_IMPORT_OR_EXPORT unsigned int getPropertyCount() const;
127 
139  DLL_IMPORT_OR_EXPORT RESQML2_NS::AbstractProperty* getProperty(unsigned int index) const;
140 
150  DLL_IMPORT_OR_EXPORT virtual bool hasMultipleRealizations() const = 0;
151 
161  DLL_IMPORT_OR_EXPORT virtual bool hasSinglePropertyKind() const = 0;
162 
170  DLL_IMPORT_OR_EXPORT virtual gsoap_eml2_3::resqml22__TimeSetKind getTimeSetKind() const = 0;
171 
173  DLL_IMPORT_OR_EXPORT static const char* XML_TAG;
174 
180  DLL_IMPORT_OR_EXPORT virtual std::string getXmlTag() const final { return XML_TAG; }
181 
184 
185  protected:
186 
188  PropertySet() : COMMON_NS::AbstractObject() {}
189 
195  PropertySet(gsoap_resqml2_0_1::_resqml20__PropertySet* fromGsoap) : COMMON_NS::AbstractObject(fromGsoap) {}
196 
202  PropertySet(gsoap_eml2_3::_resqml22__PropertySet* fromGsoap) : COMMON_NS::AbstractObject(fromGsoap) {}
203 
209  virtual void setXmlParent(PropertySet * parent) = 0;
210 
216  virtual void pushBackXmlProperty(RESQML2_NS::AbstractProperty * prop) = 0;
217 
218  virtual std::vector<COMMON_NS::DataObjectReference> getAllPropertiesDors() const = 0;
219  };
220 }
Proxy class for a property set. A property set is a set of properties collected together for a specif...
Definition: PropertySet.h:36
virtual common::DataObjectReference getParentDor() const =0
std::vector< resqml2::AbstractProperty * > getProperties() const
PropertySet * getChildren(unsigned int index) const
virtual std::string getXmlTag() const final
Definition: PropertySet.h:180
virtual bool hasMultipleRealizations() const =0
void setParent(PropertySet *parent)
virtual bool hasSinglePropertyKind() const =0
std::vector< PropertySet * > getChildren() const
void loadTargetRelationships() final
static const char * XML_TAG
Definition: PropertySet.h:173
unsigned int getPropertyCount() const
void pushBackProperty(resqml2::AbstractProperty *prop)
virtual gsoap_eml2_3::resqml22__TimeSetKind getTimeSetKind() const =0
unsigned int getChildrenCount() const
virtual ~PropertySet()=default
resqml2::AbstractProperty * getProperty(unsigned int index) const
PropertySet * getParent() const
PropertySet(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition: PropertySet.h:44