My Project
Activity.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/Activity.h"
37 
38 namespace resqml2
39 {
40  class ActivityTemplate;
41 }
42 
43 namespace resqml2_0_1
44 {
45  class DLL_IMPORT_OR_EXPORT Activity : public resqml2::Activity
46  {
47  protected:
49 
50  public:
51 
55  Activity(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : resqml2::Activity(partialObject) {}
56 
62  Activity(resqml2::ActivityTemplate* activityTemplate, const std::string & guid, const std::string & title);
63 
64  Activity(gsoap_resqml2_0_1::_resqml2__Activity* fromGsoap) : resqml2::Activity(fromGsoap) {}
65  virtual ~Activity() {}
66 
71  void pushBackParameter(const std::string title,
72  const double & value, const gsoap_resqml2_0_1::resqml2__ResqmlUom & uom = gsoap_resqml2_0_1::resqml2__ResqmlUom__Euc);
73 
78  void pushBackParameter(const std::string title,
79  const std::string & value);
80 
85  void pushBackParameter(const std::string title,
86  const LONG64 & value);
87 
92  void pushBackParameter(const std::string title,
93  AbstractObject* resqmlObject);
94 
98  unsigned int getParameterCount() const;
99 
103  unsigned int getParameterCount(const std::string & paramTitle) const;
104  const std::string & getParameterTitle(const unsigned int & index) const;
105  std::vector<unsigned int> getParameterIndexOfTitle(const std::string & paramTitle) const;
106 
107  bool isAFloatingPointQuantityParameter(const std::string & paramTitle) const;
108  bool isAFloatingPointQuantityParameter(const unsigned int & index) const;
109  std::vector<double> getFloatingPointQuantityParameterValue(const std::string & paramTitle) const;
110  double getFloatingPointQuantityParameterValue(const unsigned int & index) const;
111  std::vector<gsoap_resqml2_0_1::resqml2__ResqmlUom> getFloatingPointQuantityParameterUom(const std::string & paramTitle) const;
112  gsoap_resqml2_0_1::resqml2__ResqmlUom getFloatingPointQuantityParameterUom(const unsigned int & index) const;
113 
114  bool isAnIntegerQuantityParameter(const std::string & paramTitle) const;
115  bool isAnIntegerQuantityParameter(const unsigned int & index) const;
116  std::vector<LONG64> getIntegerQuantityParameterValue(const std::string & paramTitle) const;
117  LONG64 getIntegerQuantityParameterValue(const unsigned int & index) const;
118 
119  bool isAStringParameter(const std::string & paramTitle) const;
120  bool isAStringParameter(const unsigned int & index) const;
121  std::vector<std::string> getStringParameterValue(const std::string & paramTitle) const;
122  const std::string & getStringParameterValue(const unsigned int & index) const;
123 
124  bool isAResqmlObjectParameter(const std::string & paramTitle) const;
125  bool isAResqmlObjectParameter(const unsigned int & index) const;
126  std::vector<AbstractObject*> getResqmlObjectParameterValue(const std::string & paramTitle) const;
127  AbstractObject* getResqmlObjectParameterValue(const unsigned int & index) const;
128 
132  void setActivityTemplate(resqml2::ActivityTemplate* activityTemplate);
133 
134  gsoap_resqml2_0_1::eml20__DataObjectReference* getActivityTemplateDor() const;
135 
136  std::string getResqmlVersion() const;
137 
138  private:
139 
140  void importRelationshipSetFromEpc(common::EpcDocument* epcDoc);
141 
142  std::vector<gsoap_resqml2_0_1::resqml2__AbstractActivityParameter*> getParameterFromTitle(const std::string & paramTitle) const;
143  };
144 }
Definition: Activity.h:45
Definition: ActivityTemplate.h:40
Activity(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition: Activity.h:55
Definition: EpcDocument.h:78
Definition: EpcDocument.h:168
Definition: Activity.h:40
Definition: EpcDocument.h:62