TimeQueue< MessageType > Class Template Reference

#include <armarx/localization_and_mapping/cartographer_adapter/TimeQueue.h>

+ Inheritance diagram for TimeQueue< MessageType >:

Public Types

using QueueConstIterator = typename QueueType::const_iterator
 
using QueueConstReverseIterator = typename QueueType::const_reverse_iterator
 
using QueueIterator = typename QueueType::iterator
 
using QueueType = std::deque<MessageType>
 

Public Member Functions

void clear ()
 
bool has (int64_t timestamp) const
 
void insert (MessageType message)
 
const MessageType & lookupAt (int64_t referenceTimestamp) const
 
std::size_t size () const noexcept
 
 TimeQueue (const std::size_t maxQueueSize)
 
 TimeQueue (TimeQueue &&other) noexcept
 
std::vector< int64_t > timestamps () const
 
void trimUntil (int64_t timestamp)
 

Protected Member Functions

bool _has (int64_t timestamp) const
 
QueueConstIterator findFirstElementAtOrAfter (int64_t timestamp) const
 
QueueConstReverseIterator findFirstElementAtOrBefore (int64_t timestamp) const
 

Protected Attributes

std::shared_mutex mtx
 
QueueType queue
 

Detailed Description

template<typename MessageType>
class armarx::localization_and_mapping::cartographer_adapter::TimeQueue< MessageType >

Definition at line 50 of file TimeQueue.h.

Member Typedef Documentation

◆ QueueConstIterator

template<typename MessageType>
using QueueConstIterator = typename QueueType::const_iterator

Definition at line 173 of file TimeQueue.h.

◆ QueueConstReverseIterator

template<typename MessageType>
using QueueConstReverseIterator = typename QueueType::const_reverse_iterator

Definition at line 174 of file TimeQueue.h.

◆ QueueIterator

template<typename MessageType>
using QueueIterator = typename QueueType::iterator

Definition at line 172 of file TimeQueue.h.

◆ QueueType

template<typename MessageType>
using QueueType = std::deque<MessageType>

Definition at line 171 of file TimeQueue.h.

Constructor & Destructor Documentation

◆ TimeQueue() [1/2]

template<typename MessageType>
TimeQueue ( const std::size_t maxQueueSize)
inline

Definition at line 54 of file TimeQueue.h.

+ Here is the caller graph for this function:

◆ TimeQueue() [2/2]

template<typename MessageType>
TimeQueue ( TimeQueue< MessageType > && other)
inlinenoexcept

Definition at line 58 of file TimeQueue.h.

Member Function Documentation

◆ _has()

template<typename MessageType>
bool _has ( int64_t timestamp) const
inlineprotected

Definition at line 199 of file TimeQueue.h.

+ Here is the caller graph for this function:

◆ clear()

template<typename MessageType>
void clear ( )
inline

Definition at line 158 of file TimeQueue.h.

+ Here is the caller graph for this function:

◆ findFirstElementAtOrAfter()

template<typename MessageType>
QueueConstIterator findFirstElementAtOrAfter ( int64_t timestamp) const
inlineprotected

Definition at line 179 of file TimeQueue.h.

+ Here is the caller graph for this function:

◆ findFirstElementAtOrBefore()

template<typename MessageType>
QueueConstReverseIterator findFirstElementAtOrBefore ( int64_t timestamp) const
inlineprotected

Definition at line 189 of file TimeQueue.h.

+ Here is the caller graph for this function:

◆ has()

template<typename MessageType>
bool has ( int64_t timestamp) const
inline

Definition at line 129 of file TimeQueue.h.

◆ insert()

template<typename MessageType>
void insert ( MessageType message)
inline

Definition at line 67 of file TimeQueue.h.

+ Here is the caller graph for this function:

◆ lookupAt()

template<typename MessageType>
const MessageType & lookupAt ( int64_t referenceTimestamp) const
inline

Definition at line 111 of file TimeQueue.h.

◆ size()

template<typename MessageType>
std::size_t size ( ) const
inlinenoexcept

Definition at line 165 of file TimeQueue.h.

◆ timestamps()

template<typename MessageType>
std::vector< int64_t > timestamps ( ) const
inline

Definition at line 93 of file TimeQueue.h.

◆ trimUntil()

template<typename MessageType>
void trimUntil ( int64_t timestamp)
inline

Definition at line 138 of file TimeQueue.h.

Member Data Documentation

◆ mtx

template<typename MessageType>
std::shared_mutex mtx
mutableprotected

Definition at line 229 of file TimeQueue.h.

◆ queue

template<typename MessageType>
QueueType queue
protected

Definition at line 227 of file TimeQueue.h.


The documentation for this class was generated from the following file: