Fesapi  0.13.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 "resqml2/AbstractProperty.h"
22 
23 namespace RESQML2_NS
24 {
25  class DLL_IMPORT_OR_EXPORT TimeSeries : public COMMON_NS::AbstractObject
26  {
27  protected:
32 
36  TimeSeries(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : COMMON_NS::AbstractObject(partialObject) {}
37 
41  TimeSeries(gsoap_resqml2_0_1::_resqml2__TimeSeries* fromGsoap) : COMMON_NS::AbstractObject(fromGsoap) {}
42 
43  public:
44 
49 
50  static const char* XML_TAG;
51  virtual std::string getXmlTag() const {return XML_TAG;}
52 
57  void pushBackTimestamp(const time_t & timestamp);
58 
63  void pushBackTimestamp(const tm & timestamp);
64 
69  unsigned int getTimestampIndex(const time_t & timestamp) const;
70 
75  unsigned int getTimestampIndex(const tm & timestamp) const;
76 
80  unsigned int getTimestampCount() const;
81 
85  time_t getTimestamp(const unsigned int & index) const;
86 
91  tm getTimestampAsTimeStructure(const unsigned int & index) const;
92 
96  const std::vector<RESQML2_NS::AbstractProperty*>& getPropertySet() const { return propertySet; }
97 
98  protected:
99 
100  std::vector<epc::Relationship> getAllEpcRelationships() const;
105 
106  // XML backward relationship
107  std::vector<RESQML2_NS::AbstractProperty*> propertySet;
108 
110  };
111 }
112 
void setTimeSeries(class TimeSeries *ts)
Definition: AbstractProperty.cpp:281
void importRelationshipSetFromEpc(COMMON_NS::EpcDocument *epcDoc)
Definition: TimeSeries.h:104
~TimeSeries()
Definition: TimeSeries.h:48
const std::vector< RESQML2_NS::AbstractProperty * > & getPropertySet() const
Definition: TimeSeries.h:96
TimeSeries(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition: TimeSeries.h:36
TimeSeries(gsoap_resqml2_0_1::_resqml2__TimeSeries *fromGsoap)
Definition: TimeSeries.h:41
Definition: TimeSeries.h:25
Definition: EpcDocument.h:154
Definition: AbstractObject.h:27
virtual std::string getXmlTag() const
Definition: TimeSeries.h:51
Definition: AbstractHdfProxy.h:28
TimeSeries()
Definition: TimeSeries.h:31
Definition: EpcDocument.h:49