scc 2025.09
SystemC components library
rigtorp::SPSCQueue< T, Allocator > Class Template Reference

Public Member Functions

 SPSCQueue (const size_t capacity, const Allocator &allocator=Allocator())
 SPSCQueue (const SPSCQueue &)=delete
SPSCQueue & operator= (const SPSCQueue &)=delete
template<typename... Args>
void emplace (Args &&... args) noexcept(std::is_nothrow_constructible< T, Args &&... >::value)
template<typename... Args>
RIGTORP_NODISCARD bool try_emplace (Args &&... args) noexcept(std::is_nothrow_constructible< T, Args &&... >::value)
void push (const T &v) noexcept(std::is_nothrow_copy_constructible< T >::value)
template<typename P, typename = typename std::enable_if<std::is_constructible<T, P&&>::value>::type>
void push (P &&v) noexcept(std::is_nothrow_constructible< T, P && >::value)
RIGTORP_NODISCARD bool try_push (const T &v) noexcept(std::is_nothrow_copy_constructible< T >::value)
template<typename P, typename = typename std::enable_if<std::is_constructible<T, P&&>::value>::type>
RIGTORP_NODISCARD bool try_push (P &&v) noexcept(std::is_nothrow_constructible< T, P && >::value)
RIGTORP_NODISCARD T * front () noexcept
void pop () noexcept
RIGTORP_NODISCARD size_t size () const noexcept
RIGTORP_NODISCARD bool empty () const noexcept
RIGTORP_NODISCARD size_t capacity () const noexcept

Detailed Description

template<typename T, typename Allocator = std::allocator<T>>
class rigtorp::SPSCQueue< T, Allocator >

Definition at line 44 of file SPSCQueue.h.

Constructor & Destructor Documentation

◆ SPSCQueue()

template<typename T, typename Allocator = std::allocator<T>>
rigtorp::SPSCQueue< T, Allocator >::SPSCQueue ( const size_t capacity,
const Allocator & allocator = Allocator() )
inlineexplicit

Definition at line 56 of file SPSCQueue.h.

◆ ~SPSCQueue()

template<typename T, typename Allocator = std::allocator<T>>
rigtorp::SPSCQueue< T, Allocator >::~SPSCQueue ( )
inline

Definition at line 86 of file SPSCQueue.h.

Member Function Documentation

◆ capacity()

template<typename T, typename Allocator = std::allocator<T>>
RIGTORP_NODISCARD size_t rigtorp::SPSCQueue< T, Allocator >::capacity ( ) const
inlinenoexcept

Definition at line 185 of file SPSCQueue.h.

◆ emplace()

template<typename T, typename Allocator = std::allocator<T>>
template<typename... Args>
void rigtorp::SPSCQueue< T, Allocator >::emplace ( Args &&... args)
inlinenoexcept

Definition at line 97 of file SPSCQueue.h.

◆ empty()

template<typename T, typename Allocator = std::allocator<T>>
RIGTORP_NODISCARD bool rigtorp::SPSCQueue< T, Allocator >::empty ( ) const
inlinenoexcept

Definition at line 181 of file SPSCQueue.h.

◆ front()

template<typename T, typename Allocator = std::allocator<T>>
RIGTORP_NODISCARD T * rigtorp::SPSCQueue< T, Allocator >::front ( )
inlinenoexcept

Definition at line 150 of file SPSCQueue.h.

◆ pop()

template<typename T, typename Allocator = std::allocator<T>>
void rigtorp::SPSCQueue< T, Allocator >::pop ( )
inlinenoexcept

Definition at line 161 of file SPSCQueue.h.

◆ push() [1/2]

template<typename T, typename Allocator = std::allocator<T>>
void rigtorp::SPSCQueue< T, Allocator >::push ( const T & v)
inlinenoexcept

Definition at line 130 of file SPSCQueue.h.

◆ push() [2/2]

template<typename T, typename Allocator = std::allocator<T>>
template<typename P, typename = typename std::enable_if<std::is_constructible<T, P&&>::value>::type>
void rigtorp::SPSCQueue< T, Allocator >::push ( P && v)
inlinenoexcept

Definition at line 136 of file SPSCQueue.h.

◆ size()

template<typename T, typename Allocator = std::allocator<T>>
RIGTORP_NODISCARD size_t rigtorp::SPSCQueue< T, Allocator >::size ( ) const
inlinenoexcept

Definition at line 173 of file SPSCQueue.h.

◆ try_emplace()

template<typename T, typename Allocator = std::allocator<T>>
template<typename... Args>
RIGTORP_NODISCARD bool rigtorp::SPSCQueue< T, Allocator >::try_emplace ( Args &&... args)
inlinenoexcept

Definition at line 112 of file SPSCQueue.h.

◆ try_push() [1/2]

template<typename T, typename Allocator = std::allocator<T>>
RIGTORP_NODISCARD bool rigtorp::SPSCQueue< T, Allocator >::try_push ( const T & v)
inlinenoexcept

Definition at line 140 of file SPSCQueue.h.

◆ try_push() [2/2]

template<typename T, typename Allocator = std::allocator<T>>
template<typename P, typename = typename std::enable_if<std::is_constructible<T, P&&>::value>::type>
RIGTORP_NODISCARD bool rigtorp::SPSCQueue< T, Allocator >::try_push ( P && v)
inlinenoexcept

Definition at line 146 of file SPSCQueue.h.


The documentation for this class was generated from the following file:
  • /home/eyck/Projects/MINRES/SystemC-Components/src/common/rigtorp/SPSCQueue.h