|
swift
|
List of objects with timestamp and offset. Such objects should implement. More...
#include <timestampobjectlist.h>
Public Types | |
| enum | HintAdjustedTimestampSort { NoAdjustedTimestampSortHint , AdjustedTimestampLatestFirst } |
| Hint if the list is sorted. More... | |
| Public Types inherited from swift::misc::ITimestampObjectList< OBJ, CONTAINER > | |
| enum | HintTimestampSort { NoTimestampSortHint , TimestampLatestFirst , TimestampLatestLast } |
| Hint if the list is sorted. More... | |
Public Member Functions | |
| void | sortAdjustedLatestFirst () |
| Sort by adjusted timestamp. | |
| CONTAINER | getSortedAdjustedLatestFirst () const |
| As sorted copy. | |
| CONTAINER | getLatestAdjustedTwoObjects (bool alreadySortedLatestFirst=false) const |
| Get the latest 2 values. | |
| void | sortAdjustedOldestFirst () |
| Sort by adjusted timestamp. | |
| bool | containsZeroOrNegativeOffsetTime () const |
| Any negative or zero offset time? | |
| bool | containsNegativeOffsetTime () const |
| Any negative offset time? | |
| void | addMsecsToOffset (qint64 msToAdd) |
| Adds a time to all offset values. | |
| void | push_frontKeepLatestAdjustedFirst (const OBJ &value, bool replaceSameTimestamp=true, int maxElements=-1) |
| Insert as first element by keeping maxElements and the latest first. | |
| void | push_frontKeepLatestFirstAdjustOffset (const OBJ &value, bool replaceSameTimestamp=true, int maxElements=-1) |
| Insert as first element by keeping maxElements and the latest first. | |
| void | push_frontKeepLatestFirstIgnoreOverlapping (const OBJ &value, bool replaceSameTimestamp=true, int maxElements=-1) |
| Add value, but ignore overlapping (past) values. | |
| void | prefillLatestAdjustedFirst (const OBJ &value, int elements, qint64 deltaTimeMs=-1) |
| Prefill with elements. | |
| bool | isSortedAdjustedLatestLast () const |
| Is completely sorted: latest last. | |
| bool | isSortedAdjustedLatestFirst () const |
| Is completely sorted: latest last. | |
| CONTAINER | findAfterAdjusted (qint64 msSinceEpoch) const |
| List of objects after msSinceEpoch (newer). | |
| OBJ | findObjectAfterAdjustedOrDefault (qint64 msSinceEpoch) const |
| List of objects after msSinceEpoch (newer). | |
| CONTAINER | findBeforeAdjusted (qint64 msSinceEpoch) const |
| List of objects before msSinceEpoch (older). | |
| OBJ | findObjectBeforeAdjustedOrDefault (qint64 msSinceEpoch) const |
| Object before timestamp (older). | |
| OBJ | findClosestTimeDistanceAdjusted (qint64 msSinceEpoch) const |
| Closest adjusted time difference. | |
| OBJ | latestAdjustedObject () const |
| Latest adjusted object. | |
| OBJ | oldestAdjustedObject () const |
| Oldest adjusted object. | |
| QDateTime | latestAdjustedTimestamp () const |
| Latest adjusted timestamp. | |
| QDateTime | oldestAdjustedTimestamp () const |
| Oldest adjusted timestamp. | |
| qint64 | latestAdjustedTimestampMsecsSinceEpoch () const |
| Latest adjusted timestamp. | |
| qint64 | oldestAdjustedTimestampMsecsSinceEpoch () const |
| Oldest adjusted timestamp. | |
| void | setAdjustedSortHint (HintAdjustedTimestampSort hint) |
| Set the hint. | |
| MillisecondsMinMaxMean | getOffsetMinMaxMean () const |
| Difference of timestamp values. | |
| Public Member Functions inherited from swift::misc::ITimestampObjectList< OBJ, CONTAINER > | |
| 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 | |
| ITimestampWithOffsetObjectList ()=default | |
| Constructor. | |
| Protected Member Functions inherited from swift::misc::ITimestampObjectList< OBJ, CONTAINER > | |
| ITimestampObjectList ()=default | |
| Constructor. | |
| const CONTAINER & | container () const |
| Container. | |
| CONTAINER & | container () |
| Container. | |
Protected Attributes | |
| HintAdjustedTimestampSort | m_tsAdjustedSortHint = NoAdjustedTimestampSortHint |
| sort hint | |
| Protected Attributes inherited from swift::misc::ITimestampObjectList< OBJ, CONTAINER > | |
| HintTimestampSort | m_tsSortHint = NoTimestampSortHint |
| sort hint | |
List of objects with timestamp and offset. Such objects should implement.
Definition at line 484 of file timestampobjectlist.h.
| enum swift::misc::ITimestampWithOffsetObjectList::HintAdjustedTimestampSort |
Hint if the list is sorted.
Definition at line 490 of file timestampobjectlist.h.
|
inline |
Adds a time to all offset values.
Definition at line 545 of file timestampobjectlist.h.
|
inline |
Any negative offset time?
Definition at line 538 of file timestampobjectlist.h.
|
inline |
Any negative or zero offset time?
Definition at line 531 of file timestampobjectlist.h.
|
inline |
List of objects after msSinceEpoch (newer).
Definition at line 709 of file timestampobjectlist.h.
|
inline |
List of objects before msSinceEpoch (older).
Definition at line 727 of file timestampobjectlist.h.
|
inline |
Closest adjusted time difference.
Definition at line 745 of file timestampobjectlist.h.
|
inline |
List of objects after msSinceEpoch (newer).
Definition at line 716 of file timestampobjectlist.h.
|
inline |
Object before timestamp (older).
Definition at line 734 of file timestampobjectlist.h.
|
inline |
Get the latest 2 values.
Definition at line 512 of file timestampobjectlist.h.
|
inline |
Difference of timestamp values.
Definition at line 843 of file timestampobjectlist.h.
|
inline |
As sorted copy.
Definition at line 504 of file timestampobjectlist.h.
|
inline |
Is completely sorted: latest last.
Definition at line 686 of file timestampobjectlist.h.
|
inline |
Is completely sorted: latest last.
Definition at line 658 of file timestampobjectlist.h.
|
inline |
Latest adjusted object.
Definition at line 761 of file timestampobjectlist.h.
|
inline |
Latest adjusted timestamp.
Definition at line 797 of file timestampobjectlist.h.
|
inline |
Latest adjusted timestamp.
Definition at line 817 of file timestampobjectlist.h.
|
inline |
Oldest adjusted object.
Definition at line 779 of file timestampobjectlist.h.
|
inline |
Oldest adjusted timestamp.
Definition at line 807 of file timestampobjectlist.h.
|
inline |
Oldest adjusted timestamp.
Definition at line 828 of file timestampobjectlist.h.
|
inline |
Prefill with elements.
Definition at line 637 of file timestampobjectlist.h.
|
inline |
Insert as first element by keeping maxElements and the latest first.
Definition at line 554 of file timestampobjectlist.h.
|
inline |
Insert as first element by keeping maxElements and the latest first.
Definition at line 582 of file timestampobjectlist.h.
|
inline |
Add value, but ignore overlapping (past) values.
Definition at line 620 of file timestampobjectlist.h.
|
inline |
Set the hint.
Definition at line 839 of file timestampobjectlist.h.
|
inline |
Sort by adjusted timestamp.
Definition at line 497 of file timestampobjectlist.h.
|
inline |
Sort by adjusted timestamp.
Definition at line 525 of file timestampobjectlist.h.
|
protected |
sort hint
Definition at line 882 of file timestampobjectlist.h.