Fesapi  2.0.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
TimeSeries.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 "../common/AbstractObject.h"
22 
23 namespace RESQML2_NS
24 {
25  class AbstractProperty;
26 }
27 
28 namespace 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 
70  DLL_IMPORT_OR_EXPORT virtual unsigned int getTimestampIndex(time_t timestamp) const = 0;
71 
82  DLL_IMPORT_OR_EXPORT virtual unsigned int getTimestampIndex(const tm & timestamp) const = 0;
83 
91  DLL_IMPORT_OR_EXPORT virtual unsigned int getTimestampCount() const = 0;
92 
103  DLL_IMPORT_OR_EXPORT time_t getTimestamp(unsigned int index) const;
104 
116  DLL_IMPORT_OR_EXPORT virtual tm getTimestampAsTimeStructure(unsigned int index) const = 0;
117 
123  DLL_IMPORT_OR_EXPORT std::vector<RESQML2_NS::AbstractProperty*> getPropertySet() const;
124 
126  DLL_IMPORT_OR_EXPORT static const char* XML_TAG;
127 
128  DLL_IMPORT_OR_EXPORT virtual std::string getXmlTag() const override { return XML_TAG; }
129 
130  protected:
131 
133  TimeSeries() {}
134 
142  DLL_IMPORT_OR_EXPORT TimeSeries(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : COMMON_NS::AbstractObject(partialObject) {}
143 
149  TimeSeries(gsoap_resqml2_0_1::_resqml20__TimeSeries* fromGsoap) : COMMON_NS::AbstractObject(fromGsoap) {}
150 
156  TimeSeries(gsoap_eml2_3::_eml23__TimeSeries* fromGsoap) : COMMON_NS::AbstractObject(fromGsoap) {}
157 
159  void loadTargetRelationships() final {};
160  };
161 }
Proxy class for time series. Stores an ordered list of times, for example, for time- dependent proper...
Definition: TimeSeries.h:36
std::vector< resqml2::AbstractProperty * > getPropertySet() const
static const char * XML_TAG
Definition: TimeSeries.h:126
time_t getTimestamp(unsigned int index) const
virtual void pushBackTimestamp(const tm &timestamp)=0
virtual ~TimeSeries()=default
virtual tm getTimestampAsTimeStructure(unsigned int index) const =0
virtual unsigned int getTimestampIndex(time_t timestamp) const =0
void pushBackTimestamp(time_t timestamp)
virtual std::string getXmlTag() const override
Definition: TimeSeries.h:128
virtual unsigned int getTimestampIndex(const tm &timestamp) const =0
virtual unsigned int getTimestampCount() const =0