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

using QueueConstIterator = typename QueueType::const_iterator

Definition at line 173 of file TimeQueue.h.

◆ QueueConstReverseIterator

using QueueConstReverseIterator = typename QueueType::const_reverse_iterator

Definition at line 174 of file TimeQueue.h.

◆ QueueIterator

using QueueIterator = typename QueueType::iterator

Definition at line 172 of file TimeQueue.h.

◆ QueueType

using QueueType = std::deque<MessageType>

Definition at line 171 of file TimeQueue.h.

Constructor & Destructor Documentation

◆ TimeQueue() [1/2]

TimeQueue ( const std::size_t  maxQueueSize)
inline

Definition at line 54 of file TimeQueue.h.

◆ TimeQueue() [2/2]

TimeQueue ( TimeQueue< MessageType > &&  other)
inlinenoexcept

Definition at line 58 of file TimeQueue.h.

Member Function Documentation

◆ _has()

bool _has ( int64_t  timestamp) const
inlineprotected

Definition at line 199 of file TimeQueue.h.

+ Here is the caller graph for this function:

◆ clear()

void clear ( )
inline

Definition at line 158 of file TimeQueue.h.

+ Here is the caller graph for this function:

◆ findFirstElementAtOrAfter()

QueueConstIterator findFirstElementAtOrAfter ( int64_t  timestamp) const
inlineprotected

Definition at line 179 of file TimeQueue.h.

+ Here is the caller graph for this function:

◆ findFirstElementAtOrBefore()

QueueConstReverseIterator findFirstElementAtOrBefore ( int64_t  timestamp) const
inlineprotected

Definition at line 189 of file TimeQueue.h.

+ Here is the caller graph for this function:

◆ has()

bool has ( int64_t  timestamp) const
inline

Definition at line 129 of file TimeQueue.h.

◆ insert()

void insert ( MessageType  message)
inline

Definition at line 67 of file TimeQueue.h.

+ Here is the caller graph for this function:

◆ lookupAt()

const MessageType& lookupAt ( int64_t  referenceTimestamp) const
inline

Definition at line 111 of file TimeQueue.h.

◆ size()

std::size_t size ( ) const
inlinenoexcept

Definition at line 165 of file TimeQueue.h.

+ Here is the caller graph for this function:

◆ timestamps()

std::vector<int64_t> timestamps ( ) const
inline

Definition at line 93 of file TimeQueue.h.

◆ trimUntil()

void trimUntil ( int64_t  timestamp)
inline

Definition at line 138 of file TimeQueue.h.

Member Data Documentation

◆ mtx

std::shared_mutex mtx
mutableprotected

Definition at line 229 of file TimeQueue.h.

◆ queue

QueueType queue
protected

Definition at line 227 of file TimeQueue.h.


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