Fesapi 2.9.0.1
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
eml2::TimeSeries Class Referenceabstract

Proxy class for time series. Stores an ordered list of times, for example, for time- dependent properties, geometries, or representations. It is used in conjunction with the time index to specify times for RESQML. More...

#include <TimeSeries.h>

Inheritance diagram for eml2::TimeSeries:

Public Member Functions

virtual ~TimeSeries ()=default
 
void pushBackTimestamp (time_t timestamp)
 
virtual void pushBackTimestamp (const tm &timestamp)=0
 
virtual uint64_t getTimestampIndex (time_t timestamp, LONG64 yearOffset=0) const =0
 
virtual uint64_t getTimestampIndex (const tm &timestamp, LONG64 yearOffset=0) const =0
 
virtual uint64_t getTimestampCount () const =0
 
time_t getTimestamp (uint64_t index) const
 
virtual tm getTimestampAsTimeStructure (uint64_t index) const =0
 
std::vector< resqml2 ::AbstractProperty * > getPropertySet () const
 
virtual std::string getXmlTag () const override
 

Static Public Attributes

static constexpr char const * XML_TAG = "TimeSeries"
 

Detailed Description

Proxy class for time series. Stores an ordered list of times, for example, for time- dependent properties, geometries, or representations. It is used in conjunction with the time index to specify times for RESQML.

Constructor & Destructor Documentation

◆ ~TimeSeries()

virtual eml2::TimeSeries::~TimeSeries ( )
virtualdefault

Destructor does nothing since the memory is managed by the gSOAP context.

Member Function Documentation

◆ getPropertySet()

std::vector< resqml2 ::AbstractProperty * > eml2::TimeSeries::getPropertySet ( ) const

Get all the properties which use this time series

Returns
A vector of pointers to all the properties which use this time series.

◆ getTimestamp()

time_t eml2::TimeSeries::getTimestamp ( uint64_t index) const

Gets a timestamp at a particular index of this time series.

Exceptions
std::logic_errorIf the underlying gSOAP instance is not a RESQML2.0 one.
std::out_of_rangeIf index is out of range.
Parameters
indexZero-based index of the timestamp we look for.
Returns
The timestamp at position index.

◆ getTimestampAsTimeStructure()

virtual tm eml2::TimeSeries::getTimestampAsTimeStructure ( uint64_t index) const
pure virtual

Gets a timestamp as a time structure at a particular index of this time series. It allows to read dates from 1900-01-01T00:00:00.

Exceptions
std::logic_errorIf the underlying gSOAP instance is not a RESQML2.0 one.
std::out_of_rangeIf index is out of range.
Parameters
indexZero-based index of the timestamp we look for.
Returns
The timestamp at position index.

◆ getTimestampCount()

virtual uint64_t eml2::TimeSeries::getTimestampCount ( ) const
pure virtual

Get the count of timestamps in this time series.

Exceptions
std::logic_errorIf the underlying gSOAP instance is not a RESQML2.0 one.
Returns
The timestamp count.

◆ getTimestampIndex() [1/2]

virtual uint64_t eml2::TimeSeries::getTimestampIndex ( const tm & timestamp,
LONG64 yearOffset = 0 ) const
pure virtual

Gets the index of a given timestamp in this time series.

Exceptions
std::logic_errorIf the underlying gSOAP instance is not a RESQML2.0 one.
std::out_of_rangeIf timestamp has not been found in this time series.
Parameters
timestampThe timestamp we look for.
yearOffsetIndicates that the dateTime attribute must be translated according to this value.
Returns
The index of timestamp in this time series.

◆ getTimestampIndex() [2/2]

virtual uint64_t eml2::TimeSeries::getTimestampIndex ( time_t timestamp,
LONG64 yearOffset = 0 ) const
pure virtual

Gets the index of a given timestamp in this time series.

Exceptions
std::logic_errorIf the underlying gSOAP instance is not a RESQML2.0 one.
std::out_of_rangeIf timestamp has not been found in this time series.
Parameters
timestampThe timestamp we look for.
yearOffsetIndicates that the dateTime attribute must be translated according to this value.
Returns
The index of timestamp in this time series.

◆ pushBackTimestamp() [1/2]

virtual void eml2::TimeSeries::pushBackTimestamp ( const tm & timestamp)
pure virtual

Pushes back an timestamp into this time series.

Exceptions
std::logic_errorIf the underlying gSOAP instance is not a RESQML2.0 one.
Parameters
timestampThe timestamp to push back.

◆ pushBackTimestamp() [2/2]

void eml2::TimeSeries::pushBackTimestamp ( time_t timestamp)

Pushes back an timestamp into this time series.

Exceptions
std::logic_errorIf the underlying gSOAP instance is not a RESQML2.0 one.
Parameters
timestampThe timestamp to push back.

Member Data Documentation

◆ XML_TAG

constexpr char const* eml2::TimeSeries::XML_TAG = "TimeSeries"
staticconstexpr

The standard XML tag without XML namespace for serializing this data object.


The documentation for this class was generated from the following file: