Times class is used to store Time. It is a bidirectional map implemented from Boost so that it provides fast translation from and to its underlying Time object.
More...
#include <Times.h>
Times class is used to store Time. It is a bidirectional map implemented from Boost so that it provides fast translation from and to its underlying Time object.
Times class supports the following features:
- Time is unique;
- Time objects are kept in sequence of insertion and have random access;
- Index of a Time object can be quickly retrieved using Time.
Time objects in Times are assumed to be sorted in ascension order.
◆ Times() [1/2]
◆ Times() [2/2]
| Times::Times |
( |
const Times & | | ) |
|
|
default |
◆ ~Times()
| virtual Times::~Times |
( |
| ) |
|
|
virtualdefault |
◆ getIndex()
| size_t Times::getIndex |
( |
const Time & | time | ) |
const |
Retrieve the associated index with a Time object.
- Parameters
-
- Returns
- an index
◆ getIndices()
| void Times::getIndices |
( |
const Times & | , |
|
|
std::vector< std::size_t > & | ) const |
◆ getTime()
| const Time & Times::getTime |
( |
std::size_t | index | ) |
const |
◆ getTimestamps()
| void Times::getTimestamps |
( |
std::vector< std::size_t > & | timestamps | ) |
const |
◆ operator()() [1/3]
| void Times::operator() |
( |
const std::string & | , |
|
|
const std::string & | , |
|
|
Times & | , |
|
|
bool | iso_string = false ) const |
◆ operator()() [2/3]
| void Times::operator() |
( |
const Time & | start, |
|
|
const Time & | end, |
|
|
Times & | sliced_times ) const |
Slice times based on the start and end times. The input strings should follow
- (1) the delimited format: YYYY-mm-dd HH:MM:SS.SSS
- (2) the non delimited iso format: YYYYmmddTHHMMSS
Note that the letter 'T' in the non delimited iso format is a literal letter.
For more documentation, please go to https://www.boost.org/doc/libs/1_72_0/doc/html/date_time/posix_time.html
- Parameters
-
| start | The Time, string, or size_t for start time. |
| end | The Time, string, or size_t for end time. |
| sliced_times | The Times object to store the sliced times. |
| iso_string | Whether the strings use the ISO format. |
◆ operator()() [3/3]
| void Times::operator() |
( |
size_t | start_time, |
|
|
size_t | end_time, |
|
|
Times & | sliced_times ) const |
◆ print()
| void Times::print |
( |
std::ostream & | os | ) |
const |
◆ push_back()
| void Times::push_back |
( |
const Time & | time | ) |
|
◆ operator<<
| std::ostream & operator<< |
( |
std::ostream & | os, |
|
|
Times const & | obj ) |
|
friend |
The documentation for this class was generated from the following files:
- /Users/huwx/github/GAIM/AnalogEnsemble/CAnEn/include/Times.h
- /Users/huwx/github/GAIM/AnalogEnsemble/CAnEn/src/Times.cpp