Gaia-ECS v0.9.3
A simple and powerful entity component system
Loading...
Searching...
No Matches
gaia::cnt::sringbuffer< T, N > Class Template Reference

Array of elements of type. More...

#include <sringbuffer.h>

Public Types

using value_type = T
 
using reference = T &
 
using const_reference = const T &
 
using pointer = T *
 
using const_pointer = const T *
 
using difference_type = sringbuffer_detail::size_type
 
using size_type = sringbuffer_detail::size_type
 
using iterator = sringbuffer_iterator< T, N >
 
using const_iterator = sringbuffer_iterator< const T, N >
 
using iterator_category = core::random_access_iterator_tag
 

Public Member Functions

template<typename InputIt >
constexpr sringbuffer (InputIt first, InputIt last) noexcept
 
constexpr sringbuffer (std::initializer_list< T > il) noexcept
 
constexpr sringbuffer (const sringbuffer &other) noexcept
 
constexpr sringbuffer (sringbuffer &&other) noexcept
 
constexpr sringbufferoperator= (std::initializer_list< T > il) noexcept
 
constexpr sringbufferoperator= (const sringbuffer &other)
 
constexpr sringbufferoperator= (sringbuffer &&other) noexcept
 
constexpr void push_back (const T &arg)
 
constexpr void push_back (T &&arg)
 
constexpr void pop_front (T &out)
 
constexpr void pop_front (T &&out)
 
constexpr void pop_back (T &out)
 
constexpr void pop_back (T &&out)
 
GAIA_NODISCARD constexpr size_type size () const noexcept
 
GAIA_NODISCARD constexpr bool empty () const noexcept
 
GAIA_NODISCARD constexpr size_type capacity () const noexcept
 
GAIA_NODISCARD constexpr size_type max_size () const noexcept
 
GAIA_NODISCARD constexpr reference front () noexcept
 
GAIA_NODISCARD constexpr const_reference front () const noexcept
 
GAIA_NODISCARD constexpr reference back () noexcept
 
GAIA_NODISCARD constexpr const_reference back () const noexcept
 
GAIA_NODISCARD constexpr auto begin () noexcept
 
GAIA_NODISCARD constexpr auto begin () const noexcept
 
GAIA_NODISCARD constexpr auto cbegin () const noexcept
 
GAIA_NODISCARD constexpr auto end () noexcept
 
GAIA_NODISCARD constexpr auto end () const noexcept
 
GAIA_NODISCARD constexpr auto cend () const noexcept
 
GAIA_NODISCARD constexpr bool operator== (const sringbuffer &other) const
 

Public Attributes

size_type m_tail {}
 
size_type m_size {}
 
m_data [N]
 

Static Public Attributes

static constexpr size_type extent = N
 

Detailed Description

template<typename T, sringbuffer_detail::size_type N>
class gaia::cnt::sringbuffer< T, N >

Array of elements of type.

Template Parameters
Twith fixed size and capacity
Nallocated on stack working as a ring buffer. That means the element at position N-1 is followed by the element at the position 0. Interface compatiblity with std::array where it matters.

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