Template Class TemporalBuffer¶
Defined in File temporal-buffer.h
Class Documentation¶
-
template<typename ValueType, typename AllocatorType = std::allocator<std::pair<const int64_t, ValueType>>>
class common::TemporalBuffer¶ Public Types
-
typedef std::map<int64_t, ValueType, std::less<int64_t>, AllocatorType> BufferType¶
Public Functions
-
TemporalBuffer()¶
-
virtual ~TemporalBuffer() = default¶
-
explicit TemporalBuffer(int64_t buffer_length_nanoseconds)¶
-
TemporalBuffer(const TemporalBuffer &other)¶
-
inline void insert(const TemporalBuffer &other)¶
-
inline size_t size() const¶
-
inline bool empty() const¶
-
inline void clear()¶
-
bool deleteValueAtTime(const int64_t timestamp_ns)¶
-
bool getNearestValueToTime(const int64_t timestamp_ns, const int64_t maximum_delta_ns, ValueType *value) const¶
-
bool getNearestValueToTime(const int64_t timestamp, const int64_t maximum_delta_ns, ValueType *value, int64_t *timestamp_at_value_ns) const¶
-
bool getOldestTime(int64_t *timestamp_nanoseconds) const¶
-
bool getNewestTime(int64_t *timestamp_nanoseconds) const¶
-
bool getValueAtOrBeforeTime(const int64_t timestamp_ns, int64_t *timestamp_ns_of_value, ValueType *value) const¶
-
bool getValueAtOrAfterTime(const int64_t timestamp_ns, int64_t *timestamp_ns_of_value, ValueType *value) const¶
-
template<typename ValueContainerType>
void getValuesBetweenTimes(const int64_t timestamp_lower_ns, const int64_t timestamp_higher_ns, ValueContainerType *values) const¶
-
template<typename ValueContainerType>
void getValuesFromExcludingToIncluding(const int64_t timestamp_lower_ns, const int64_t timestamp_higher_ns, ValueContainerType *values) const¶
-
template<typename ValueContainerType>
void getValuesFromIncludingToIncluding(const int64_t timestamp_lower_ns, const int64_t timestamp_higher_ns, ValueContainerType *values) const¶
-
inline bool operator==(const TemporalBuffer &other) const¶
-
inline bool operator!=(const TemporalBuffer &other) const¶
-
inline BufferType::iterator begin()¶
-
inline BufferType::const_iterator begin() const¶
-
inline BufferType::iterator end()¶
-
inline BufferType::const_iterator end() const¶
-
inline BufferType::reverse_iterator rbegin()¶
-
inline BufferType::const_reverse_iterator rbegin() const¶
-
inline BufferType::reverse_iterator rend()¶
-
inline BufferType::const_reverse_iterator rend() const¶
-
size_t removeItemsBefore(const int64_t timestamp_ns)¶
-
template<typename ValueContainerType>
size_t extractItemsBeforeIncluding(const int64_t timestamp_ns, ValueContainerType *removed_values)¶
-
template<typename ValueContainerType>
size_t extractItemsBeforeIncludingKeepMostRecent(const int64_t timestamp_ns, ValueContainerType *values)¶
Public Members
- TemporalBuffer
-
typedef std::map<int64_t, ValueType, std::less<int64_t>, AllocatorType> BufferType¶