My Project
ActivityTemplate.h
1 /*-----------------------------------------------------------------------
2 Copyright F2I-CONSULTING, (2014-2017)
3 
4 philippe.verney@f2i-consulting.com
5 
6 This software is a computer program whose purpose is to access to data formatted using Energistics standards.
7 
8 This software is governed by the CeCILL-B license under French law and
9 abiding by the rules of distribution of free software. You can use,
10 modify and/ or redistribute the software under the terms of the CeCILL-B
11 license as circulated by CEA, CNRS and INRIA at the following URL
12 "http://www.cecill.info".
13 
14 As a counterpart to the access to the source code and rights to copy,
15 modify and redistribute granted by the license, users are provided only
16 with a limited warranty and the software's author, the holder of the
17 economic rights, and the successive licensors have only limited
18 liability.
19 
20 In this respect, the user's attention is drawn to the risks associated
21 with loading, using, modifying and/or developing or reproducing the
22 software by the user in light of its specific status of free software,
23 that may mean that it is complicated to manipulate, and that also
24 therefore means that it is reserved for developers and experienced
25 professionals having in-depth computer knowledge. Users are therefore
26 encouraged to load and test the software's suitability as regards their
27 requirements in conditions enabling the security of their systems and/or
28 data to be ensured and, more generally, to use and operate it in the
29 same conditions as regards security.
30 
31 The fact that you are presently reading this means that you have had
32 knowledge of the CeCILL-B license and that you accept its terms.
33 -----------------------------------------------------------------------*/
34 #pragma once
35 
36 #include "resqml2/ActivityTemplate.h"
37 
38 namespace resqml2_0_1
39 {
40  class DLL_IMPORT_OR_EXPORT ActivityTemplate : public resqml2::ActivityTemplate
41  {
42  public:
43 
47  ActivityTemplate(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : resqml2::ActivityTemplate(partialObject) {}
48 
55  ActivityTemplate(soap* soapContext, const std::string & guid, const std::string & title);
56 
57  ActivityTemplate(gsoap_resqml2_0_1::_resqml2__ActivityTemplate* fromGsoap) : resqml2::ActivityTemplate(fromGsoap) {}
58  virtual ~ActivityTemplate() {}
59 
64  void pushBackParameter(const std::string title,
65  const bool & isInput, const bool isOutput,
66  const unsigned int & minOccurs, const int & maxOccurs);
67 
72  void pushBackParameter(const std::string title,
73  const gsoap_resqml2_0_1::resqml2__ParameterKind & kind,
74  const bool & isInput, const bool isOutput,
75  const unsigned int & minOccurs, const int & maxOccurs);
76 
82  void pushBackParameter(const std::string title,
83  const bool & isInput, const bool isOutput,
84  const unsigned int & minOccurs, const int & maxOccurs,
85  const std::string & resqmlObjectContentType);
86 
91  bool isAnExistingParameter(const std::string & paramTitle) const;
92 
93  const unsigned int getParameterCount() const;
94  const std::string & getParameterTitle(const unsigned int & index) const;
95  const std::vector<gsoap_resqml2_0_1::resqml2__ParameterKind> & getParameterAllowedKinds(const unsigned int & index) const;
96  const std::vector<gsoap_resqml2_0_1::resqml2__ParameterKind> & getParameterAllowedKinds(const std::string & paramTitle) const;
97  const bool & getParameterIsInput(const unsigned int & index) const;
98  const bool & getParameterIsInput(const std::string & paramTitle) const;
99  const bool & getParameterIsOutput(const unsigned int & index) const;
100  const bool & getParameterIsOutput(const std::string & paramTitle) const;
101  const LONG64 getParameterMinOccurences(const unsigned int & index) const;
102  const LONG64 getParameterMinOccurences(const std::string & paramTitle) const;
103  const LONG64 getParameterMaxOccurences(const unsigned int & index) const;
104  const LONG64 getParameterMaxOccurences(const std::string & paramTitle) const;
105 
106  const std::vector<Activity*> & getActivityInstanceSet() const { return activityInstanceSet; }
107 
108  //******************************************************************
109  //******************** MANDATORY FOR GsoapWrapper ******************
110  //******************************************************************
111 
112  std::string getResqmlVersion() const;
113 
114  static const char* XML_TAG;
115  std::string getXmlTag() const {return XML_TAG;}
116 
117 
118  private:
119  std::vector<epc::Relationship> getAllEpcRelationships() const;
120  void importRelationshipSetFromEpc(common::EpcDocument * epcDoc) {}
121 
122  gsoap_resqml2_0_1::resqml2__ParameterTemplate* getParameterFromTitle(const std::string & paramTitle) const;
123 
124  std::vector<Activity*> activityInstanceSet;
125  };
126 }
Definition: ActivityTemplate.h:40
Definition: ActivityTemplate.h:40
Definition: EpcDocument.h:78
Definition: EpcDocument.h:168
ActivityTemplate(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition: ActivityTemplate.h:47
std::string getXmlTag() const
Definition: ActivityTemplate.h:115
Definition: EpcDocument.h:62