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
TimeSeries.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 RESQML2_NS
24{
25 class AbstractProperty;
26}
27
28namespace EML2_NS
29{
35 class TimeSeries : public COMMON_NS::AbstractObject
36 {
37 public:
38
40 virtual ~TimeSeries() = default;
41
49 DLL_IMPORT_OR_EXPORT void pushBackTimestamp(time_t timestamp);
50
58 DLL_IMPORT_OR_EXPORT virtual void pushBackTimestamp(const tm & timestamp) = 0;
59
71 DLL_IMPORT_OR_EXPORT virtual uint64_t getTimestampIndex(time_t timestamp, LONG64 yearOffset = 0) const = 0;
72
84 DLL_IMPORT_OR_EXPORT virtual uint64_t getTimestampIndex(const tm & timestamp, LONG64 yearOffset = 0) const = 0;
85
93 DLL_IMPORT_OR_EXPORT virtual uint64_t getTimestampCount() const = 0;
94
105 DLL_IMPORT_OR_EXPORT time_t getTimestamp(uint64_t index) const;
106
118 DLL_IMPORT_OR_EXPORT virtual tm getTimestampAsTimeStructure(uint64_t index) const = 0;
119
125 DLL_IMPORT_OR_EXPORT std::vector<RESQML2_NS::AbstractProperty*> getPropertySet() const;
126
128 DLL_IMPORT_OR_EXPORT static constexpr char const* XML_TAG = "TimeSeries";
129
130 DLL_IMPORT_OR_EXPORT virtual std::string getXmlTag() const override { return XML_TAG; }
131
132 protected:
133
135 TimeSeries() {}
136
144 DLL_IMPORT_OR_EXPORT TimeSeries(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : COMMON_NS::AbstractObject(partialObject) {}
145
151 TimeSeries(gsoap_resqml2_0_1::_resqml20__TimeSeries* fromGsoap) : COMMON_NS::AbstractObject(fromGsoap) {}
152
158 TimeSeries(gsoap_eml2_3::_eml23__TimeSeries* fromGsoap) : COMMON_NS::AbstractObject(fromGsoap) {}
159
161 void loadTargetRelationships() final {};
162 };
163}
Proxy class for time series. Stores an ordered list of times, for example, for time- dependent proper...
Definition TimeSeries.h:36
virtual tm getTimestampAsTimeStructure(uint64_t index) const =0
virtual void pushBackTimestamp(const tm &timestamp)=0
virtual ~TimeSeries()=default
virtual uint64_t getTimestampIndex(const tm &timestamp, LONG64 yearOffset=0) const =0
std::vector< resqml2::AbstractProperty * > getPropertySet() const
void pushBackTimestamp(time_t timestamp)
time_t getTimestamp(uint64_t index) const
virtual uint64_t getTimestampCount() const =0
virtual std::string getXmlTag() const override
Definition TimeSeries.h:130
virtual uint64_t getTimestampIndex(time_t timestamp, LONG64 yearOffset=0) const =0