|
TECA
The Toolkit for Extreme Climate Analysis
|
An iterator over a series of time intervals. More...
#include <teca_calendar_util.h>
Public Member Functions | |
| virtual int | initialize (const teca_metadata &md) |
| virtual int | initialize (const teca_metadata &md, long first_step, long last_step) |
| virtual int | initialize (const const_p_teca_variant_array &t, const std::string &units, const std::string &calendar, long first_step, long last_step)=0 |
| virtual bool | is_valid () const =0 |
| return true if there are more time steps in the sequence More... | |
| virtual int | get_next_interval (time_point &first_step, time_point &last_step)=0 |
| operator bool () const | |
| const time_point & | get_begin () const |
| return the first time point in the series More... | |
| const time_point & | get_end () const |
| return the last time point in the series More... | |
Protected Attributes | |
| const_p_teca_variant_array | time |
| std::string | units |
| std::string | calendar |
| time_point | begin |
| time_point | end |
| bool | valid |
An iterator over a series of time intervals.
|
inline |
return the first time point in the series
|
inline |
return the last time point in the series
|
pure virtual |
Get the next interval in the series.
| [out] | first_step | The first step in the next element of the series |
| [out] | last_step | The last step in the next element of the series |
Implemented in teca_calendar_util::day_iterator, teca_calendar_util::month_iterator, teca_calendar_util::year_iterator, and teca_calendar_util::season_iterator.
|
pure virtual |
Initialize the iterator.
| [in] | t | An array of time values |
| [in] | units | A string units of the time values |
| [in] | calendar | A string name of the calendar system |
| [in] | first_step | the first step to include in the series or 0 to use all |
| [in] | last_step | the last step to include in the series or -1 to use all |
Implemented in teca_calendar_util::day_iterator, teca_calendar_util::month_iterator, teca_calendar_util::year_iterator, and teca_calendar_util::season_iterator.
|
virtual |
Initialize the iterator from a metadata object following the conventions defined by the teca_cf_reader.
|
virtual |
Initialize the iterator from a metadata object following the conventions defined by the teca_cf_reader.
| [in] | md | a metadata object |
| [in] | first_step | the first step to include in the series or 0 to use all |
| [in] | last_step | the last step to include in the series or -1 to use all |
|
pure virtual |
return true if there are more time steps in the sequence
Implemented in teca_calendar_util::day_iterator, teca_calendar_util::month_iterator, teca_calendar_util::year_iterator, and teca_calendar_util::season_iterator.
|
inline |