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 "../common/AbstractObject.h"
22 
23 namespace EML2_NS
24 {
25  class ActivityTemplate;
26 
28  class Activity : public COMMON_NS::AbstractObject
29  {
30  protected:
32  Activity() : COMMON_NS::AbstractObject() {}
33 
39  Activity(gsoap_resqml2_0_1::_resqml20__Activity* fromGsoap) : COMMON_NS::AbstractObject(fromGsoap) {}
40 
46  Activity(gsoap_eml2_3::_eml23__Activity* fromGsoap) : COMMON_NS::AbstractObject(fromGsoap) {}
47 
48  public:
49 
55  DLL_IMPORT_OR_EXPORT Activity(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : COMMON_NS::AbstractObject(partialObject) {}
56 
58  virtual ~Activity() = default;
59 
74  DLL_IMPORT_OR_EXPORT virtual void pushBackParameter(const std::string title,
75  const std::string & value) = 0;
76 
91  DLL_IMPORT_OR_EXPORT virtual void pushBackParameter(const std::string title,
92  int64_t value) = 0;
93 
110  virtual void pushBackParameter(const std::string title,
111  AbstractObject* resqmlObject) = 0;
112 
118  DLL_IMPORT_OR_EXPORT virtual unsigned int getParameterCount() const = 0;
119 
127  DLL_IMPORT_OR_EXPORT virtual unsigned int getParameterCount(const std::string & paramTitle) const = 0;
128 
138  DLL_IMPORT_OR_EXPORT virtual const std::string & getParameterTitle(unsigned int index) const = 0;
139 
147  DLL_IMPORT_OR_EXPORT virtual std::vector<unsigned int> getParameterIndexOfTitle(const std::string & paramTitle) const = 0;
148 
160  DLL_IMPORT_OR_EXPORT virtual bool isAFloatingPointQuantityParameter(const std::string & paramTitle) const = 0;
161 
172  DLL_IMPORT_OR_EXPORT virtual bool isAFloatingPointQuantityParameter(unsigned int index) const = 0;
173 
186  DLL_IMPORT_OR_EXPORT virtual std::vector<double> getFloatingPointQuantityParameterValue(const std::string & paramTitle) const = 0;
187 
200  DLL_IMPORT_OR_EXPORT virtual double getFloatingPointQuantityParameterValue(unsigned int index) const = 0;
201 
213  DLL_IMPORT_OR_EXPORT virtual bool isAnIntegerQuantityParameter(const std::string & paramTitle) const = 0;
214 
225  DLL_IMPORT_OR_EXPORT virtual bool isAnIntegerQuantityParameter(unsigned int index) const = 0;
226 
239  DLL_IMPORT_OR_EXPORT virtual std::vector<int64_t> getIntegerQuantityParameterValue(const std::string & paramTitle) const = 0;
240 
253  DLL_IMPORT_OR_EXPORT virtual int64_t getIntegerQuantityParameterValue(unsigned int index) const = 0;
254 
265  DLL_IMPORT_OR_EXPORT virtual bool isAStringParameter(const std::string & paramTitle) const = 0;
266 
277  DLL_IMPORT_OR_EXPORT virtual bool isAStringParameter(unsigned int index) const = 0;
278 
291  DLL_IMPORT_OR_EXPORT virtual std::vector<std::string> getStringParameterValue(const std::string & paramTitle) const = 0;
292 
304  DLL_IMPORT_OR_EXPORT virtual const std::string & getStringParameterValue(unsigned int index) const = 0;
305 
316  DLL_IMPORT_OR_EXPORT virtual bool isAResqmlObjectParameter(const std::string & paramTitle) const = 0;
317 
328  DLL_IMPORT_OR_EXPORT virtual bool isAResqmlObjectParameter(unsigned int index) const = 0;
329 
342  DLL_IMPORT_OR_EXPORT virtual std::vector<AbstractObject*> getResqmlObjectParameterValue(const std::string & paramTitle) const = 0;
343 
356  DLL_IMPORT_OR_EXPORT virtual AbstractObject* getResqmlObjectParameterValue(unsigned int index) const = 0;
357 
363  DLL_IMPORT_OR_EXPORT virtual void setActivityTemplate(ActivityTemplate* activityTemplate) = 0;
364 
370  virtual COMMON_NS::DataObjectReference getActivityTemplateDor() const = 0;
371 
377  DLL_IMPORT_OR_EXPORT ActivityTemplate* getActivityTemplate() const;
378 
386  DLL_IMPORT_OR_EXPORT std::vector<AbstractObject*> getResqmlObjectSet() const;
387 
389  DLL_IMPORT_OR_EXPORT static const char* XML_TAG;
390 
391  DLL_IMPORT_OR_EXPORT virtual std::string getXmlTag() const final { return XML_TAG; }
392 
393  protected:
395  void loadTargetRelationships();
396  };
397 }
Instance of a given activity.
Definition: Activity.h:29
virtual std::vector< int64_t > getIntegerQuantityParameterValue(const std::string &paramTitle) const =0
virtual void pushBackParameter(const std::string title, int64_t value)=0
static const char * XML_TAG
Definition: Activity.h:389
std::vector< AbstractObject * > getResqmlObjectSet() const
virtual bool isAnIntegerQuantityParameter(const std::string &paramTitle) const =0
virtual unsigned int getParameterCount(const std::string &paramTitle) const =0
virtual AbstractObject * getResqmlObjectParameterValue(unsigned int index) const =0
virtual bool isAResqmlObjectParameter(unsigned int index) const =0
virtual bool isAStringParameter(unsigned int index) const =0
virtual std::vector< std::string > getStringParameterValue(const std::string &paramTitle) const =0
virtual double getFloatingPointQuantityParameterValue(unsigned int index) const =0
virtual bool isAResqmlObjectParameter(const std::string &paramTitle) const =0
ActivityTemplate * getActivityTemplate() const
virtual ~Activity()=default
virtual const std::string & getParameterTitle(unsigned int index) const =0
virtual std::vector< AbstractObject * > getResqmlObjectParameterValue(const std::string &paramTitle) const =0
Activity(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition: Activity.h:55
virtual bool isAFloatingPointQuantityParameter(const std::string &paramTitle) const =0
virtual unsigned int getParameterCount() const =0
virtual std::string getXmlTag() const final
Definition: Activity.h:391
virtual std::vector< double > getFloatingPointQuantityParameterValue(const std::string &paramTitle) const =0
virtual void setActivityTemplate(ActivityTemplate *activityTemplate)=0
virtual common::DataObjectReference getActivityTemplateDor() const =0
virtual std::vector< unsigned int > getParameterIndexOfTitle(const std::string &paramTitle) const =0
virtual void pushBackParameter(const std::string title, AbstractObject *resqmlObject)=0
virtual bool isAStringParameter(const std::string &paramTitle) const =0
Queries if all of the parameters sharing a given title are string parameters.
virtual int64_t getIntegerQuantityParameterValue(unsigned int index) const =0
virtual bool isAnIntegerQuantityParameter(unsigned int index) const =0
virtual const std::string & getStringParameterValue(unsigned int index) const =0
virtual bool isAFloatingPointQuantityParameter(unsigned int index) const =0
virtual void pushBackParameter(const std::string title, const std::string &value)=0
Description of one type of activity.
Definition: ActivityTemplate.h:29