Public Member Functions | Private Attributes | List of all members
shared_queue< T > Class Template Reference

#include <shared_queue.h>

Public Member Functions

bool empty () const
 
bool fast_empty () const
 
T & front ()
 
const T & front () const
 
front_pop ()
 
shared_queueoperator= (const shared_queue &other)
 
void pop ()
 
void push (const std::vector< T > &values)
 
void push (const T &value)
 
 shared_queue ()
 
 shared_queue (const shared_queue &other)
 
size_t size () const
 
 ~shared_queue ()
 

Private Attributes

std::queue< T > internal_queue_
 
std::atomic< bool > queue_empty_
 
std::mutex queue_mutex_
 

Detailed Description

template<typename T>
class shared_queue< T >

Copyright (c) 2016, Ubiquity Robotics All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Neither the name of ubiquity_motor nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition at line 39 of file shared_queue.h.

Constructor & Destructor Documentation

◆ shared_queue() [1/2]

template<typename T >
shared_queue< T >::shared_queue ( )
inline

Definition at line 41 of file shared_queue.h.

◆ ~shared_queue()

template<typename T >
shared_queue< T >::~shared_queue ( )
inline

Definition at line 42 of file shared_queue.h.

◆ shared_queue() [2/2]

template<typename T >
shared_queue< T >::shared_queue ( const shared_queue< T > &  other)
inline

Definition at line 44 of file shared_queue.h.

Member Function Documentation

◆ empty()

template<typename T >
bool shared_queue< T >::empty ( ) const
inline

Definition at line 112 of file shared_queue.h.

◆ fast_empty()

template<typename T >
bool shared_queue< T >::fast_empty ( ) const
inline

Definition at line 117 of file shared_queue.h.

◆ front() [1/2]

template<typename T >
T& shared_queue< T >::front ( )
inline

Definition at line 85 of file shared_queue.h.

◆ front() [2/2]

template<typename T >
const T& shared_queue< T >::front ( ) const
inline

Definition at line 90 of file shared_queue.h.

◆ front_pop()

template<typename T >
T shared_queue< T >::front_pop ( )
inline

Definition at line 95 of file shared_queue.h.

◆ operator=()

template<typename T >
shared_queue& shared_queue< T >::operator= ( const shared_queue< T > &  other)
inline

Definition at line 55 of file shared_queue.h.

◆ pop()

template<typename T >
void shared_queue< T >::pop ( )
inline

Definition at line 105 of file shared_queue.h.

◆ push() [1/2]

template<typename T >
void shared_queue< T >::push ( const std::vector< T > &  values)
inline

Definition at line 75 of file shared_queue.h.

◆ push() [2/2]

template<typename T >
void shared_queue< T >::push ( const T &  value)
inline

Definition at line 68 of file shared_queue.h.

◆ size()

template<typename T >
size_t shared_queue< T >::size ( ) const
inline

Definition at line 119 of file shared_queue.h.

Member Data Documentation

◆ internal_queue_

template<typename T >
std::queue<T> shared_queue< T >::internal_queue_
private

Definition at line 127 of file shared_queue.h.

◆ queue_empty_

template<typename T >
std::atomic<bool> shared_queue< T >::queue_empty_
private

Definition at line 126 of file shared_queue.h.

◆ queue_mutex_

template<typename T >
std::mutex shared_queue< T >::queue_mutex_
mutableprivate

Definition at line 125 of file shared_queue.h.


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


ubiquity_motor
Author(s):
autogenerated on Thu Nov 16 2023 03:30:56