Fesapi  2.0.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
ChannelSet.h
1 /*-----------------------------------------------------------------------
2 Licensed to the Apache Software Foundation (ASF) under one
3 or more contributor license agreements. See the NOTICE file
4 distributed with this work for additional information
5 regarding copyright ownership. The ASF licenses this file
6 to you under the Apache License, Version 2.0 (the
7 "License"; you may not use this file except in compliance
8 with the License. You may obtain a copy of the License at
9 
10 http://www.apache.org/licenses/LICENSE-2.0
11 
12 Unless required by applicable law or agreed to in writing,
13 software distributed under the License is distributed on an
14 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 KIND, either express or implied. See the License for the
16 specific language governing permissions and limitations
17 under the License.
18 -----------------------------------------------------------------------*/
19 #pragma once
20 
21 #include "ChannelIndexDataObject.h"
22 
23 namespace WITSML2_0_NS
24 {
29  class ChannelSet : public ChannelIndexDataObject<gsoap_eml2_1::witsml20__ChannelSet>
30  {
31  public:
32 
40  DLL_IMPORT_OR_EXPORT ChannelSet(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : ChannelIndexDataObject<gsoap_eml2_1::witsml20__ChannelSet>(partialObject) {}
41 
49  ChannelSet(COMMON_NS::DataObjectRepository* repo, const std::string & guid, const std::string & title);
50 
56  ChannelSet(gsoap_eml2_1::witsml20__ChannelSet* fromGsoap) : ChannelIndexDataObject<gsoap_eml2_1::witsml20__ChannelSet>(fromGsoap) {}
57 
59  ~ChannelSet() = default;
60 
70  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 = "");
71 
77  DLL_IMPORT_OR_EXPORT void pushBackChannel(class Channel * channel);
78 
84  DLL_IMPORT_OR_EXPORT void setDataAsJsonArray(const std::string & jsonArray);
85 
91  DLL_IMPORT_OR_EXPORT void setDataAsFileUri(const std::string & fileUri);
92 
98  DLL_IMPORT_OR_EXPORT bool hasDataAsJsonArray() const;
99 
105  DLL_IMPORT_OR_EXPORT bool hasDataAsFileUri() const;
106 
112  DLL_IMPORT_OR_EXPORT const std::string & getDataAsJsonArray() const;
113 
119  DLL_IMPORT_OR_EXPORT const std::string & getDataAsFileUri() const;
120 
126  DLL_IMPORT_OR_EXPORT std::vector<class Log*> getLogs() const;
127 
133  DLL_IMPORT_OR_EXPORT std::vector<class Channel*> getChannels() const;
134 
141 #define SETTER_GENERIC_OPTIONAL_ATTRIBUTE(attributeDatatype, attributeName)\
142  DLL_IMPORT_OR_EXPORT void set##attributeName(const attributeDatatype & attributeName);
143 
144  SETTER_GENERIC_OPTIONAL_ATTRIBUTE(std::string, TimeDepth)
145  SETTER_GENERIC_OPTIONAL_ATTRIBUTE(std::string, RunNumber)
146  SETTER_GENERIC_OPTIONAL_ATTRIBUTE(std::string, PassNumber)
147  SETTER_GENERIC_OPTIONAL_ATTRIBUTE(std::string, LoggingCompanyName)
148  SETTER_GENERIC_OPTIONAL_ATTRIBUTE(std::string, LoggingCompanyCode)
149  SETTER_GENERIC_OPTIONAL_ATTRIBUTE(std::string, ToolName)
150  SETTER_GENERIC_OPTIONAL_ATTRIBUTE(std::string, ToolClass)
151 
152 
157  DLL_IMPORT_OR_EXPORT static const char* XML_TAG;
158 
164  DLL_IMPORT_OR_EXPORT virtual std::string getXmlTag() const { return XML_TAG; }
165 
168  };
169 }
Definition: Channel.h:27
Definition: ChannelIndexDataObject.h:36
Definition: ChannelSet.h:30
std::vector< class Channel * > getChannels() const
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:40
std::vector< class Log * > getLogs() const
ChannelSet(gsoap_eml2_1::witsml20__ChannelSet *fromGsoap)
Definition: ChannelSet.h:56
bool hasDataAsFileUri() const
const std::string & getDataAsFileUri() const
ChannelSet(common::DataObjectRepository *repo, const std::string &guid, const std::string &title)
void pushBackChannel(class Channel *channel)
void setDataAsFileUri(const std::string &fileUri)
void setDataAsJsonArray(const std::string &jsonArray)