|
swift
|
List of objects with timestamp. Such objects should implement. More...
#include <timestampobjectlist.h>
Public Types | |
| enum | HintTimestampSort { NoTimestampSortHint , TimestampLatestFirst , TimestampLatestLast } |
| Hint if the list is sorted. More... | |
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. | |
| 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. | |
| bool | isSortedLatestFirst () const |
| Is completely sorted: latest last. | |
| void | addMsecs (qint64 msToAdd) |
| Adds a time to all values. | |
| void | setSortHint (HintTimestampSort hint) |
| Set the hint. | |
| MillisecondsMinMaxMean | getTimestampDifferenceMinMaxMean () const |
| Difference of timestamp values. | |
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 51 of file timestampobjectlist.h.
| enum swift::misc::ITimestampObjectList::HintTimestampSort |
Hint if the list is sorted.
Definition at line 57 of file timestampobjectlist.h.
|
inline |
Adds a time to all values.
Definition at line 407 of file timestampobjectlist.h.
|
inlineprotected |
Container.
Definition at line 476 of file timestampobjectlist.h.
|
inlineprotected |
Container.
Definition at line 473 of file timestampobjectlist.h.
|
inline |
List of objects after dateTime (newer).
Definition at line 99 of file timestampobjectlist.h.
|
inline |
List of objects after msSinceEpoch (newer).
Definition at line 102 of file timestampobjectlist.h.
|
inline |
List of objects before now - offset.
Definition at line 108 of file timestampobjectlist.h.
|
inline |
List of objects before dateTime (older).
Definition at line 65 of file timestampobjectlist.h.
|
inline |
List of objects before msSinceEpoch (older).
Definition at line 68 of file timestampobjectlist.h.
|
inline |
Get objects before msSinceEpoch and remove those.
Definition at line 85 of file timestampobjectlist.h.
|
inline |
List of objects before now - offset.
Definition at line 93 of file timestampobjectlist.h.
|
inline |
Find closest (or default).
Definition at line 131 of file timestampobjectlist.h.
|
inline |
Objects without valid timestamp.
Definition at line 125 of file timestampobjectlist.h.
|
inline |
List of objects after msSinceEpoch (newer).
Definition at line 114 of file timestampobjectlist.h.
|
inline |
Object before timestamp or default (older).
Definition at line 74 of file timestampobjectlist.h.
|
inline |
Difference of timestamp values.
Definition at line 424 of file timestampobjectlist.h.
|
inline |
Has invalid timestamp.
Definition at line 146 of file timestampobjectlist.h.
|
inline |
Is completely sorted: latest last.
Definition at line 384 of file timestampobjectlist.h.
|
inline |
Is completely sorted: latest last.
Definition at line 360 of file timestampobjectlist.h.
|
inline |
Latest object.
Definition at line 214 of file timestampobjectlist.h.
|
inline |
Latest timestamp.
Definition at line 180 of file timestampobjectlist.h.
|
inline |
Latest timestamp.
Definition at line 190 of file timestampobjectlist.h.
|
inline |
Latest object.
Definition at line 228 of file timestampobjectlist.h.
|
inline |
Oldest timestamp.
Definition at line 197 of file timestampobjectlist.h.
|
inline |
Oldest timestamp.
Definition at line 207 of file timestampobjectlist.h.
|
inline |
Push back and increase the timestamp at least by +1ms if equal to last element.
Definition at line 303 of file timestampobjectlist.h.
|
inline |
Push back, but set new timestamp.
Definition at line 321 of file timestampobjectlist.h.
|
inline |
Insert as first element by keeping maxElements and the latest first.
Definition at line 268 of file timestampobjectlist.h.
|
inline |
Remove objects with timestamp before dateTime.
Definition at line 242 of file timestampobjectlist.h.
|
inline |
Remove objects with timestamp before dateTime.
Definition at line 245 of file timestampobjectlist.h.
|
inline |
Remove objects older than seconds.
Definition at line 251 of file timestampobjectlist.h.
|
inline |
Replace if an object has the same timestamp.
Definition at line 344 of file timestampobjectlist.h.
|
inline |
Set all timestamps to now.
Definition at line 149 of file timestampobjectlist.h.
|
inline |
Set invalid timestamps to now.
Definition at line 167 of file timestampobjectlist.h.
|
inline |
Set new timestamps starting with the last element.
Definition at line 329 of file timestampobjectlist.h.
|
inline |
Set the hint.
Definition at line 420 of file timestampobjectlist.h.
|
inline |
Set all timestamps to given time.
Definition at line 158 of file timestampobjectlist.h.
|
inline |
Sort by timestamp.
Definition at line 258 of file timestampobjectlist.h.
|
inline |
Sort by timestamp.
Definition at line 265 of file timestampobjectlist.h.
|
protected |
sort hint
Definition at line 478 of file timestampobjectlist.h.