Fesapi  2.0.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
Activity.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 "../eml2/Activity.h"
22 
23 namespace 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 unsigned int getParameterCount() const final;
87 
95  DLL_IMPORT_OR_EXPORT unsigned int getParameterCount(const std::string & paramTitle) const final;
96 
104  DLL_IMPORT_OR_EXPORT const std::string & getParameterTitle(unsigned int index) const final;
105 
113  DLL_IMPORT_OR_EXPORT std::vector<unsigned int> 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(unsigned int 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(unsigned int 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(unsigned int index) const;
168 
176  DLL_IMPORT_OR_EXPORT bool isAnIntegerQuantityParameter(const std::string & paramTitle) const final;
177 
185  DLL_IMPORT_OR_EXPORT bool isAnIntegerQuantityParameter(unsigned int 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(unsigned int 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(unsigned int 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 const std::string & getStringParameterValue(unsigned int 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(unsigned int 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(unsigned int 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 const char* XML_NS;
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
unsigned int getParameterCount() const final
Activity(gsoap_resqml2_0_1::_resqml20__Activity *fromGsoap)
Definition: Activity.h:56
void pushBackParameter(const std::string title, double value, gsoap_resqml2_0_1::resqml20__ResqmlUom uom=gsoap_resqml2_0_1::resqml20__ResqmlUom__Euc)
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, int64_t value) final
void pushBackParameter(const std::string title, const std::string &value) final
void pushBackParameter(const std::string title, AbstractObject *resqmlObject) final
Definition: ActivityTemplate.h:27