Fesapi  2.0.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
Well.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 "AbstractObject.h"
22 
23 namespace WITSML2_0_NS
24 {
26  class Wellbore;
28  class WellCompletion;
29 
31  class Well : public WITSML2_0_NS::AbstractObject
32  {
33  public:
34 
42  DLL_IMPORT_OR_EXPORT Well(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : WITSML2_0_NS::AbstractObject(partialObject) {}
43 
53  Well(COMMON_NS::DataObjectRepository * repo,
54  const std::string & guid,
55  const std::string & title);
56 
69  Well(COMMON_NS::DataObjectRepository * repo,
70  const std::string & guid,
71  const std::string & title,
72  const std::string & operator_,
73  gsoap_eml2_1::eml21__WellStatus statusWell,
74  gsoap_eml2_1::witsml20__WellDirection directionWell
75  );
76 
82  Well(gsoap_eml2_1::witsml20__Well* fromGsoap):AbstractObject(fromGsoap) {}
83 
85  ~Well() = default;
86 
87  GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE(std::string, NameLegal)
88  GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE(std::string, NumLicense)
89  GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE(std::string, NumGovt)
90  GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE(std::string, Field)
91  GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE(std::string, Country)
92  GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE(std::string, State)
93  GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE(std::string, County)
94  GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE(std::string, Region)
95  GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE(std::string, District)
96  GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE(std::string, Block)
97  GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE(std::string, Operator)
98  GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE(std::string, OperatorDiv)
99  GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE(std::string, OriginalOperator)
100  GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE(std::string, NumAPI)
101 
102  // Optional enum
103  GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE(gsoap_eml2_1::eml21__WellStatus, StatusWell)
104  GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE(gsoap_eml2_1::witsml20__WellPurpose, PurposeWell)
105  GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE(gsoap_eml2_1::witsml20__WellFluid, FluidWell)
106  GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE(gsoap_eml2_1::witsml20__WellDirection, DirectionWell)
107 
108  GETTER_AND_SETTER_MEASURE_OPTIONAL_ATTRIBUTE(WaterDepth, gsoap_eml2_1::eml21__LengthUom)
109  GETTER_PRESENCE_ATTRIBUTE(GroundElevation)
110 
111  GETTER_AND_SETTER_MEASURE_OPTIONAL_ATTRIBUTE(PcInterest, gsoap_eml2_1::eml21__DimensionlessUom)
112 
113  GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE(time_t, DTimLicense)
114  GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE(time_t, DTimSpud)
115  GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE(time_t, DTimPa)
116 
117 
126  DLL_IMPORT_OR_EXPORT void setGroundElevation(double value, gsoap_eml2_1::eml21__LengthUom uom, const std::string& datum);
127 
135  DLL_IMPORT_OR_EXPORT double getGroundElevationValue() const;
136 
144  DLL_IMPORT_OR_EXPORT gsoap_eml2_1::eml21__LengthUom getGroundElevationUom() const;
145 
153  DLL_IMPORT_OR_EXPORT std::string getGroundElevationDatum() const;
154 
165  DLL_IMPORT_OR_EXPORT void setTimeZone(bool direction, unsigned short hours, unsigned short minutes = 0);
166  GETTER_PRESENCE_ATTRIBUTE(TimeZone)
167 
174  DLL_IMPORT_OR_EXPORT bool getTimeZoneDirection() const;
175 
182  DLL_IMPORT_OR_EXPORT unsigned short getTimeZoneHours() const;
183 
190  DLL_IMPORT_OR_EXPORT unsigned short getTimeZoneMinutes() const;
191 
199  DLL_IMPORT_OR_EXPORT double getLocationProjectedX(unsigned int locationIndex);
200 
208  DLL_IMPORT_OR_EXPORT double getLocationProjectedY(unsigned int locationIndex);
209 
218  DLL_IMPORT_OR_EXPORT void pushBackLocation(
219  const std::string & guid,
220  double projectedX,
221  double projectedY,
222  unsigned int projectedCrsEpsgCode);
223 
229  DLL_IMPORT_OR_EXPORT unsigned int geLocationCount() const;
230 
242  DLL_IMPORT_OR_EXPORT void pushBackDatum(
243  const std::string & guid,
244  const std::string & title,
245  gsoap_eml2_1::eml21__WellboreDatumReference code,
246  const std::string & datum,
247  gsoap_eml2_1::eml21__LengthUom elevationUnit,
248  double elevation,
249  unsigned int verticalCrsEpsgCode);
250 
256  DLL_IMPORT_OR_EXPORT unsigned int getDatumCount() const;
257 
263  DLL_IMPORT_OR_EXPORT std::vector<RESQML2_NS::WellboreFeature *> getResqmlWellboreFeatures() const;
264 
270  DLL_IMPORT_OR_EXPORT std::vector<Wellbore *> getWellbores() const;
271 
277  DLL_IMPORT_OR_EXPORT std::vector<WellCompletion *> getWellcompletions() const;
278 
284  DLL_IMPORT_OR_EXPORT static const char* XML_TAG;
285 
291  DLL_IMPORT_OR_EXPORT virtual std::string getXmlTag() const { return XML_TAG; }
292 
293  protected:
294 
296  void loadTargetRelationships();
297  };
298 }
Definition: AbstractObject.h:28
Definition: WellCompletion.h:30
Definition: Well.h:32
Well(gsoap_eml2_1::witsml20__Well *fromGsoap)
Definition: Well.h:82
~Well()=default
Well(common::DataObjectRepository *repo, const std::string &guid, const std::string &title, const std::string &operator_, gsoap_eml2_1::eml21__WellStatus statusWell, gsoap_eml2_1::witsml20__WellDirection directionWell)
Constructor.
Well(common::DataObjectRepository *repo, const std::string &guid, const std::string &title)
Well(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition: Well.h:42
Definition: Wellbore.h:41