Fesapi 2.10.1.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
Loading...
Searching...
No Matches
MacroDefinitions.h
1/*-----------------------------------------------------------------------
2Licensed to the Apache Software Foundation (ASF) under one
3or more contributor license agreements. See the NOTICE file
4distributed with this work for additional information
5regarding copyright ownership. The ASF licenses this file
6to you under the Apache License, Version 2.0 (the
7"License"; you may not use this file except in compliance
8with the License. You may obtain a copy of the License at
9
10http://www.apache.org/licenses/LICENSE-2.0
11
12Unless required by applicable law or agreed to in writing,
13software distributed under the License is distributed on an
14"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15KIND, either express or implied. See the License for the
16specific language governing permissions and limitations
17under the License.
18-----------------------------------------------------------------------*/
19#pragma once
20
29#define GETTER_SETTER_ATTRIBUTE(gsoapClassName, proxyVariable, attributeName, attributeDatatype)\
30 DLL_IMPORT_OR_EXPORT void set##attributeName(const attributeDatatype& value) {\
31 if (isPartial()) { throw std::logic_error("Cannot set an attribute of a partial dataobject."); }\
32 static_cast<gsoapClassName*>(proxyVariable)->attributeName = value;\
33 }\
34 DLL_IMPORT_OR_EXPORT attributeDatatype get##attributeName() const {\
35 if (isPartial()) { throw std::logic_error("Cannot get an attribute of a partial dataobject."); }\
36 return static_cast<gsoapClassName*>(proxyVariable)->attributeName;\
37 }
38
46#define CHECKER_PRESENCE_ATTRIBUTE(gsoapClassName, proxyVariable, attributeName)\
47 DLL_IMPORT_OR_EXPORT bool has##attributeName() const {\
48 return static_cast<gsoapClassName*>(proxyVariable)->attributeName != nullptr;\
49 }
50
59#define CHECKER_PRESENCE_ATTRIBUTE_IN_VECTOR(gsoapClassName, proxyVariable, vectorName, attributeName)\
60 DLL_IMPORT_OR_EXPORT bool has##vectorName##attributeName(unsigned int index) const {\
61 return static_cast<gsoapClassName*>(proxyVariable)->vectorName.at(index)->attributeName != nullptr;\
62}
63
72#define GETTER_SETTER_OPTIONAL_ATTRIBUTE(gsoapClassName, proxyVariable, attributeName, attributeDatatype)\
73 DLL_IMPORT_OR_EXPORT void set##attributeName(const attributeDatatype& value);\
74 DLL_IMPORT_OR_EXPORT attributeDatatype get##attributeName() const {\
75 if (isPartial()) { throw std::logic_error("Cannot get an attribute of a partial dataobject."); }\
76 if (!has##attributeName()) { throw std::invalid_argument("The attribute does not exist"); }\
77 return *static_cast<gsoapClassName*>(proxyVariable)->attributeName;\
78 }\
79 CHECKER_PRESENCE_ATTRIBUTE(gsoapClassName, proxyVariable, attributeName)
80
89#define GETTER_SETTER_MEASURE_OPTIONAL_ATTRIBUTE(gsoapClassName, proxyVariable, attributeName, uomDatatype)\
90 DLL_IMPORT_OR_EXPORT void set##attributeName(double value, uomDatatype uom);\
91 DLL_IMPORT_OR_EXPORT double get##attributeName##Value() const {\
92 if (!has##attributeName()) { throw std::invalid_argument("The attribute does not exist"); }\
93 return static_cast<gsoapClassName*>(proxyVariable)->attributeName->__item;\
94 }\
95 DLL_IMPORT_OR_EXPORT uomDatatype get##attributeName##Uom() const {\
96 if (!has##attributeName()) { throw std::invalid_argument("The attribute does not exist"); }\
97 return static_cast<gsoapClassName*>(proxyVariable)->attributeName->uom;\
98 }\
99 CHECKER_PRESENCE_ATTRIBUTE(gsoapClassName, proxyVariable, attributeName)
100
110#define GETTER_SETTER_OPTIONAL_ATTRIBUTE_IN_VECTOR(gsoapClassName, proxyVariable, vectorName, attributeName, attributeDatatype)\
111 DLL_IMPORT_OR_EXPORT void set##vectorName##attributeName(unsigned int index, const attributeDatatype& value);\
112 DLL_IMPORT_OR_EXPORT attributeDatatype get##vectorName##attributeName(unsigned int index) const {\
113 if (!has##vectorName##attributeName(index)) { throw std::invalid_argument("The attribute does not exist"); }\
114 return *static_cast<gsoapClassName*>(proxyVariable)->vectorName[index]->attributeName;\
115 }\
116 CHECKER_PRESENCE_ATTRIBUTE_IN_VECTOR(gsoapClassName, proxyVariable, vectorName, attributeName)
117
127#define GETTER_SETTER_MEASURE_OPTIONAL_ATTRIBUTE_IN_VECTOR(gsoapClassName, proxyVariable, vectorName, attributeName, uomDatatype)\
128 DLL_IMPORT_OR_EXPORT void set##vectorName##attributeName(unsigned int index, double value, uomDatatype uom);\
129 DLL_IMPORT_OR_EXPORT double get##vectorName##attributeName##Value(unsigned int index) const {\
130 if (!has##vectorName##attributeName(index)) { throw std::invalid_argument("The attribute does not exist"); }\
131 return static_cast<gsoapClassName*>(proxyVariable)->vectorName[index]->attributeName->__item;\
132 }\
133 DLL_IMPORT_OR_EXPORT uomDatatype get##vectorName##attributeName##Uom(unsigned int index) const {\
134 if (!has##vectorName##attributeName(index)) { throw std::invalid_argument("The attribute does not exist"); }\
135 return static_cast<gsoapClassName*>(proxyVariable)->vectorName[index]->attributeName->uom;\
136 }\
137 CHECKER_PRESENCE_ATTRIBUTE_IN_VECTOR(gsoapClassName, proxyVariable, vectorName, attributeName)
138
149#define SETTER_OPTIONAL_ATTRIBUTE_IMPL(className, gsoapClassName, proxyVariable, attributeName, attributeDatatype, constructor)\
150void className::set##attributeName(const attributeDatatype& value)\
151{\
152 if (isPartial()) { throw std::logic_error("Cannot set an attribute of a partial dataobject."); }\
153 static_cast<gsoapClassName*>(proxyVariable)->attributeName = constructor(proxyVariable->soap);\
154 *static_cast<gsoapClassName*>(proxyVariable)->attributeName = value;\
155}
156
167#define SETTER_MEASURE_ATTRIBUTE_IMPL(className, gsoapClassName, proxyVariable, attributeName, uomDatatype, constructor)\
168void className::set##attributeName(double value, uomDatatype uom)\
169{\
170 static_cast<gsoapClassName*>(proxyVariable)->attributeName = constructor(proxyVariable->soap);\
171 static_cast<gsoapClassName*>(proxyVariable)->attributeName->__item = value;\
172 static_cast<gsoapClassName*>(proxyVariable)->attributeName->uom = uom;\
173}
174
186#define SETTER_OPTIONAL_ATTRIBUTE_IN_VECTOR_IMPL(className, gsoapClassName, proxyVariable, vectorName, attributeName, attributeDatatype, constructor)\
187void className::set##vectorName##attributeName(unsigned int index, const attributeDatatype& value)\
188{\
189 static_cast<gsoapClassName*>(proxyVariable)->vectorName.at(index)->attributeName = constructor(proxyVariable->soap);\
190 *static_cast<gsoapClassName*>(proxyVariable)->vectorName[index]->attributeName = value;\
191}
192
204#define SETTER_MEASURE_ATTRIBUTE_IN_VECTOR_IMPL(className, gsoapClassName, proxyVariable, vectorName, attributeName, uomDatatype, constructor)\
205void className::set##vectorName##attributeName(unsigned int index, double value, uomDatatype uom)\
206{\
207 static_cast<gsoapClassName*>(proxyVariable)->vectorName.at(index)->attributeName = constructor(proxyVariable->soap);\
208 static_cast<gsoapClassName*>(proxyVariable)->vectorName[index]->attributeName->__item = value;\
209 static_cast<gsoapClassName*>(proxyVariable)->vectorName[index]->attributeName->uom = uom;\
210}
211
220#define GLUE(a,b) a##b
221
228#define CHECK_ATTRIBUTE_EXISTENCE(className, attributeName) if (static_cast<witsml21__##className*>(gsoapProxy2_3)->attributeName == nullptr) { throw std::invalid_argument("The attribute does not exist"); }
229
237#define CHECK_ATTRIBUTE_IN_VECTOR_EXISTENCE(className, vectorName, attributeName) \
238 if (static_cast<witsml21__##className*>(gsoapProxy2_3)->vectorName.at(index)->attributeName == nullptr) { throw std::invalid_argument("The attribute in vector does not exist"); }
239
247#define CREATE_ATTRIBUTE_IF_NOT_PRESENT(className, attributeName, constructor) if (static_cast<witsml21__##className*>(gsoapProxy2_3)->attributeName == nullptr) { static_cast<witsml21__##className*>(gsoapProxy2_3)->attributeName = constructor(gsoapProxy2_3->soap); }
248
257#define CREATE_ATTRIBUTE_IN_VECTOR_IF_NOT_PRESENT(className, vectorName, attributeName, constructor)\
258 if (static_cast<witsml21__##className*>(gsoapProxy2_3)->vectorName.at(index)->attributeName == nullptr) { static_cast<witsml21__##className*>(gsoapProxy2_3)->vectorName[index]->attributeName = constructor(gsoapProxy2_3->soap); }
259
265#define ABSTRACT_GETTER_PRESENCE_ATTRIBUTE(attributeName) DLL_IMPORT_OR_EXPORT virtual bool has##attributeName() const = 0;
266
272#define FINAL_GETTER_PRESENCE_ATTRIBUTE(attributeName) DLL_IMPORT_OR_EXPORT bool has##attributeName() const final;
273
279#define GETTER_PRESENCE_ATTRIBUTE(attributeName) DLL_IMPORT_OR_EXPORT bool has##attributeName() const;
280
287#define GETTER_PRESENCE_ATTRIBUTE_IMPL(className, attributeName) bool GLUE(,className)::has##attributeName() const { return static_cast<witsml21__##className*>(gsoapProxy2_3)->attributeName != nullptr; }
288
295#define ABSTRACT_GETTER_PRESENCE_ATTRIBUTE_IN_VECTOR(vectorName, attributeName) DLL_IMPORT_OR_EXPORT virtual bool has##vectorName##attributeName(unsigned int index) const = 0;
296
303#define FINAL_GETTER_PRESENCE_ATTRIBUTE_IN_VECTOR(vectorName, attributeName) DLL_IMPORT_OR_EXPORT bool has##vectorName##attributeName(unsigned int index) const final;
304
311#define GETTER_PRESENCE_ATTRIBUTE_IN_VECTOR(vectorName, attributeName) DLL_IMPORT_OR_EXPORT bool has##vectorName##attributeName(unsigned int index) const;
312
320#define GETTER_PRESENCE_ATTRIBUTE_IN_VECTOR_IMPL(className, vectorName, attributeName) bool GLUE(,className)::has##vectorName##attributeName(unsigned int index) const {\
321 return static_cast<witsml21__##className*>(gsoapProxy2_3)->vectorName.at(index)->attributeName != nullptr;\
322}
323
330#define ABSTRACT_GETTER_AND_SETTER_GENERIC_ATTRIBUTE(attributeDatatype, attributeName)\
331 DLL_IMPORT_OR_EXPORT virtual void set##attributeName(const attributeDatatype & value) = 0;\
332 DLL_IMPORT_OR_EXPORT virtual attributeDatatype get##attributeName() const = 0;
333
340#define FINAL_GETTER_AND_SETTER_GENERIC_ATTRIBUTE(attributeDatatype, attributeName)\
341 DLL_IMPORT_OR_EXPORT void set##attributeName(const attributeDatatype & value) final;\
342 DLL_IMPORT_OR_EXPORT attributeDatatype get##attributeName() const final;
343
350#define GETTER_AND_SETTER_GENERIC_ATTRIBUTE(attributeDatatype, attributeName)\
351 DLL_IMPORT_OR_EXPORT void set##attributeName(const attributeDatatype & value);\
352 DLL_IMPORT_OR_EXPORT attributeDatatype get##attributeName() const;
353
361#define GETTER_AND_SETTER_GENERIC_ATTRIBUTE_IMPL(attributeDatatype, className, attributeName)\
362 void GLUE(,className)::set##attributeName(const attributeDatatype & value) { static_cast<witsml21__##className*>(gsoapProxy2_3)->attributeName = value; }\
363 attributeDatatype GLUE(,className)::get##attributeName() const { return static_cast<witsml21__##className*>(gsoapProxy2_3)->attributeName; }
364
372#define ABSTRACT_GETTER_AND_SETTER_GENERIC_ATTRIBUTE_IN_VECTOR(attributeDatatype, vectorName, attributeName)\
373 DLL_IMPORT_OR_EXPORT virtual void set##vectorName##attributeName(unsigned int index, const attributeDatatype & value) = 0;\
374 DLL_IMPORT_OR_EXPORT virtual attributeDatatype get##vectorName##attributeName(unsigned int index) const = 0;
375
383#define FINAL_GETTER_AND_SETTER_GENERIC_ATTRIBUTE_IN_VECTOR(attributeDatatype, vectorName, attributeName)\
384 DLL_IMPORT_OR_EXPORT void set##vectorName##attributeName(unsigned int index, const attributeDatatype & value) final;\
385 DLL_IMPORT_OR_EXPORT attributeDatatype get##vectorName##attributeName(unsigned int index) const final;
386
394#define GETTER_AND_SETTER_GENERIC_ATTRIBUTE_IN_VECTOR(attributeDatatype, vectorName, attributeName)\
395 DLL_IMPORT_OR_EXPORT void set##vectorName##attributeName(unsigned int index, const attributeDatatype & value);\
396 DLL_IMPORT_OR_EXPORT attributeDatatype get##vectorName##attributeName(unsigned int index) const;
397
406#define GETTER_AND_SETTER_GENERIC_ATTRIBUTE_IN_VECTOR_IMPL(attributeDatatype, className, vectorName, attributeName)\
407 void GLUE(,className)::set##vectorName##attributeName(unsigned int index, const attributeDatatype & value) {\
408 static_cast<witsml21__##className*>(gsoapProxy2_3)->vectorName.at(index)->attributeName = value;\
409 }\
410 attributeDatatype GLUE(,className)::get##vectorName##attributeName(unsigned int index) const {\
411 return static_cast<witsml21__##className*>(gsoapProxy2_3)->vectorName.at(index)->attributeName;\
412 }
413
420#define ABSTRACT_GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE(attributeDatatype, attributeName)\
421 ABSTRACT_GETTER_AND_SETTER_GENERIC_ATTRIBUTE(attributeDatatype, attributeName)\
422 ABSTRACT_GETTER_PRESENCE_ATTRIBUTE(attributeName)
423
430#define FINAL_GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE(attributeDatatype, attributeName)\
431 FINAL_GETTER_AND_SETTER_GENERIC_ATTRIBUTE(attributeDatatype, attributeName)\
432 FINAL_GETTER_PRESENCE_ATTRIBUTE(attributeName)
433
440#define GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE(attributeDatatype, attributeName)\
441 GETTER_AND_SETTER_GENERIC_ATTRIBUTE(attributeDatatype, attributeName)\
442 GETTER_PRESENCE_ATTRIBUTE(attributeName)
443
452#define GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE_IMPL(attributeDatatype, className, attributeName, constructor)\
453 void GLUE(,className)::set##attributeName(const attributeDatatype & attributeName) {\
454 CREATE_ATTRIBUTE_IF_NOT_PRESENT(className, attributeName, constructor)\
455 *static_cast<witsml21__##className*>(gsoapProxy2_3)->attributeName = attributeName;\
456 }\
457 GETTER_PRESENCE_ATTRIBUTE_IMPL(className, attributeName)\
458 attributeDatatype GLUE(,className)::get##attributeName() const {\
459 CHECK_ATTRIBUTE_EXISTENCE(className, attributeName)\
460 return *static_cast<witsml21__##className*>(gsoapProxy2_3)->attributeName;\
461 }
462
470#define ABSTRACT_GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE_IN_VECTOR(attributeDatatype, vectorName, attributeName)\
471 ABSTRACT_GETTER_AND_SETTER_GENERIC_ATTRIBUTE_IN_VECTOR(attributeDatatype, vectorName, attributeName)\
472 ABSTRACT_GETTER_PRESENCE_ATTRIBUTE_IN_VECTOR(vectorName, attributeName)
473
481#define FINAL_GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE_IN_VECTOR(attributeDatatype, vectorName, attributeName)\
482 FINAL_GETTER_AND_SETTER_GENERIC_ATTRIBUTE_IN_VECTOR(attributeDatatype, vectorName, attributeName)\
483 FINAL_GETTER_PRESENCE_ATTRIBUTE_IN_VECTOR(vectorName, attributeName)
491#define GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE_IN_VECTOR(attributeDatatype, vectorName, attributeName)\
492 GETTER_AND_SETTER_GENERIC_ATTRIBUTE_IN_VECTOR(attributeDatatype, vectorName, attributeName)\
493 GETTER_PRESENCE_ATTRIBUTE_IN_VECTOR(vectorName, attributeName)
494
504#define GETTER_AND_SETTER_GENERIC_OPTIONAL_ATTRIBUTE_IN_VECTOR_IMPL(attributeDatatype, className, vectorName, attributeName, constructor)\
505 void GLUE(,className)::set##vectorName##attributeName(unsigned int index, const attributeDatatype & value) {\
506 CREATE_ATTRIBUTE_IN_VECTOR_IF_NOT_PRESENT(className, vectorName, attributeName, constructor)\
507 *static_cast<witsml21__##className*>(gsoapProxy2_3)->vectorName[index]->attributeName = value;\
508 }\
509 GETTER_PRESENCE_ATTRIBUTE_IN_VECTOR_IMPL(className, vectorName, attributeName)\
510 attributeDatatype GLUE(,className)::get##vectorName##attributeName(unsigned int index) const {\
511 CHECK_ATTRIBUTE_IN_VECTOR_EXISTENCE(className, vectorName, attributeName)\
512 return *static_cast<witsml21__##className*>(gsoapProxy2_3)->vectorName[index]->attributeName;\
513 }
514
521#define GETTER_AND_SETTER_TIME_T_OPTIONAL_ATTRIBUTE_IMPL(className, attributeName)\
522 void GLUE(,className)::set##attributeName(const time_t & attributeName) {\
523 CREATE_ATTRIBUTE_IF_NOT_PRESENT(className, attributeName, gsoap_eml2_3::soap_new_tm)\
524 *static_cast<witsml21__##className*>(gsoapProxy2_3)->attributeName = timeTools::to_calendar_time(timeTools::from_time_t(attributeName));\
525 }\
526 GETTER_PRESENCE_ATTRIBUTE_IMPL(className, attributeName)\
527 time_t GLUE(,className)::get##attributeName() const {\
528 CHECK_ATTRIBUTE_EXISTENCE(className, attributeName)\
529 return timeTools::timegm(*static_cast<witsml21__##className*>(gsoapProxy2_3)->attributeName);\
530 }
531
539#define GETTER_AND_SETTER_TIME_T_ATTRIBUTE_IN_VECTOR_IMPL(className, vectorName, attributeName)\
540 void GLUE(,className)::set##vectorName##attributeName(unsigned int index, const time_t & attributeName) {\
541 static_cast<witsml21__##className*>(gsoapProxy2_3)->vectorName.at(index)->attributeName = timeTools::to_calendar_time(timeTools::from_time_t(attributeName));\
542 }\
543 time_t GLUE(,className)::get##vectorName##attributeName(unsigned int index) const {\
544 return timeTools::timegm(static_cast<witsml21__##className*>(gsoapProxy2_3)->vectorName.at(index)->attributeName);\
545 }
546
554#define GETTER_AND_SETTER_TIME_T_OPTIONAL_ATTRIBUTE_IN_VECTOR_IMPL(className, vectorName, attributeName)\
555 void GLUE(,className)::set##vectorName##attributeName(unsigned int index, const time_t & attributeName) {\
556 *static_cast<witsml21__##className*>(gsoapProxy2_3)->vectorName.at(index)->attributeName = timeTools::to_calendar_time(timeTools::from_time_t(attributeName));\
557 }\
558 time_t GLUE(,className)::get##vectorName##attributeName(unsigned int index) const {\
559 return timeTools::timegm(*static_cast<witsml21__##className*>(gsoapProxy2_3)->vectorName.at(index)->attributeName);\
560 }\
561 GETTER_PRESENCE_ATTRIBUTE_IN_VECTOR_IMPL(className, vectorName, attributeName)
562
569#define ABSTRACT_GETTER_AND_SETTER_MEASURE_ATTRIBUTE(attributeName, uomDatatype)\
570 DLL_IMPORT_OR_EXPORT virtual void set##attributeName(double value, uomDatatype uom) = 0;\
571 DLL_IMPORT_OR_EXPORT virtual double get##attributeName##Value() const = 0;\
572 DLL_IMPORT_OR_EXPORT virtual uomDatatype get##attributeName##Uom() const = 0;\
573 DLL_IMPORT_OR_EXPORT virtual std::string get##attributeName##UomAsString() const = 0;
574
581#define FINAL_GETTER_AND_SETTER_MEASURE_ATTRIBUTE(attributeName, uomDatatype)\
582 DLL_IMPORT_OR_EXPORT void set##attributeName(double value, uomDatatype uom) final;\
583 DLL_IMPORT_OR_EXPORT double get##attributeName##Value() const final;\
584 DLL_IMPORT_OR_EXPORT uomDatatype get##attributeName##Uom() const final;\
585 DLL_IMPORT_OR_EXPORT std::string get##attributeName##UomAsString() const final;
586
593#define GETTER_AND_SETTER_MEASURE_ATTRIBUTE(attributeName, uomDatatype)\
594 DLL_IMPORT_OR_EXPORT void set##attributeName(double value, uomDatatype uom);\
595 DLL_IMPORT_OR_EXPORT double get##attributeName##Value() const;\
596 DLL_IMPORT_OR_EXPORT uomDatatype get##attributeName##Uom() const;\
597 DLL_IMPORT_OR_EXPORT std::string get##attributeName##UomAsString() const;
598
605#define ABSTRACT_GETTER_AND_SETTER_MEASURE_OPTIONAL_ATTRIBUTE(attributeName, uomDatatype)\
606 ABSTRACT_GETTER_AND_SETTER_MEASURE_ATTRIBUTE(attributeName, uomDatatype)\
607 ABSTRACT_GETTER_PRESENCE_ATTRIBUTE(attributeName)
608
615#define FINAL_GETTER_AND_SETTER_MEASURE_OPTIONAL_ATTRIBUTE(attributeName, uomDatatype)\
616 FINAL_GETTER_AND_SETTER_MEASURE_ATTRIBUTE(attributeName, uomDatatype)\
617 FINAL_GETTER_PRESENCE_ATTRIBUTE(attributeName)
618
625#define GETTER_AND_SETTER_MEASURE_OPTIONAL_ATTRIBUTE(attributeName, uomDatatype)\
626 GETTER_AND_SETTER_MEASURE_ATTRIBUTE(attributeName, uomDatatype)\
627 GETTER_PRESENCE_ATTRIBUTE(attributeName)
628
635#define ABSTRACT_GETTER_AND_SETTER_DEPTH_MEASURE_ATTRIBUTE(attributeName, uomDatatype)\
636 DLL_IMPORT_OR_EXPORT virtual void set##attributeName(double value, uomDatatype uom) = 0;\
637 DLL_IMPORT_OR_EXPORT virtual double get##attributeName##Value() const = 0;\
638 DLL_IMPORT_OR_EXPORT virtual uomDatatype get##attributeName##Uom() const = 0;
639
646#define FINAL_GETTER_AND_SETTER_DEPTH_MEASURE_ATTRIBUTE(attributeName, uomDatatype)\
647 DLL_IMPORT_OR_EXPORT void set##attributeName(double value, uomDatatype uom) final;\
648 DLL_IMPORT_OR_EXPORT double get##attributeName##Value() const final;\
649 DLL_IMPORT_OR_EXPORT uomDatatype get##attributeName##Uom() const final;
650
657#define GETTER_AND_SETTER_DEPTH_MEASURE_ATTRIBUTE(attributeName, uomDatatype)\
658 DLL_IMPORT_OR_EXPORT void set##attributeName(double value, uomDatatype uom);\
659 DLL_IMPORT_OR_EXPORT double get##attributeName##Value() const;\
660 DLL_IMPORT_OR_EXPORT uomDatatype get##attributeName##Uom() const;
661
668#define ABSTRACT_GETTER_AND_SETTER_DEPTH_MEASURE_OPTIONAL_ATTRIBUTE(attributeName, uomDatatype)\
669 ABSTRACT_GETTER_AND_SETTER_DEPTH_MEASURE_ATTRIBUTE(attributeName, uomDatatype)\
670 ABSTRACT_GETTER_PRESENCE_ATTRIBUTE(attributeName)
671
678#define FINAL_GETTER_AND_SETTER_DEPTH_MEASURE_OPTIONAL_ATTRIBUTE(attributeName, uomDatatype)\
679 FINAL_GETTER_AND_SETTER_DEPTH_MEASURE_ATTRIBUTE(attributeName, uomDatatype)\
680 FINAL_GETTER_PRESENCE_ATTRIBUTE(attributeName)
681
688#define GETTER_AND_SETTER_DEPTH_MEASURE_OPTIONAL_ATTRIBUTE(attributeName, uomDatatype)\
689 GETTER_AND_SETTER_DEPTH_MEASURE_ATTRIBUTE(attributeName, uomDatatype)\
690 GETTER_PRESENCE_ATTRIBUTE(attributeName)
691
699#define ABSTRACT_GETTER_AND_SETTER_MEASURE_ATTRIBUTE_IN_VECTOR(vectorName, attributeName, uomDatatype)\
700 DLL_IMPORT_OR_EXPORT virtual void set##vectorName##attributeName(unsigned int index, double value, uomDatatype uom) = 0;\
701 DLL_IMPORT_OR_EXPORT virtual double get##vectorName##attributeName##Value(unsigned int index) const = 0;\
702 DLL_IMPORT_OR_EXPORT virtual uomDatatype get##vectorName##attributeName##Uom(unsigned int index) const = 0;
703
711#define FINAL_GETTER_AND_SETTER_MEASURE_ATTRIBUTE_IN_VECTOR(vectorName, attributeName, uomDatatype)\
712 DLL_IMPORT_OR_EXPORT void set##vectorName##attributeName(unsigned int index, double value, uomDatatype uom) final;\
713 DLL_IMPORT_OR_EXPORT double get##vectorName##attributeName##Value(unsigned int index) const final;\
714 DLL_IMPORT_OR_EXPORT uomDatatype get##vectorName##attributeName##Uom(unsigned int index) const final;
715
723#define GETTER_AND_SETTER_MEASURE_ATTRIBUTE_IN_VECTOR(vectorName, attributeName, uomDatatype)\
724 DLL_IMPORT_OR_EXPORT void set##vectorName##attributeName(unsigned int index, double value, uomDatatype uom);\
725 DLL_IMPORT_OR_EXPORT double get##vectorName##attributeName##Value(unsigned int index) const;\
726 DLL_IMPORT_OR_EXPORT uomDatatype get##vectorName##attributeName##Uom(unsigned int index) const;
727
735#define ABSTRACT_GETTER_AND_SETTER_MEASURE_OPTIONAL_ATTRIBUTE_IN_VECTOR(vectorName, attributeName, uomDatatype)\
736 ABSTRACT_GETTER_AND_SETTER_MEASURE_ATTRIBUTE_IN_VECTOR(vectorName, attributeName, uomDatatype)\
737 ABSTRACT_GETTER_PRESENCE_ATTRIBUTE_IN_VECTOR(vectorName, attributeName)
738
746#define FINAL_GETTER_AND_SETTER_MEASURE_OPTIONAL_ATTRIBUTE_IN_VECTOR(vectorName, attributeName, uomDatatype)\
747 FINAL_GETTER_AND_SETTER_MEASURE_ATTRIBUTE_IN_VECTOR(vectorName, attributeName, uomDatatype)\
748 FINAL_GETTER_PRESENCE_ATTRIBUTE_IN_VECTOR(vectorName, attributeName)
749
757#define GETTER_AND_SETTER_MEASURE_OPTIONAL_ATTRIBUTE_IN_VECTOR(vectorName, attributeName, uomDatatype)\
758 GETTER_AND_SETTER_MEASURE_ATTRIBUTE_IN_VECTOR(vectorName, attributeName, uomDatatype)\
759 GETTER_PRESENCE_ATTRIBUTE_IN_VECTOR(vectorName, attributeName)
760
768#define ABSTRACT_GETTER_AND_SETTER_DEPTH_MEASURE_ATTRIBUTE_IN_VECTOR(vectorName, attributeName, uomDatatype)\
769 DLL_IMPORT_OR_EXPORT virtual void set##vectorName##attributeName(unsigned int index, double value, uomDatatype uom) = 0;\
770 DLL_IMPORT_OR_EXPORT virtual double get##vectorName##attributeName##Value(unsigned int index) const = 0;\
771 DLL_IMPORT_OR_EXPORT virtual uomDatatype get##vectorName##attributeName##Uom(unsigned int index) const = 0;
772
780#define FINAL_GETTER_AND_SETTER_DEPTH_MEASURE_ATTRIBUTE_IN_VECTOR(vectorName, attributeName, uomDatatype)\
781 DLL_IMPORT_OR_EXPORT void set##vectorName##attributeName(unsigned int index, double value, uomDatatype uom) final;\
782 DLL_IMPORT_OR_EXPORT double get##vectorName##attributeName##Value(unsigned int index) const final;\
783 DLL_IMPORT_OR_EXPORT uomDatatype get##vectorName##attributeName##Uom(unsigned int index) const final;
784
792#define GETTER_AND_SETTER_DEPTH_MEASURE_ATTRIBUTE_IN_VECTOR(vectorName, attributeName, uomDatatype)\
793 DLL_IMPORT_OR_EXPORT void set##vectorName##attributeName(unsigned int index, double value, uomDatatype uom, const std::string & datum);\
794 DLL_IMPORT_OR_EXPORT double get##vectorName##attributeName##Value(unsigned int index) const;\
795 DLL_IMPORT_OR_EXPORT uomDatatype get##vectorName##attributeName##Uom(unsigned int index) const;\
796 DLL_IMPORT_OR_EXPORT std::string get##vectorName##attributeName##Datum(unsigned int index) const;
797
805#define ABSTRACT_GETTER_AND_SETTER_DEPTH_MEASURE_OPTIONAL_ATTRIBUTE_IN_VECTOR(vectorName, attributeName, uomDatatype)\
806 ABSTRACT_GETTER_AND_SETTER_DEPTH_MEASURE_ATTRIBUTE_IN_VECTOR(vectorName, attributeName, uomDatatype)\
807 ABSTRACT_GETTER_PRESENCE_ATTRIBUTE_IN_VECTOR(vectorName, attributeName)
808
816#define FINAL_GETTER_AND_SETTER_DEPTH_MEASURE_OPTIONAL_ATTRIBUTE_IN_VECTOR(vectorName, attributeName, uomDatatype)\
817 FINAL_GETTER_AND_SETTER_DEPTH_MEASURE_ATTRIBUTE_IN_VECTOR(vectorName, attributeName, uomDatatype)\
818 FINAL_GETTER_PRESENCE_ATTRIBUTE_IN_VECTOR(vectorName, attributeName)
819
827#define GETTER_AND_SETTER_DEPTH_MEASURE_OPTIONAL_ATTRIBUTE_IN_VECTOR(vectorName, attributeName, uomDatatype)\
828 GETTER_AND_SETTER_DEPTH_MEASURE_ATTRIBUTE_IN_VECTOR(vectorName, attributeName, uomDatatype)\
829 GETTER_PRESENCE_ATTRIBUTE_IN_VECTOR(vectorName, attributeName)
830
837#define GETTER_VALUE_OF_MEASURE_ATTRIBUTE_IMPL(className, attributeName)\
838 double GLUE(,className)::get##attributeName##Value() const {\
839 if (!has##attributeName()) { throw invalid_argument("The measure attribute to get does not exist."); }\
840 return static_cast<witsml21__##className*>(gsoapProxy2_3)->attributeName->__item;\
841 }
842
850#define GETTER_UOM_OF_MEASURE_ATTRIBUTE_IMPL(className, attributeName, uomDatatype)\
851 uomDatatype GLUE(, className)::get##attributeName##Uom() const {\
852 if (!has##attributeName()) { throw invalid_argument("The measure attribute to get does not exist."); }\
853 return static_cast<witsml21__##className*>(gsoapProxy2_3)->attributeName->uom;\
854 }
855
863#define GETTER_UOM_OF_MEASURE_AS_STRING_ATTRIBUTE_IMPL(className, attributeName, uomDatatypeStringConversion)\
864 std::string GLUE(, className)::get##attributeName##UomAsString() const {\
865 return uomDatatypeStringConversion(gsoapProxy2_3->soap, get##attributeName##Uom());\
866 }
867
876#define GETTER_AND_SETTER_MEASURE_ATTRIBUTE_IMPL(className, attributeName, uomDatatype, uomDatatypeStringConversion, constructor)\
877 void GLUE(,className)::set##attributeName(double value, uomDatatype uom) {\
878 if (value != value) { throw invalid_argument("You cannot set an undefined measure"); }\
879 CREATE_ATTRIBUTE_IF_NOT_PRESENT(className, attributeName, constructor)\
880 static_cast<witsml21__##className*>(gsoapProxy2_3)->attributeName->__item = value;\
881 static_cast<witsml21__##className*>(gsoapProxy2_3)->attributeName->uom = uom;\
882 }\
883 GETTER_VALUE_OF_MEASURE_ATTRIBUTE_IMPL(className, attributeName)\
884 GETTER_UOM_OF_MEASURE_ATTRIBUTE_IMPL(className, attributeName, uomDatatype)\
885 GETTER_UOM_OF_MEASURE_AS_STRING_ATTRIBUTE_IMPL(className, attributeName, uomDatatypeStringConversion)
886
895#define GETTER_AND_SETTER_MEASURED_DEPTH_ATTRIBUTE_IMPL(className, attributeName, uomDatatype, constructor)\
896 void GLUE(,className)::set##attributeName(double value, uomDatatype uom) {\
897 if (value != value) { throw invalid_argument("You cannot set an undefined depth measure"); }\
898 CREATE_ATTRIBUTE_IF_NOT_PRESENT(className, attributeName, constructor)\
899 if (static_cast<witsml21__##className*>(gsoapProxy2_3)->attributeName->MeasuredDepth == nullptr) {\
900 static_cast<witsml21__##className*>(gsoapProxy2_3)->attributeName->MeasuredDepth = gsoap_eml2_3::soap_new_eml23__LengthMeasureExt(gsoapProxy2_3->soap); }\
901 static_cast<witsml21__##className*>(gsoapProxy2_3)->attributeName->MeasuredDepth->__item = value;\
902 static_cast<witsml21__##className*>(gsoapProxy2_3)->attributeName->MeasuredDepth->uom = gsoap_eml2_3::soap_eml23__LengthUom2s(gsoapProxy2_3->soap, uom);\
903 }\
904 double GLUE(,className)::get##attributeName##Value() const {\
905 if (!has##attributeName()) { throw invalid_argument("The measure attribute to get does not exist."); }\
906 return static_cast<witsml21__##className*>(gsoapProxy2_3)->attributeName->MeasuredDepth->__item;\
907 }\
908 uomDatatype GLUE(, className)::get##attributeName##Uom() const {\
909 if (!has##attributeName()) { throw invalid_argument("The measure attribute to get does not exist."); }\
910 gsoap_eml2_3::eml23__LengthUom result;\
911 gsoap_eml2_3::soap_s2eml23__LengthUom(gsoapProxy2_3->soap, static_cast<witsml21__##className*>(gsoapProxy2_3)->attributeName->MeasuredDepth->uom.c_str(), &result);\
912 return result;\
913 }
914
923#define GETTER_AND_SETTER_MEASURE_OPTIONAL_ATTRIBUTE_IMPL(className, attributeName, uomDatatype, uomDatatypeStringConversion, constructor)\
924 GETTER_AND_SETTER_MEASURE_ATTRIBUTE_IMPL(className, attributeName, uomDatatype, uomDatatypeStringConversion, constructor)\
925 GETTER_PRESENCE_ATTRIBUTE_IMPL(className, attributeName)
926
935#define GETTER_AND_SETTER_MEASURED_DEPTH_OPTIONAL_ATTRIBUTE_IMPL(className, attributeName, uomDatatype, constructor)\
936 GETTER_AND_SETTER_MEASURED_DEPTH_ATTRIBUTE_IMPL(className, attributeName, uomDatatype, constructor)\
937 GETTER_PRESENCE_ATTRIBUTE_IMPL(className, attributeName)
938
946#define GETTER_VALUE_OF_MEASURE_ATTRIBUTE_IN_VECTOR_IMPL(className, vectorName, attributeName)\
947 double GLUE(,className)::get##vectorName##attributeName##Value(unsigned int index) const {\
948 CHECK_ATTRIBUTE_IN_VECTOR_EXISTENCE(className, vectorName, attributeName)\
949 return static_cast<witsml21__##className*>(gsoapProxy2_3)->vectorName[index]->attributeName->__item;\
950 }
951
960#define GETTER_UOM_OF_MEASURE_ATTRIBUTE_IN_VECTOR_IMPL(className, vectorName, attributeName, uomDatatype)\
961 uomDatatype GLUE(,className)::get##vectorName##attributeName##Uom(unsigned int index) const {\
962 CHECK_ATTRIBUTE_IN_VECTOR_EXISTENCE(className, vectorName, attributeName)\
963 return static_cast<witsml21__##className*>(gsoapProxy2_3)->vectorName[index]->attributeName->uom;\
964 }
965
975#define GETTER_AND_SETTER_MEASURE_ATTRIBUTE_IN_VECTOR_IMPL(className, vectorName, attributeName, uomDatatype, constructor)\
976 void GLUE(,className)::set##vectorName##attributeName(unsigned int index, double value, uomDatatype uom) {\
977 if (value != value) { throw invalid_argument("You cannot set an undefined measured depth coord"); }\
978 CREATE_ATTRIBUTE_IN_VECTOR_IF_NOT_PRESENT(className, vectorName, attributeName, constructor)\
979 static_cast<witsml21__##className*>(gsoapProxy2_3)->vectorName[index]->attributeName->__item = value;\
980 static_cast<witsml21__##className*>(gsoapProxy2_3)->vectorName[index]->attributeName->uom = uom;\
981 }\
982 GETTER_VALUE_OF_MEASURE_ATTRIBUTE_IN_VECTOR_IMPL(className, vectorName, attributeName)\
983 GETTER_UOM_OF_MEASURE_ATTRIBUTE_IN_VECTOR_IMPL(className, vectorName, attributeName, uomDatatype)
984
994#define GETTER_AND_SETTER_MEASURED_DEPTH_ATTRIBUTE_IN_VECTOR_IMPL(className, vectorName, attributeName, uomDatatype, constructor)\
995 void GLUE(,className)::set##vectorName##attributeName(unsigned int index, double value, uomDatatype uom) {\
996 if (value != value) { throw invalid_argument("You cannot set an undefined measured depth coord"); }\
997 CREATE_ATTRIBUTE_IN_VECTOR_IF_NOT_PRESENT(className, vectorName, attributeName, constructor)\
998 if (static_cast<witsml21__Trajectory*>(gsoapProxy2_3)->TrajectoryStation[index]->Md->MeasuredDepth == nullptr) {\
999 static_cast<witsml21__Trajectory*>(gsoapProxy2_3)->TrajectoryStation[index]->Md->MeasuredDepth = gsoap_eml2_3::soap_new_eml23__LengthMeasureExt(gsoapProxy2_3->soap); }\
1000 static_cast<witsml21__##className*>(gsoapProxy2_3)->vectorName[index]->attributeName->MeasuredDepth->__item = value;\
1001 static_cast<witsml21__##className*>(gsoapProxy2_3)->vectorName[index]->attributeName->MeasuredDepth->uom = gsoap_eml2_3::soap_eml23__LengthUom2s(gsoapProxy2_3->soap, uom);\
1002 }\
1003 double GLUE(,className)::get##vectorName##attributeName##Value(unsigned int index) const {\
1004 CHECK_ATTRIBUTE_IN_VECTOR_EXISTENCE(className, vectorName, attributeName)\
1005 return static_cast<witsml21__##className*>(gsoapProxy2_3)->vectorName[index]->attributeName->MeasuredDepth->__item;\
1006 }\
1007 uomDatatype GLUE(,className)::get##vectorName##attributeName##Uom(unsigned int index) const {\
1008 CHECK_ATTRIBUTE_IN_VECTOR_EXISTENCE(className, vectorName, attributeName)\
1009 gsoap_eml2_3::eml23__LengthUom result;\
1010 gsoap_eml2_3::soap_s2eml23__LengthUom(gsoapProxy2_3->soap, static_cast<witsml21__##className*>(gsoapProxy2_3)->vectorName[index]->attributeName->MeasuredDepth->uom.c_str(), &result);\
1011 return result;\
1012 }
1013
1023#define GETTER_AND_SETTER_MEASURE_OPTIONAL_ATTRIBUTE_IN_VECTOR_IMPL(className, vectorName, attributeName, uomDatatype, constructor)\
1024 GETTER_AND_SETTER_MEASURE_ATTRIBUTE_IN_VECTOR_IMPL(className, vectorName, attributeName, uomDatatype, constructor)\
1025 GETTER_PRESENCE_ATTRIBUTE_IN_VECTOR_IMPL(className, vectorName, attributeName)
1026
1037#define GETTER_AND_SETTER_MEASURED_DEPTH_OPTIONAL_ATTRIBUTE_IN_VECTOR_IMPL(className, vectorName, attributeName, uomDatatype, constructor)\
1038 GETTER_AND_SETTER_MEASURED_DEPTH_ATTRIBUTE_IN_VECTOR_IMPL(className, vectorName, attributeName, uomDatatype, constructor)\
1039 GETTER_PRESENCE_ATTRIBUTE_IN_VECTOR_IMPL(className, vectorName, attributeName)