My Project
FormationMarker.h
1 /*-----------------------------------------------------------------------
2 Copyright F2I-CONSULTING, (2014-2016)
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 "witsml1_4_1_1/AbstractObject.h"
37 
38 #include "resqml2_0_1/WellboreMarkerFrameRepresentation.h"
39 
40 namespace witsml1_4_1_1
41 {
42  class DLL_IMPORT_OR_EXPORT FormationMarker : public AbstractObject
43  {
44  public:
49  FormationMarker(class Wellbore* witsmlWellbore,
50  const std::string & guid,
51  const std::string & title,
52  const unsigned int & mdDatumIndex,
53  gsoap_witsml1_4_1_1::witsml1__MeasuredDepthUom mdUom,
54  const double & mdTopSample);
55 
56  FormationMarker(class Wellbore* witsmlWellbore,
57  const std::string & guid,
58  const std::string & title,
59  const unsigned int & mdDatumIndex,
60  gsoap_witsml1_4_1_1::witsml1__MeasuredDepthUom mdUom,
61  const double & mdTopSample,
62  const unsigned int & tvdDatumIndex,
63  gsoap_witsml1_4_1_1::witsml1__WellVerticalCoordinateUom tvdUom,
64  const double & tvdTopSample,
65  gsoap_witsml1_4_1_1::witsml1__PlaneAngleUom dipUom,
66  const double & dip,
67  gsoap_witsml1_4_1_1::witsml1__PlaneAngleUom dipDirectionUom,
68  const double & dipDirection,
69  const std::string & sourceName,
70  const time_t & dTimCreation,
71  const time_t & dTimLastChange,
72  const std::string & comments);
73 
77  FormationMarker(gsoap_witsml1_4_1_1::witsml1__obj_USCOREformationMarkers* fromGsoap):AbstractObject(fromGsoap), wellbore(nullptr), resqmlWellboreMarkerFrameRepresentation(nullptr) {}
78 
83 
84  void setWellbore(class Wellbore* witsmlWellbore);
85 
86  class Wellbore* getWellbore() {return wellbore;}
87 
88  resqml2_0_1::WellboreMarkerFrameRepresentation* getResqmlWellboreMarkerFrameRepresentation() const {return resqmlWellboreMarkerFrameRepresentation;}
89 
90  soap* getGSoapContext() const {return collection->soap;}
91 
92  const std::string & getTitle() const {return static_cast<gsoap_witsml1_4_1_1::witsml1__obj_USCOREformationMarkers*>(collection)->formationMarker[0]->name;}
93 
94  std::string getUuid() const {return *static_cast<gsoap_witsml1_4_1_1::witsml1__obj_USCOREformationMarkers*>(collection)->formationMarker[0]->uid;}
95  time_t getCreation() const
96  {
97  if (static_cast<gsoap_witsml1_4_1_1::_witsml1__formationMarkers*>(collection)->formationMarker[0]->commonData->dTimCreation)
98  return *static_cast<gsoap_witsml1_4_1_1::_witsml1__formationMarkers*>(collection)->formationMarker[0]->commonData->dTimCreation;
99  else
100  return -1;
101  }
102  time_t getLastUpdate() const
103  {
104  if (static_cast<gsoap_witsml1_4_1_1::_witsml1__formationMarkers*>(collection)->formationMarker[0]->commonData->dTimLastChange)
105  return *static_cast<gsoap_witsml1_4_1_1::_witsml1__formationMarkers*>(collection)->formationMarker[0]->commonData->dTimLastChange;
106  else
107  return -1;
108  }
109 
110  std::vector<epc::Relationship> getAllEpcRelationships() const;
111 
115  void importRelationshipSetFromEpc(common::EpcDocument* epcDoc);
116 
117  static const char* XML_TAG;
118  virtual std::string getXmlTag() const {return XML_TAG;}
119 
120  protected:
121 
122  // XML forwards relationship
123  class Wellbore* wellbore;
124 
125  // XML backwards relationship
126  resqml2_0_1::WellboreMarkerFrameRepresentation* resqmlWellboreMarkerFrameRepresentation;
127 
128  friend void resqml2_0_1::WellboreMarkerFrameRepresentation::setWitsmlFormationMarker(const unsigned int & resqmlMarkerIndex, FormationMarker * witsmlFormationMarker);
129  };
130 }
Definition: EpcDocument.h:142
Definition: Wellbore.h:45
Definition: AbstractObject.h:43
Definition: FormationMarker.h:42
~FormationMarker()
Definition: FormationMarker.h:82
virtual std::string getXmlTag() const
Definition: FormationMarker.h:118
Definition: WellboreMarkerFrameRepresentation.h:45
FormationMarker(gsoap_witsml1_4_1_1::witsml1__obj_USCOREformationMarkers *fromGsoap)
Definition: FormationMarker.h:77
Definition: EpcDocument.h:155