EPANET-RTX  1.1
real-time extension for the EPANET toolkit
Public Types | Public Member Functions | Protected Member Functions | List of all members
RTX::ModularTimeSeries Class Reference

A Time Series class that allows a single upstream TimeSeries. More...

#include <ModularTimeSeries.h>

Inheritance diagram for RTX::ModularTimeSeries:
[legend]
Collaboration diagram for RTX::ModularTimeSeries:
[legend]

Public Types

typedef boost::shared_ptr
< ModularTimeSeries
sharedPointer
 
- Public Types inherited from RTX::TimeSeries
typedef boost::shared_ptr
< TimeSeries
sharedPointer
 

Public Member Functions

virtual TimeSeries::sharedPointer source ()
 Get the source of this time series. More...
 
virtual void setSource (TimeSeries::sharedPointer source)
 Set the upstream TimeSeries object. More...
 
virtual bool doesHaveSource ()
 Does this Modular time series have an upstream source? More...
 
virtual TimeSeries::sharedPointer rootTimeSeries ()
 
virtual Point point (time_t time)
 option to add lots of (un)ordered points all at once. More...
 
virtual Point pointBefore (time_t time)
 
virtual Point pointAfter (time_t time)
 
virtual std::vector< Pointpoints (time_t start, time_t end)
 Get a vector of Points within a specific time range. More...
 
virtual void setUnits (Units newUnits)
 
virtual void resetCache ()
 
virtual std::ostream & toStream (std::ostream &stream)
 
virtual bool canAlterDimension ()
 
virtual bool canAlterClock ()
 
- Public Member Functions inherited from RTX::TimeSeries
virtual void insert (Point aPoint)
 
virtual void insertPoints (std::vector< Point >)
 
virtual Point pointAtOrBefore (time_t time)
 
virtual Point interpolatedPoint (time_t time)
 
virtual std::pair< Point, PointadjacentPoints (time_t time)
 
virtual time_t period ()
 
virtual std::string name ()
 1/frequency (# seconds between data points)
 
PointRecord::sharedPointer record ()
 
TimeSeries::Statistics summary (time_t start, time_t end)
 
TimeSeries::Statistics gapsSummary (time_t start, time_t end)
 
std::vector< Pointgaps (time_t start, time_t end)
 
virtual void setName (const std::string &name)
 
void setRecord (PointRecord::sharedPointer record)
 
virtual void setClock (Clock::sharedPointer clock)
 
Clock::sharedPointer clock ()
 
Units units ()
 
void setFirstTime (time_t time)
 
void setLastTime (time_t time)
 
time_t firstTime ()
 
time_t lastTime ()
 

Protected Member Functions

virtual std::vector< PointfilteredPoints (TimeSeries::sharedPointer sourceTs, time_t fromTime, time_t toTime)
 
virtual bool isCompatibleWith (TimeSeries::sharedPointer withTimeSeries)
 

Detailed Description

A Time Series class that allows a single upstream TimeSeries.

This class generalizes some basic functionality for the "modular" design. This implementation serves as a "pass-through", performing no analysis or modification of the data, but caching requested Points in this object's PointRecord.

Member Function Documentation

bool RTX::ModularTimeSeries::doesHaveSource ( )
virtual

Does this Modular time series have an upstream source?

Returns
true / false

Reimplemented in RTX::AggregatorTimeSeries.

Point ModularTimeSeries::point ( time_t  time)
virtual

option to add lots of (un)ordered points all at once.

Get a Point at a specific time.

Parameters
timeThe requested time.
Returns
The requested Point, or the Point just prior to the passed time value.
See also
Point

Reimplemented from RTX::TimeSeries.

Reimplemented in RTX::AggregatorTimeSeries, RTX::CurveFunction, RTX::RunTimeStatusModularTimeSeries, RTX::Resampler, RTX::TimeOffsetTimeSeries, and RTX::SinglePointFilterModularTimeSeries.

vector< Point > ModularTimeSeries::points ( time_t  start,
time_t  end 
)
virtual

Get a vector of Points within a specific time range.

Parameters
startThe beginning of the requested time range.
endThe end of the requested time range.
Returns
The requested Points (as a vector)

The base class provides some brute-force logic to retrieve points, by calling Point() repeatedly. For more efficient access, you may wish to override this method.

See also
Point

Reimplemented from RTX::TimeSeries.

void RTX::ModularTimeSeries::setSource ( TimeSeries::sharedPointer  source)
virtual
TimeSeries::sharedPointer RTX::ModularTimeSeries::source ( )
virtual

Get the source of this time series.

Returns
A shared pointer to a TimeSeries (or derived) object.
See also
TimeSeries

Reimplemented in RTX::AggregatorTimeSeries.


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