Fesapi 2.3.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
TimeSeriesData.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
10 http://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 "../common/AbstractObject.h"
22
23namespace PRODML2_1_NS
24{
32 class TimeSeriesData : public COMMON_NS::AbstractObject
33 {
34 public:
35
43 DLL_IMPORT_OR_EXPORT TimeSeriesData(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : COMMON_NS::AbstractObject(partialObject) {}
44
56 TimeSeriesData(COMMON_NS::DataObjectRepository * repo,
57 const std::string & guid,
58 const std::string & title);
59
65 TimeSeriesData(gsoap_eml2_2::prodml21__TimeSeriesData* fromGsoap):AbstractObject(fromGsoap) {}
66
68 ~TimeSeriesData() = default;
69
93 DLL_IMPORT_OR_EXPORT void pushBackKeywordValue(gsoap_eml2_2::prodml21__TimeSeriesKeyword keyword, const std::string & value);
94
103 DLL_IMPORT_OR_EXPORT void setUom(gsoap_resqml2_0_1::resqml20__ResqmlUom uom);
104
110 DLL_IMPORT_OR_EXPORT void setMeasureClass(gsoap_eml2_2::eml22__MeasureClass measureClass);
111
118 DLL_IMPORT_OR_EXPORT void pushBackDoubleValue(double value, time_t timestamp = -1);
119
127 DLL_IMPORT_OR_EXPORT void pushBackDoubleValue(double value, time_t timestamp, gsoap_eml2_2::prodml21__ValueStatus status);
128
135 DLL_IMPORT_OR_EXPORT void pushBackStringValue(const std::string & value, time_t timestamp = -1);
136
142 DLL_IMPORT_OR_EXPORT std::string getUomAsString() const;
143
149 DLL_IMPORT_OR_EXPORT std::string getMeasureClassAsString() const;
150
154 DLL_IMPORT_OR_EXPORT unsigned int getValueCount() const;
155
162 DLL_IMPORT_OR_EXPORT bool isDoubleValue(unsigned int index) const;
163
170 DLL_IMPORT_OR_EXPORT bool isStringValue(unsigned int index) const;
171
178 DLL_IMPORT_OR_EXPORT double getDoubleValue(unsigned int index) const;
179
186 DLL_IMPORT_OR_EXPORT std::string getStringValue(unsigned int index) const;
187
194 DLL_IMPORT_OR_EXPORT time_t getValueTimestamp(unsigned int index) const;
195
202 DLL_IMPORT_OR_EXPORT bool hasValueStatus(unsigned int index) const;
203
210 DLL_IMPORT_OR_EXPORT gsoap_eml2_2::prodml21__ValueStatus getValueStatus(unsigned int index) const;
211
215 DLL_IMPORT_OR_EXPORT unsigned int getKeywordCount() const;
216
223 DLL_IMPORT_OR_EXPORT gsoap_eml2_2::prodml21__TimeSeriesKeyword getKeyword(unsigned int index) const;
224
231 DLL_IMPORT_OR_EXPORT std::string getKeywordValue(unsigned int index) const;
232
238 DLL_IMPORT_OR_EXPORT static const char* XML_TAG;
239
245 DLL_IMPORT_OR_EXPORT virtual std::string getXmlTag() const { return XML_TAG; }
246
250 DLL_IMPORT_OR_EXPORT static const char* XML_NS;
251
255 DLL_IMPORT_OR_EXPORT std::string getXmlNamespace() const final { return XML_NS; }
256
259 };
260}
Definition: TimeSeriesData.h:33
TimeSeriesData(common::DataObjectRepository *repo, const std::string &guid, const std::string &title)
Creates an instance of this class in a gsoap context.
void pushBackDoubleValue(double value, time_t timestamp, gsoap_eml2_2::prodml21__ValueStatus status)
void pushBackStringValue(const std::string &value, time_t timestamp=-1)
virtual std::string getXmlTag() const
Definition: TimeSeriesData.h:245
time_t getValueTimestamp(unsigned int index) const
static const char * XML_TAG
Definition: TimeSeriesData.h:238
std::string getXmlNamespace() const final
Definition: TimeSeriesData.h:255
void pushBackDoubleValue(double value, time_t timestamp=-1)
std::string getMeasureClassAsString() const
gsoap_eml2_2::prodml21__TimeSeriesKeyword getKeyword(unsigned int index) const
bool isStringValue(unsigned int index) const
unsigned int getValueCount() const
void setUom(gsoap_resqml2_0_1::resqml20__ResqmlUom uom)
void setMeasureClass(gsoap_eml2_2::eml22__MeasureClass measureClass)
bool hasValueStatus(unsigned int index) const
void pushBackKeywordValue(gsoap_eml2_2::prodml21__TimeSeriesKeyword keyword, const std::string &value)
std::string getUomAsString() const
double getDoubleValue(unsigned int index) const
std::string getStringValue(unsigned int index) const
unsigned int getKeywordCount() const
std::string getKeywordValue(unsigned int index) const
gsoap_eml2_2::prodml21__ValueStatus getValueStatus(unsigned int index) const
static const char * XML_NS
Definition: TimeSeriesData.h:250
void loadTargetRelationships()
Definition: TimeSeriesData.h:258
TimeSeriesData(gsoap_eml2_2::prodml21__TimeSeriesData *fromGsoap)
Definition: TimeSeriesData.h:65
TimeSeriesData(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition: TimeSeriesData.h:43
bool isDoubleValue(unsigned int index) const