Fesapi  0.13.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
FormationMarker.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 "witsml1_4_1_1/AbstractObject.h"
22 
23 #include "tools/TimeTools.h"
24 
25 #include "resqml2_0_1/WellboreMarkerFrameRepresentation.h"
26 
27 namespace WITSML1_4_1_1_NS
28 {
29  class DLL_IMPORT_OR_EXPORT FormationMarker : public AbstractObject
30  {
31  public:
36  FormationMarker(class Wellbore* witsmlWellbore,
37  const std::string & guid,
38  const std::string & title,
39  const unsigned int & mdDatumIndex,
40  gsoap_witsml1_4_1_1::witsml1__MeasuredDepthUom mdUom,
41  const double & mdTopSample);
42 
43  FormationMarker(class Wellbore* witsmlWellbore,
44  const std::string & guid,
45  const std::string & title,
46  const unsigned int & mdDatumIndex,
47  gsoap_witsml1_4_1_1::witsml1__MeasuredDepthUom mdUom,
48  const double & mdTopSample,
49  const unsigned int & tvdDatumIndex,
50  gsoap_witsml1_4_1_1::witsml1__WellVerticalCoordinateUom tvdUom,
51  const double & tvdTopSample,
52  gsoap_witsml1_4_1_1::witsml1__PlaneAngleUom dipUom,
53  const double & dip,
54  gsoap_witsml1_4_1_1::witsml1__PlaneAngleUom dipDirectionUom,
55  const double & dipDirection,
56  const std::string & sourceName,
57  const time_t & dTimCreation,
58  const time_t & dTimLastChange,
59  const std::string & comments);
60 
64  FormationMarker(gsoap_witsml1_4_1_1::witsml1__obj_USCOREformationMarkers* fromGsoap):AbstractObject(fromGsoap), wellbore(nullptr), resqmlWellboreMarkerFrameRepresentation(nullptr) {}
65 
70 
71  void setWellbore(class Wellbore* witsmlWellbore);
72 
73  class Wellbore* getWellbore() {return wellbore;}
74 
75  RESQML2_0_1_NS::WellboreMarkerFrameRepresentation* getResqmlWellboreMarkerFrameRepresentation() const {return resqmlWellboreMarkerFrameRepresentation;}
76 
77  soap* getGSoapContext() const {return collection->soap;}
78 
79  const std::string & getTitle() const {return static_cast<gsoap_witsml1_4_1_1::witsml1__obj_USCOREformationMarkers*>(collection)->formationMarker[0]->name;}
80 
81  std::string getUuid() const {return *static_cast<gsoap_witsml1_4_1_1::witsml1__obj_USCOREformationMarkers*>(collection)->formationMarker[0]->uid;}
82  time_t getCreation() const
83  {
84  if (static_cast<gsoap_witsml1_4_1_1::_witsml1__formationMarkers*>(collection)->formationMarker[0]->commonData->dTimCreation)
85  return timeTools::timegm(static_cast<gsoap_witsml1_4_1_1::_witsml1__formationMarkers*>(collection)->formationMarker[0]->commonData->dTimCreation);
86  else
87  return -1;
88  }
89  time_t getLastUpdate() const
90  {
91  if (static_cast<gsoap_witsml1_4_1_1::_witsml1__formationMarkers*>(collection)->formationMarker[0]->commonData->dTimLastChange)
92  return timeTools::timegm(static_cast<gsoap_witsml1_4_1_1::_witsml1__formationMarkers*>(collection)->formationMarker[0]->commonData->dTimLastChange);
93  else
94  return -1;
95  }
96 
97  std::vector<epc::Relationship> getAllEpcRelationships() const;
98 
102  void importRelationshipSetFromEpc(COMMON_NS::EpcDocument* epcDoc);
103 
104  static const char* XML_TAG;
105  virtual std::string getXmlTag() const {return XML_TAG;}
106 
107  protected:
108 
109  // XML forwards relationship
110  class Wellbore* wellbore;
111 
112  // XML backwards relationship
113  RESQML2_0_1_NS::WellboreMarkerFrameRepresentation* resqmlWellboreMarkerFrameRepresentation;
114 
115  friend void RESQML2_0_1_NS::WellboreMarkerFrameRepresentation::setWitsmlFormationMarker(const unsigned int & resqmlMarkerIndex, FormationMarker * witsmlFormationMarker);
116  };
117 }
118 
FormationMarker(gsoap_witsml1_4_1_1::witsml1__obj_USCOREformationMarkers *fromGsoap)
Definition: FormationMarker.h:64
virtual std::string getXmlTag() const
Definition: FormationMarker.h:105
Definition: EpcDocument.h:130
Definition: EpcDocument.h:154
Definition: AbstractObject.h:28
Definition: FormationMarker.h:29
Definition: WellboreMarkerFrameRepresentation.h:30
~FormationMarker()
Definition: FormationMarker.h:69
Definition: Wellbore.h:33