swift
|
List of objects with timestamp. Such objects should implement. More...
Public Types | |
enum | HintTimestampSort { NoTimestampSortHint , TimestampLatestFirst , TimestampLatestLast } |
Hint if the list is sorted. | |
Public Member Functions | |
CONTAINER | findBefore (const QDateTime &dateTime) const |
List of objects before dateTime (older) | |
CONTAINER | findBefore (qint64 msSinceEpoch) const |
List of objects before msSinceEpoch (older) | |
OBJ | findObjectBeforeOrDefault (qint64 msSinceEpoch) const |
Object before timestamp or default (older) | |
CONTAINER | findBeforeAndRemove (qint64 msSinceEpoch) |
Get objects before msSinceEpoch and remove those. | |
CONTAINER | findBeforeNowMinusOffset (qint64 msOffset) const |
List of objects before now - offset. | |
CONTAINER | findAfter (const QDateTime &dateTime) const |
List of objects after dateTime (newer) | |
CONTAINER | findAfter (qint64 msSinceEpoch) const |
List of objects after msSinceEpoch (newer) | |
CONTAINER | findAfterNowMinusOffset (qint64 msOffset) const |
List of objects before now - offset. | |
OBJ | findObjectAfterOrDefault (qint64 msSinceEpoch) const |
List of objects after msSinceEpoch (newer) | |
CONTAINER | findInvalidTimestamps () const |
Objects without valid timestamp. | |
OBJ | findClosestTimeDistance (qint64 msSinceEpoch) const |
Find closest (or default) | |
bool | hasInvalidTimestamps () const |
Has invalid timestamp. | |
void | setCurrentUtcTime () |
Set all timestamps to now. | |
void | setUtcTime (qint64 msSinceEpoch) |
Set all timestamps to given time. | |
void | setInvalidTimestampsToCurrentUtcTime () |
Set invalid timestamps to now. | |
QDateTime | latestTimestamp () const |
Latest timestamp. | |
qint64 | latestTimestampMsecsSinceEpoch () const |
Latest timestamp. | |
QDateTime | oldestTimestamp () const |
Oldest timestamp. | |
qint64 | oldestTimestampMsecsSinceEpoch () const |
Oldest timestamp. | |
OBJ | latestObject () const |
Latest object. | |
OBJ | oldestObject () const |
Latest object. | |
int | removeBefore (const QDateTime &dateTime) |
Remove objects with timestamp before dateTime. | |
int | removeBefore (qint64 msSinceEpoch) |
Remove objects with timestamp before dateTime. | |
int | removeOlderThanNowMinusOffset (qint64 offsetMs) |
Remove objects older than seconds. | |
void | sortLatestFirst () |
Sort by timestamp. | |
void | sortOldestFirst () |
Sort by timestamp. | |
void | push_frontKeepLatestFirst (const OBJ &value, bool replaceSameTimestamp=true, int maxElements=-1) |
Insert as first element by keeping maxElements and the latest first. | |
void | push_backIncreaseTimestamp (const OBJ &newObject) |
Push back and increase the timestamp at least by +1ms if equal to last element. More... | |
void | push_backOverrideTimestamp (const OBJ &newObject, qint64 newTsMsSinceEpoch) |
Push back, but set new timestamp. | |
void | setNewTimestampStartingLast (qint64 startTimeStampMs, qint64 deltaTimeMs) |
Set new timestamps starting with the last element. | |
int | replaceIfSameTimestamp (const OBJ &newObject) |
Replace if an object has the same timestamp. | |
bool | isSortedLatestLast () const |
Is completely sorted: latest last. More... | |
bool | isSortedLatestFirst () const |
Is completely sorted: latest last. More... | |
void | addMsecs (qint64 msToAdd) |
Adds a time to all values. | |
void | setSortHint (HintTimestampSort hint) |
Set the hint. | |
MillisecondsMinMaxMean | getTimestampDifferenceMinMaxMean () const |
Difference of timestamp values. More... | |
Protected Member Functions | |
ITimestampObjectList ()=default | |
Constructor. | |
const CONTAINER & | container () const |
Container. | |
CONTAINER & | container () |
Container. | |
Protected Attributes | |
HintTimestampSort | m_tsSortHint = NoTimestampSortHint |
sort hint | |
List of objects with timestamp. Such objects should implement.
Definition at line 49 of file timestampobjectlist.h.
|
inline |
Difference of timestamp values.
Definition at line 356 of file timestampobjectlist.h.
|
inline |
Is completely sorted: latest last.
Definition at line 331 of file timestampobjectlist.h.
|
inline |
Is completely sorted: latest last.
Definition at line 316 of file timestampobjectlist.h.
|
inline |
Push back and increase the timestamp at least by +1ms if equal to last element.
Definition at line 262 of file timestampobjectlist.h.