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
Activity.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 "../eml2/Activity.h"
22
23namespace RESQML2_0_1_NS
24{
26 class Activity final : public EML2_NS::Activity
27 {
28 public:
29
37 DLL_IMPORT_OR_EXPORT Activity(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : EML2_NS::Activity(partialObject) {}
38
49 Activity(EML2_NS::ActivityTemplate* activityTemplate, const std::string & guid, const std::string & title);
50
56 Activity(gsoap_resqml2_0_1::_resqml20__Activity* fromGsoap) : EML2_NS::Activity(fromGsoap) {}
57
59 ~Activity() = default;
60
69 DLL_IMPORT_OR_EXPORT void pushBackParameter(const std::string& title,
70 double value, gsoap_resqml2_0_1::resqml20__ResqmlUom uom = gsoap_resqml2_0_1::resqml20__ResqmlUom::Euc);
71
72 DLL_IMPORT_OR_EXPORT void pushBackParameter(const std::string& title,
73 const std::string & value) final;
74
75 DLL_IMPORT_OR_EXPORT void pushBackParameter(const std::string& title,
76 int64_t value) final;
77
78 DLL_IMPORT_OR_EXPORT void pushBackParameter(const std::string& title,
79 AbstractObject* resqmlObject) final;
80
86 DLL_IMPORT_OR_EXPORT uint64_t getParameterCount() const final;
87
95 DLL_IMPORT_OR_EXPORT uint64_t getParameterCount(const std::string & paramTitle) const final;
96
104 DLL_IMPORT_OR_EXPORT std::string getParameterTitle(uint64_t index) const final;
105
113 DLL_IMPORT_OR_EXPORT std::vector<uint64_t> getParameterIndexOfTitle(const std::string & paramTitle) const final;
114
122 DLL_IMPORT_OR_EXPORT bool isAFloatingPointQuantityParameter(const std::string & paramTitle) const final;
123
131 DLL_IMPORT_OR_EXPORT bool isAFloatingPointQuantityParameter(uint64_t index) const final;
132
140 DLL_IMPORT_OR_EXPORT std::vector<double> getFloatingPointQuantityParameterValue(const std::string & paramTitle) const final;
141
149 DLL_IMPORT_OR_EXPORT double getFloatingPointQuantityParameterValue(uint64_t index) const final;
150
158 DLL_IMPORT_OR_EXPORT std::vector<gsoap_resqml2_0_1::resqml20__ResqmlUom> getFloatingPointQuantityParameterUom(const std::string & paramTitle) const;
159
167 DLL_IMPORT_OR_EXPORT gsoap_resqml2_0_1::resqml20__ResqmlUom getFloatingPointQuantityParameterUom(uint64_t index) const;
168
176 DLL_IMPORT_OR_EXPORT bool isAnIntegerQuantityParameter(const std::string & paramTitle) const final;
177
185 DLL_IMPORT_OR_EXPORT bool isAnIntegerQuantityParameter(uint64_t index) const final;
186
194 DLL_IMPORT_OR_EXPORT std::vector<int64_t> getIntegerQuantityParameterValue(const std::string & paramTitle) const final;
195
203 DLL_IMPORT_OR_EXPORT int64_t getIntegerQuantityParameterValue(uint64_t index) const final;
204
212 DLL_IMPORT_OR_EXPORT bool isAStringParameter(const std::string & paramTitle) const final;
213
221 DLL_IMPORT_OR_EXPORT bool isAStringParameter(uint64_t index) const final;
222
230 DLL_IMPORT_OR_EXPORT std::vector<std::string> getStringParameterValue(const std::string & paramTitle) const final;
231
239 DLL_IMPORT_OR_EXPORT std::string getStringParameterValue(uint64_t index) const final;
240
248 DLL_IMPORT_OR_EXPORT bool isAResqmlObjectParameter(const std::string & paramTitle) const final;
249
257 DLL_IMPORT_OR_EXPORT bool isAResqmlObjectParameter(uint64_t index) const final;
258
266 DLL_IMPORT_OR_EXPORT std::vector<AbstractObject*> getResqmlObjectParameterValue(const std::string & paramTitle) const final;
267
275 DLL_IMPORT_OR_EXPORT AbstractObject* getResqmlObjectParameterValue(uint64_t index) const final;
276
282 DLL_IMPORT_OR_EXPORT void setActivityTemplate(EML2_NS::ActivityTemplate* activityTemplate) final;
283
289 COMMON_NS::DataObjectReference getActivityTemplateDor() const final;
290
296 DLL_IMPORT_OR_EXPORT std::string getXmlNamespaceVersion() const final;
297
301 DLL_IMPORT_OR_EXPORT static constexpr char const* XML_NS = "resqml20";
302
306 DLL_IMPORT_OR_EXPORT std::string getXmlNamespace() const final { return XML_NS; }
307
309
310 private:
311
313 Activity() : EML2_NS::Activity() {}
314
322 std::vector<gsoap_resqml2_0_1::resqml20__AbstractActivityParameter*> getParameterFromTitle(const std::string & paramTitle) const;
323 };
324}
Definition Activity.h:27
Activity(gsoap_resqml2_0_1::_resqml20__Activity *fromGsoap)
Definition Activity.h:56
Activity(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition Activity.h:37
Activity(eml2::ActivityTemplate *activityTemplate, const std::string &guid, const std::string &title)
Creates an instance of this class in a gsoap context.
void pushBackParameter(const std::string &title, AbstractObject *resqmlObject) final
void pushBackParameter(const std::string &title, double value, gsoap_resqml2_0_1::resqml20__ResqmlUom uom=gsoap_resqml2_0_1::resqml20__ResqmlUom::Euc)
void pushBackParameter(const std::string &title, const std::string &value) final
uint64_t getParameterCount() const final
void pushBackParameter(const std::string &title, int64_t value) final
void loadTargetRelationships() final
Definition ActivityTemplate.h:27