Fesapi  2.0.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
ActivityTemplate.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 Activity;
26 
28  class ActivityTemplate : public COMMON_NS::AbstractObject
29  {
30  protected:
32  ActivityTemplate() : COMMON_NS::AbstractObject() {}
33 
39  ActivityTemplate(gsoap_resqml2_0_1::_resqml20__ActivityTemplate* fromGsoap) : COMMON_NS::AbstractObject(fromGsoap) {}
40 
46  ActivityTemplate(gsoap_eml2_3::_eml23__ActivityTemplate* fromGsoap) : COMMON_NS::AbstractObject(fromGsoap) {}
47 
48  public:
49 
55  DLL_IMPORT_OR_EXPORT ActivityTemplate(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : COMMON_NS::AbstractObject(partialObject) {}
56 
58  virtual ~ActivityTemplate() = default;
59 
72  DLL_IMPORT_OR_EXPORT virtual void pushBackParameter(const std::string & title,
73  bool isInput, bool isOutput,
74  unsigned int minOccurs, int maxOccurs) = 0;
75 
91  DLL_IMPORT_OR_EXPORT virtual void pushBackParameter(const std::string & title,
92  bool isInput, bool isOutput,
93  unsigned int minOccurs, int maxOccurs,
94  std::string resqmlObjectContentType) = 0;
95 
103  DLL_IMPORT_OR_EXPORT virtual bool isAnExistingParameter(const std::string & paramTitle) const = 0;
104 
110  DLL_IMPORT_OR_EXPORT virtual unsigned int getParameterCount() const = 0;
111 
121  DLL_IMPORT_OR_EXPORT virtual const std::string & getParameterTitle(unsigned int index) const = 0;
122 
130  DLL_IMPORT_OR_EXPORT virtual std::vector<gsoap_resqml2_0_1::resqml20__ParameterKind> getParameterAllowedKinds(unsigned int index) const = 0;
131 
139  DLL_IMPORT_OR_EXPORT virtual std::vector<gsoap_resqml2_0_1::resqml20__ParameterKind> getParameterAllowedKinds(const std::string & paramTitle) const = 0;
140 
150  DLL_IMPORT_OR_EXPORT virtual bool getParameterIsInput(unsigned int index) const = 0;
151 
162  DLL_IMPORT_OR_EXPORT virtual bool getParameterIsInput(const std::string & paramTitle) const = 0;
163 
173  DLL_IMPORT_OR_EXPORT virtual bool getParameterIsOutput(unsigned int index) const = 0;
174 
185  DLL_IMPORT_OR_EXPORT virtual bool getParameterIsOutput(const std::string & paramTitle) const = 0;
186 
196  DLL_IMPORT_OR_EXPORT virtual int64_t getParameterMinOccurences(unsigned int index) const = 0;
197 
208  DLL_IMPORT_OR_EXPORT virtual int64_t getParameterMinOccurences(const std::string & paramTitle) const = 0;
209 
219  DLL_IMPORT_OR_EXPORT virtual int64_t getParameterMaxOccurences(unsigned int index) const = 0;
220 
231  DLL_IMPORT_OR_EXPORT virtual int64_t getParameterMaxOccurences(const std::string & paramTitle) const = 0;
232 
238  DLL_IMPORT_OR_EXPORT std::vector<Activity *> getActivityInstanceSet() const;
239 
241  DLL_IMPORT_OR_EXPORT static const char* XML_TAG;
242 
243  DLL_IMPORT_OR_EXPORT virtual std::string getXmlTag() const final { return XML_TAG; }
244 
245  private:
247  void loadTargetRelationships() {}
248  };
249 }
Description of one type of activity.
Definition: ActivityTemplate.h:29
virtual bool getParameterIsInput(unsigned int index) const =0
virtual int64_t getParameterMaxOccurences(const std::string &paramTitle) const =0
virtual std::vector< gsoap_resqml2_0_1::resqml20__ParameterKind > getParameterAllowedKinds(unsigned int index) const =0
virtual void pushBackParameter(const std::string &title, bool isInput, bool isOutput, unsigned int minOccurs, int maxOccurs)=0
virtual const std::string & getParameterTitle(unsigned int index) const =0
virtual unsigned int getParameterCount() const =0
virtual std::string getXmlTag() const final
Definition: ActivityTemplate.h:243
virtual bool getParameterIsOutput(unsigned int index) const =0
virtual bool getParameterIsOutput(const std::string &paramTitle) const =0
virtual int64_t getParameterMaxOccurences(unsigned int index) const =0
virtual std::vector< gsoap_resqml2_0_1::resqml20__ParameterKind > getParameterAllowedKinds(const std::string &paramTitle) const =0
virtual bool getParameterIsInput(const std::string &paramTitle) const =0
virtual int64_t getParameterMinOccurences(unsigned int index) const =0
ActivityTemplate(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition: ActivityTemplate.h:55
static const char * XML_TAG
Definition: ActivityTemplate.h:241
std::vector< Activity * > getActivityInstanceSet() const
virtual void pushBackParameter(const std::string &title, bool isInput, bool isOutput, unsigned int minOccurs, int maxOccurs, std::string resqmlObjectContentType)=0
virtual ~ActivityTemplate()=default
virtual bool isAnExistingParameter(const std::string &paramTitle) const =0
virtual int64_t getParameterMinOccurences(const std::string &paramTitle) const =0