Template Class TemporalBuffer

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)
bool addValue(const int64_t timestamp, const ValueType &value)
inline void insert(const TemporalBuffer &other)
inline size_t size() const
inline bool empty() const
inline void clear()
bool getValueAtTime(const int64_t timestamp_ns, ValueType *value) const
bool deleteValueAtTime(const int64_t timestamp_ns)
bool getNearestValueToTime(const int64_t timestamp_ns, ValueType *value) const
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 getOldestValue(ValueType *value) const
bool getNewestTime(int64_t *timestamp_nanoseconds) const
bool getNewestValue(ValueType *value) 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
bool interpolateAt(const int64_t timestamp_ns, ValueType *output) 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

Protected Functions

inline BufferType &getValues()
inline const BufferType &getValues() const