Fesapi 2.3.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
ChannelSet.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
21#include "ChannelIndexDataObject.h"
22
23namespace WITSML2_0_NS
24{
29 class ChannelSet : public ChannelIndexDataObject<gsoap_eml2_1::witsml20__ChannelSet>
30 {
31 public:
32
38 DLL_IMPORT_OR_EXPORT ChannelSet(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : ChannelIndexDataObject<gsoap_eml2_1::witsml20__ChannelSet>(partialObject) {}
39
47 ChannelSet(COMMON_NS::DataObjectRepository* repo, const std::string & guid, const std::string & title);
48
54 ChannelSet(gsoap_eml2_1::witsml20__ChannelSet* fromGsoap) : ChannelIndexDataObject<gsoap_eml2_1::witsml20__ChannelSet>(fromGsoap) {}
55
57 ~ChannelSet() = default;
58
68 DLL_IMPORT_OR_EXPORT void pushBackChannelIndex(gsoap_eml2_1::witsml20__ChannelIndexType indexType, gsoap_eml2_1::eml21__UnitOfMeasure uom, const std::string & mnemonic, bool isIncreasing = true, const std::string & datum = "");
69
75 DLL_IMPORT_OR_EXPORT void pushBackChannel(class Channel * channel);
76
82 DLL_IMPORT_OR_EXPORT void setDataAsJsonArray(const std::string & jsonArray);
83
89 DLL_IMPORT_OR_EXPORT void setDataAsFileUri(const std::string & fileUri);
90
96 DLL_IMPORT_OR_EXPORT bool hasDataAsJsonArray() const;
97
103 DLL_IMPORT_OR_EXPORT bool hasDataAsFileUri() const;
104
110 DLL_IMPORT_OR_EXPORT const std::string & getDataAsJsonArray() const;
111
117 DLL_IMPORT_OR_EXPORT const std::string & getDataAsFileUri() const;
118
124 DLL_IMPORT_OR_EXPORT std::vector<class Log*> getLogs() const;
125
131 DLL_IMPORT_OR_EXPORT std::vector<class Channel*> getChannels() const;
132
139#define SETTER_GENERIC_OPTIONAL_ATTRIBUTE(attributeDatatype, attributeName)\
140 DLL_IMPORT_OR_EXPORT void set##attributeName(const attributeDatatype & attributeName);
141
142 SETTER_GENERIC_OPTIONAL_ATTRIBUTE(std::string, TimeDepth)
143 SETTER_GENERIC_OPTIONAL_ATTRIBUTE(std::string, RunNumber)
144 SETTER_GENERIC_OPTIONAL_ATTRIBUTE(std::string, PassNumber)
145 SETTER_GENERIC_OPTIONAL_ATTRIBUTE(std::string, LoggingCompanyName)
146 SETTER_GENERIC_OPTIONAL_ATTRIBUTE(std::string, LoggingCompanyCode)
147 SETTER_GENERIC_OPTIONAL_ATTRIBUTE(std::string, ToolName)
148 SETTER_GENERIC_OPTIONAL_ATTRIBUTE(std::string, ToolClass)
149
150
155 DLL_IMPORT_OR_EXPORT static const char* XML_TAG;
156
162 DLL_IMPORT_OR_EXPORT virtual std::string getXmlTag() const { return XML_TAG; }
163
166
170 DLL_IMPORT_OR_EXPORT static constexpr char const* XML_NS = "witsml20";
171
175 DLL_IMPORT_OR_EXPORT std::string getXmlNamespace() const final { return XML_NS; }
176 };
177}
Definition: Channel.h:29
Definition: ChannelIndexDataObject.h:36
Definition: ChannelSet.h:30
void pushBackChannelIndex(gsoap_eml2_1::witsml20__ChannelIndexType indexType, gsoap_eml2_1::eml21__UnitOfMeasure uom, const std::string &mnemonic, bool isIncreasing=true, const std::string &datum="")
bool hasDataAsJsonArray() const
const std::string & getDataAsJsonArray() const
ChannelSet(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition: ChannelSet.h:38
ChannelSet(gsoap_eml2_1::witsml20__ChannelSet *fromGsoap)
Definition: ChannelSet.h:54
bool hasDataAsFileUri() const
void loadTargetRelationships() final
ChannelSet(common::DataObjectRepository *repo, const std::string &guid, const std::string &title)
void pushBackChannel(class Channel *channel)
std::vector< class Channel * > getChannels() const
void setDataAsFileUri(const std::string &fileUri)
const std::string & getDataAsFileUri() const
std::vector< class Log * > getLogs() const
void setDataAsJsonArray(const std::string &jsonArray)