Ref T243, adjust offset for timestamp based objects when keeping the order

This commit is contained in:
Klaus Basan
2018-02-06 00:42:28 +01:00
parent 23cd247bd8
commit 5d155fb59c
4 changed files with 81 additions and 26 deletions

View File

@@ -125,9 +125,16 @@ namespace BlackMisc
//! Sort by adjusted timestamp
void sortAdjustedOldestFirst();
//! Any negative or zero offset time?
bool containsZeroOrNegativeOffsetTime() const;
//! Insert as first element by keeping maxElements and the latest first
void push_frontKeepLatestAdjustedFirst(const OBJ &value, int maxElements = -1);
//! Insert as first element by keeping maxElements and the latest first
//! \remark adjust offset so adjusted values are sorted
void push_frontKeepLatestFirstAdjustOffset(const OBJ &value, int maxElements = -1);
//! Is completely sorted: latest last
//! \remark all object must have a valid timestamp
bool isSortedAdjustedLatestLast() const;