21 #include "WellboreObject.h"
25 #include "../eml2/PropertyKind.h"
27 namespace WITSML2_0_NS
70 return COMMON_NS::DataObjectReference(
static_cast<T*
>(gsoapProxy2_1)->
Wellbore);
82 if (witsmlWellbore ==
nullptr) {
83 throw std::invalid_argument(
"Cannot set a null witsml wellbore to a witsml trajectory");
85 if (getRepository() ==
nullptr) {
91 getRepository()->addRelationship(
this, witsmlWellbore);
99 return COMMON_NS::DataObjectReference(
static_cast<T*
>(gsoapProxy2_1)->ChannelClass);
109 return getRepository()->template getDataObjectByUuid<EML2_NS::PropertyKind>(getPropertyKindDor().getUuid());
121 if (propKind ==
nullptr) {
122 throw std::invalid_argument(
"Cannot set a null witsml propKind to a witsml log/channelset/channel");
124 if (getRepository() ==
nullptr) {
125 propKind->getRepository()->addOrReplaceDataObject(
this);
128 static_cast<T*
>(gsoapProxy2_1)->ChannelClass = propKind->newEmlReference();
130 getRepository()->addRelationship(
this, propKind);
140 #define GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE_TEMPLATE(attributeDatatype, attributeName, constructor)\
141 DLL_IMPORT_OR_EXPORT virtual void set##attributeName(const attributeDatatype & attributeName) = 0;\
142 std::string get##attributeName() const {\
143 if (static_cast<T*>(gsoapProxy2_1)->attributeName == nullptr) { throw std::invalid_argument("The attribute does not exist"); }\
144 return *static_cast<T*>(gsoapProxy2_1)->attributeName;\
146 bool has##attributeName() const { return static_cast<T*>(gsoapProxy2_1)->attributeName != nullptr; }
148 GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE_TEMPLATE(std::string, TimeDepth, gsoap_eml2_1::soap_new_std__string)
149 GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE_TEMPLATE(std::string, RunNumber, gsoap_eml2_1::soap_new_std__string)
150 GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE_TEMPLATE(std::string, PassNumber, gsoap_eml2_1::soap_new_std__string)
151 GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE_TEMPLATE(std::string, LoggingCompanyName, gsoap_eml2_1::soap_new_std__string)
152 GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE_TEMPLATE(std::string, LoggingCompanyCode, gsoap_eml2_1::soap_new_std__string)
153 GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE_TEMPLATE(std::string, ToolName, gsoap_eml2_1::soap_new_std__string)
154 GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE_TEMPLATE(std::string, ToolClass, gsoap_eml2_1::soap_new_std__string)
164 template<>
inline std::string ChannelMetaDataObject<gsoap_eml2_1::witsml20__Channel>::getTimeDepth()
const {
165 return static_cast<gsoap_eml2_1::witsml20__Channel*
>(gsoapProxy2_1)->TimeDepth;
175 template<>
inline bool ChannelMetaDataObject<gsoap_eml2_1::witsml20__Channel>::hasTimeDepth()
const {
186 template<>
inline std::string ChannelMetaDataObject<gsoap_eml2_1::witsml20__Channel>::getLoggingCompanyName()
const {
187 return static_cast<gsoap_eml2_1::witsml20__Channel*
>(gsoapProxy2_1)->LoggingCompanyName;
197 template<>
inline bool ChannelMetaDataObject<gsoap_eml2_1::witsml20__Channel>::hasLoggingCompanyName()
const {
common::DataObjectRepository * getRepository() const
Definition: AbstractObject.h:878
gsoap_eml2_1::eml21__DataObjectReference * newEmlReference() const
common::AbstractObject * addOrReplaceDataObject(common::AbstractObject *proxy, bool replaceOnlyContent=false)
Definition: Wellbore.h:41
Definition: WellboreObject.h:32