Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
cartographer::common::BlockingQueue< T > Class Template Reference

#include <blocking_queue.h>

Public Member Functions

 BlockingQueue ()
 
 BlockingQueue (const BlockingQueue &)=delete
 
 BlockingQueue (const size_t queue_size)
 
BlockingQueueoperator= (const BlockingQueue &)=delete
 
template<typename R >
const R * Peek ()
 
Pop ()
 
PopWithTimeout (const common::Duration timeout)
 
void Push (T t)
 
bool PushWithTimeout (T t, const common::Duration timeout)
 
size_t Size ()
 
void WaitUntilEmpty ()
 

Static Public Attributes

static constexpr size_t kInfiniteQueueSize = 0
 

Private Member Functions

const size_t queue_size_ GUARDED_BY (mutex_)
 
std::deque< T > deque_ GUARDED_BY (mutex_)
 
bool QueueEmptyCondition () REQUIRES(mutex_)
 
bool QueueNotFullCondition () REQUIRES(mutex_)
 

Private Attributes

Mutex mutex_
 

Detailed Description

template<typename T>
class cartographer::common::BlockingQueue< T >

Definition at line 35 of file blocking_queue.h.

Constructor & Destructor Documentation

◆ BlockingQueue() [1/3]

template<typename T>
cartographer::common::BlockingQueue< T >::BlockingQueue ( )
inline

Definition at line 40 of file blocking_queue.h.

◆ BlockingQueue() [2/3]

template<typename T>
cartographer::common::BlockingQueue< T >::BlockingQueue ( const BlockingQueue< T > &  )
delete

◆ BlockingQueue() [3/3]

template<typename T>
cartographer::common::BlockingQueue< T >::BlockingQueue ( const size_t  queue_size)
inlineexplicit

Definition at line 46 of file blocking_queue.h.

Member Function Documentation

◆ GUARDED_BY() [1/2]

template<typename T>
const size_t queue_size_ cartographer::common::BlockingQueue< T >::GUARDED_BY ( mutex_  )
private

◆ GUARDED_BY() [2/2]

template<typename T>
std::deque<T> deque_ cartographer::common::BlockingQueue< T >::GUARDED_BY ( mutex_  )
private

◆ operator=()

template<typename T>
BlockingQueue& cartographer::common::BlockingQueue< T >::operator= ( const BlockingQueue< T > &  )
delete

◆ Peek()

template<typename T>
template<typename R >
const R* cartographer::common::BlockingQueue< T >::Peek ( )
inline

Definition at line 94 of file blocking_queue.h.

◆ Pop()

template<typename T>
T cartographer::common::BlockingQueue< T >::Pop ( )
inline

Definition at line 68 of file blocking_queue.h.

◆ PopWithTimeout()

template<typename T>
T cartographer::common::BlockingQueue< T >::PopWithTimeout ( const common::Duration  timeout)
inline

Definition at line 78 of file blocking_queue.h.

◆ Push()

template<typename T>
void cartographer::common::BlockingQueue< T >::Push ( t)
inline

Definition at line 49 of file blocking_queue.h.

◆ PushWithTimeout()

template<typename T>
bool cartographer::common::BlockingQueue< T >::PushWithTimeout ( t,
const common::Duration  timeout 
)
inline

Definition at line 56 of file blocking_queue.h.

◆ QueueEmptyCondition()

template<typename T>
bool cartographer::common::BlockingQueue< T >::QueueEmptyCondition ( )
inlineprivate

Definition at line 116 of file blocking_queue.h.

◆ QueueNotFullCondition()

template<typename T>
bool cartographer::common::BlockingQueue< T >::QueueNotFullCondition ( )
inlineprivate

Definition at line 119 of file blocking_queue.h.

◆ Size()

template<typename T>
size_t cartographer::common::BlockingQueue< T >::Size ( )
inline

Definition at line 103 of file blocking_queue.h.

◆ WaitUntilEmpty()

template<typename T>
void cartographer::common::BlockingQueue< T >::WaitUntilEmpty ( )
inline

Definition at line 109 of file blocking_queue.h.

Member Data Documentation

◆ kInfiniteQueueSize

template<typename T>
constexpr size_t cartographer::common::BlockingQueue< T >::kInfiniteQueueSize = 0
static

Definition at line 37 of file blocking_queue.h.

◆ mutex_

template<typename T>
Mutex cartographer::common::BlockingQueue< T >::mutex_
private

Definition at line 123 of file blocking_queue.h.


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


cartographer
Author(s): The Cartographer Authors
autogenerated on Mon Feb 28 2022 22:00:59