DUtils::TimeManager Class Reference
Manages collections of timestamps.
More...
#include <TimeManager.h>
List of all members.
Detailed Description
Manages collections of timestamps.
Member Function Documentation
void TimeManager::add |
( |
const Timestamp & |
t |
) |
|
Adds a timestamp to the collection. This action invalidate the created iterators
- Parameters:
-
Returns an iterator to the first item of the sequence. When the interator is incremented, it will according with the desired frequency here
- Parameters:
-
| frequency | frequency to get the timestamps. It can be -1 to mean all the timestamps |
Returns an interator to the lower timestamp that is greater or equal to the first timetamp + seconds (first timestamp = the oldest one)
- Parameters:
-
| seconds | |
| frequency | frequency of iterator. -1 by default (single step frequency) |
Returns an interator to the closest timestamp to the given one
- Parameters:
-
| t | |
| frequency | frequency of iterator. -1 by default (single step) |
void TimeManager::clear |
( |
|
) |
|
Removes all the timestamps. This action invalidates the created iterators
bool DUtils::TimeManager::empty |
( |
|
) |
const [inline] |
Says if the collection is empty
- Returns:
- true iff empty
Returns the first timestamp (in order) of the collection
- Returns:
- first timestamp
Returns the last timestmap (in order) of the collection
- Returns:
- last timestamp
bool TimeManager::le |
( |
const tEntry & |
a, |
|
|
const tEntry & |
b | |
|
) |
| | [static, protected] |
Checks if timestamp of a < timestamp of b
- Parameters:
-
- Returns:
- true iif a < b
Timestamp TimeManager::operator[] |
( |
unsigned int |
idx |
) |
|
Returns the idx-th timestamp after sorting all the timestamps
- Parameters:
-
void TimeManager::remove |
( |
const Timestamp & |
t, |
|
|
bool |
decrease_indexes | |
|
) |
| | |
Removes the given timestamps from the collection. This can also decrease the insertion index of the timestamps added after the removed one. This action invalidates the created iterators
- Parameters:
-
| t | |
| decrease_indexes | if true, indexes of next timestamps are decreased |
unsigned int DUtils::TimeManager::size |
( |
|
) |
const [inline] |
Returns the number of timestamps in the collection
- Returns:
- number of entries
void TimeManager::sort |
( |
|
) |
[protected] |
Makes the stored timestamps to be sorted in ascending order
The documentation for this class was generated from the following files: