Fesapi  0.13.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 "resqml2/Activity.h"
22 
23 namespace RESQML2_NS
24 {
25  class ActivityTemplate;
26 }
27 
28 namespace RESQML2_0_1_NS
29 {
30  class DLL_IMPORT_OR_EXPORT Activity : public RESQML2_NS::Activity
31  {
32  protected:
34 
35  public:
36 
40  Activity(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : RESQML2_NS::Activity(partialObject) {}
41 
47  Activity(RESQML2_NS::ActivityTemplate* activityTemplate, const std::string & guid, const std::string & title);
48 
49  Activity(gsoap_resqml2_0_1::_resqml2__Activity* fromGsoap) : RESQML2_NS::Activity(fromGsoap) {}
50  virtual ~Activity() {}
51 
56  void pushBackParameter(const std::string title,
57  const double & value, const gsoap_resqml2_0_1::resqml2__ResqmlUom & uom = gsoap_resqml2_0_1::resqml2__ResqmlUom__Euc);
58 
63  void pushBackParameter(const std::string title,
64  const std::string & value);
65 
70  void pushBackParameter(const std::string title,
71  const LONG64 & value);
72 
77  void pushBackParameter(const std::string title,
78  AbstractObject* resqmlObject);
79 
83  unsigned int getParameterCount() const;
84 
88  unsigned int getParameterCount(const std::string & paramTitle) const;
89  const std::string & getParameterTitle(const unsigned int & index) const;
90  std::vector<unsigned int> getParameterIndexOfTitle(const std::string & paramTitle) const;
91 
92  bool isAFloatingPointQuantityParameter(const std::string & paramTitle) const;
93  bool isAFloatingPointQuantityParameter(const unsigned int & index) const;
94  std::vector<double> getFloatingPointQuantityParameterValue(const std::string & paramTitle) const;
95  double getFloatingPointQuantityParameterValue(const unsigned int & index) const;
96  std::vector<gsoap_resqml2_0_1::resqml2__ResqmlUom> getFloatingPointQuantityParameterUom(const std::string & paramTitle) const;
97  gsoap_resqml2_0_1::resqml2__ResqmlUom getFloatingPointQuantityParameterUom(const unsigned int & index) const;
98 
99  bool isAnIntegerQuantityParameter(const std::string & paramTitle) const;
100  bool isAnIntegerQuantityParameter(const unsigned int & index) const;
101  std::vector<LONG64> getIntegerQuantityParameterValue(const std::string & paramTitle) const;
102  LONG64 getIntegerQuantityParameterValue(const unsigned int & index) const;
103 
104  bool isAStringParameter(const std::string & paramTitle) const;
105  bool isAStringParameter(const unsigned int & index) const;
106  std::vector<std::string> getStringParameterValue(const std::string & paramTitle) const;
107  const std::string & getStringParameterValue(const unsigned int & index) const;
108 
109  bool isAResqmlObjectParameter(const std::string & paramTitle) const;
110  bool isAResqmlObjectParameter(const unsigned int & index) const;
111  std::vector<AbstractObject*> getResqmlObjectParameterValue(const std::string & paramTitle) const;
112  AbstractObject* getResqmlObjectParameterValue(const unsigned int & index) const;
113 
117  void setActivityTemplate(RESQML2_NS::ActivityTemplate* activityTemplate);
118 
119  gsoap_resqml2_0_1::eml20__DataObjectReference* getActivityTemplateDor() const;
120 
121  std::string getResqmlVersion() const;
122 
123  private:
124 
125  void importRelationshipSetFromEpc(COMMON_NS::EpcDocument* epcDoc);
126 
127  std::vector<gsoap_resqml2_0_1::resqml2__AbstractActivityParameter*> getParameterFromTitle(const std::string & paramTitle) const;
128  };
129 }
130 
Definition: ActivityTemplate.h:25
Definition: EpcDocument.h:65
Definition: EpcDocument.h:154
Activity(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition: Activity.h:40
Definition: Activity.h:30
Definition: Activity.h:25
Definition: EpcDocument.h:49