Fesapi  0.13.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 "resqml2/ActivityTemplate.h"
22 
23 namespace RESQML2_0_1_NS
24 {
25  class DLL_IMPORT_OR_EXPORT ActivityTemplate : public RESQML2_NS::ActivityTemplate
26  {
27  public:
28 
32  ActivityTemplate(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : RESQML2_NS::ActivityTemplate(partialObject) {}
33 
40  ActivityTemplate(soap* soapContext, const std::string & guid, const std::string & title);
41 
42  ActivityTemplate(gsoap_resqml2_0_1::_resqml2__ActivityTemplate* fromGsoap) : RESQML2_NS::ActivityTemplate(fromGsoap) {}
43  virtual ~ActivityTemplate() {}
44 
49  void pushBackParameter(const std::string title,
50  const bool & isInput, const bool isOutput,
51  const unsigned int & minOccurs, const int & maxOccurs);
52 
57  void pushBackParameter(const std::string title,
58  const gsoap_resqml2_0_1::resqml2__ParameterKind & kind,
59  const bool & isInput, const bool isOutput,
60  const unsigned int & minOccurs, const int & maxOccurs);
61 
67  void pushBackParameter(const std::string title,
68  const bool & isInput, const bool isOutput,
69  const unsigned int & minOccurs, const int & maxOccurs,
70  const std::string & resqmlObjectContentType);
71 
76  bool isAnExistingParameter(const std::string & paramTitle) const;
77 
78  const unsigned int getParameterCount() const;
79  const std::string & getParameterTitle(const unsigned int & index) const;
80  const std::vector<gsoap_resqml2_0_1::resqml2__ParameterKind> & getParameterAllowedKinds(const unsigned int & index) const;
81  const std::vector<gsoap_resqml2_0_1::resqml2__ParameterKind> & getParameterAllowedKinds(const std::string & paramTitle) const;
82  const bool & getParameterIsInput(const unsigned int & index) const;
83  const bool & getParameterIsInput(const std::string & paramTitle) const;
84  const bool & getParameterIsOutput(const unsigned int & index) const;
85  const bool & getParameterIsOutput(const std::string & paramTitle) const;
86  const LONG64 getParameterMinOccurences(const unsigned int & index) const;
87  const LONG64 getParameterMinOccurences(const std::string & paramTitle) const;
88  const LONG64 getParameterMaxOccurences(const unsigned int & index) const;
89  const LONG64 getParameterMaxOccurences(const std::string & paramTitle) const;
90 
91  const std::vector<Activity*> & getActivityInstanceSet() const { return activityInstanceSet; }
92 
93  //******************************************************************
94  //******************** MANDATORY FOR GsoapWrapper ******************
95  //******************************************************************
96 
97  std::string getResqmlVersion() const;
98 
99  static const char* XML_TAG;
100  std::string getXmlTag() const {return XML_TAG;}
101 
102 
103  private:
104  std::vector<epc::Relationship> getAllEpcRelationships() const;
105  void importRelationshipSetFromEpc(COMMON_NS::EpcDocument * epcDoc) {}
106 
107  gsoap_resqml2_0_1::resqml2__ParameterTemplate* getParameterFromTitle(const std::string & paramTitle) const;
108 
109  std::vector<Activity*> activityInstanceSet;
110  };
111 }
112 
Definition: ActivityTemplate.h:25
Definition: EpcDocument.h:65
std::string getXmlTag() const
Definition: ActivityTemplate.h:100
Definition: EpcDocument.h:154
ActivityTemplate(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition: ActivityTemplate.h:32
Definition: ActivityTemplate.h:25
Definition: EpcDocument.h:49