21 #include "../proxies/gsoap_resqml2_0_1H.h"
22 #include "../proxies/gsoap_eml2_1H.h"
23 #include "../proxies/gsoap_eml2_2H.h"
24 #include "../proxies/gsoap_eml2_3H.h"
26 #include "../nsDefinitions.h"
28 #if defined(_WIN32) && !defined(FESAPI_STATIC)
29 #if defined(FesapiCpp_EXPORTS) || defined(FesapiCppUnderDev_EXPORTS)
30 #define DLL_IMPORT_OR_EXPORT __declspec(dllexport)
32 #define DLL_IMPORT_OR_EXPORT __declspec(dllimport)
35 #define DLL_IMPORT_OR_EXPORT
54 DataObjectReference(gsoap_resqml2_0_1::eml20__DataObjectReference * dor): dor20(dor), dor21(nullptr), dor22(nullptr), dor23(nullptr) {}
61 DataObjectReference(gsoap_eml2_1::eml21__DataObjectReference * dor) : dor20(nullptr), dor21(dor), dor22(nullptr), dor23(nullptr) {}
68 DataObjectReference(gsoap_eml2_2::eml22__DataObjectReference * dor) : dor20(nullptr), dor21(nullptr), dor22(dor), dor23(nullptr) {}
75 DataObjectReference(gsoap_eml2_3::eml23__DataObjectReference * dor) : dor20(nullptr), dor21(nullptr), dor22(nullptr), dor23(dor) {}
92 DLL_IMPORT_OR_EXPORT
bool isEmpty()
const {
93 return dor20 ==
nullptr && dor21 ==
nullptr && dor22 ==
nullptr && dor23 ==
nullptr;
101 DLL_IMPORT_OR_EXPORT std::string
getUuid()
const {
102 if (dor20 !=
nullptr) {
105 else if (dor21 !=
nullptr) {
108 else if (dor22 !=
nullptr) {
111 else if (dor23 !=
nullptr) {
124 DLL_IMPORT_OR_EXPORT std::string
getTitle()
const {
125 if (dor20 !=
nullptr) {
128 else if (dor21 !=
nullptr) {
131 else if (dor22 !=
nullptr) {
134 else if (dor23 !=
nullptr) {
148 if (dor20 !=
nullptr) {
149 return dor20->VersionString !=
nullptr ? *dor20->VersionString :
"";
151 else if (dor21 !=
nullptr) {
152 return dor21->VersionString !=
nullptr ? *dor21->VersionString :
"";
154 else if (dor22 !=
nullptr) {
155 return dor22->ObjectVersion !=
nullptr ? *dor22->ObjectVersion :
"";
157 else if (dor23 !=
nullptr) {
158 return dor23->ObjectVersion !=
nullptr ? *dor23->ObjectVersion :
"";
171 if (dor20 !=
nullptr) {
172 return dor20->ContentType;
174 else if (dor21 !=
nullptr) {
175 return dor21->ContentType;
177 else if (dor22 !=
nullptr) {
178 return dor22->ContentType;
180 else if (dor23 !=
nullptr) {
181 return dor23->ContentType;
194 gsoap_resqml2_0_1::eml20__DataObjectReference*
toDor20()
const {
195 if (dor20 !=
nullptr) {
199 gsoap_resqml2_0_1::eml20__DataObjectReference* result =
nullptr;
200 if (dor21 !=
nullptr) {
201 result = gsoap_resqml2_0_1::soap_new_eml20__DataObjectReference(dor21->soap);
203 else if (dor22 !=
nullptr) {
204 result = gsoap_resqml2_0_1::soap_new_eml20__DataObjectReference(dor22->soap);
206 else if (dor23 !=
nullptr) {
207 result = gsoap_resqml2_0_1::soap_new_eml20__DataObjectReference(dor23->soap);
210 throw std::logic_error(
"The instance is in an inconsistent state.");
213 result->ContentType = getContentType();
214 result->Title = getTitle();
215 result->UUID = getUuid();
216 const std::string version = getVersion();
217 if (!version.empty()) {
218 result->VersionString = gsoap_resqml2_0_1::soap_new_std__string(result->soap);
219 result->VersionString->assign(version);
226 gsoap_resqml2_0_1::eml20__DataObjectReference* dor20;
227 gsoap_eml2_1::eml21__DataObjectReference* dor21;
228 gsoap_eml2_2::eml22__DataObjectReference* dor22;
229 gsoap_eml2_3::eml23__DataObjectReference* dor23;
An abstract data object.
Definition: AbstractObject.h:31
This class wraps an Energistics Data Object Reference whatever its version is.
Definition: DataObjectReference.h:43
DataObjectReference(gsoap_resqml2_0_1::eml20__DataObjectReference *dor)
Definition: DataObjectReference.h:54
bool isEmpty() const
Definition: DataObjectReference.h:92
std::string getUuid() const
Definition: DataObjectReference.h:101
DataObjectReference(gsoap_eml2_2::eml22__DataObjectReference *dor)
Definition: DataObjectReference.h:68
std::string getContentType() const
Definition: DataObjectReference.h:170
DataObjectReference(gsoap_eml2_3::eml23__DataObjectReference *dor)
Definition: DataObjectReference.h:75
DataObjectReference(AbstractObject const *dataObj)
DataObjectReference()
Definition: DataObjectReference.h:47
gsoap_resqml2_0_1::eml20__DataObjectReference * toDor20() const
Definition: DataObjectReference.h:194
~DataObjectReference()=default
DataObjectReference(gsoap_eml2_1::eml21__DataObjectReference *dor)
Definition: DataObjectReference.h:61
std::string getTitle() const
Definition: DataObjectReference.h:124
std::string getVersion() const
Definition: DataObjectReference.h:147
bool operator==(const DataObjectReference &ldor, const DataObjectReference &rdor)
Title is not part of the real identifier of a dataobject. This is just a hint.
Definition: DataObjectReference.h:240