ludus::foundation::core::RingBuffer¶
Ludus Wiki · API overview · Browse API
Class
Note
Declared in modules/foundation/containers/include/ludus/foundation/containers/ring_buffer.hpp
#include <ludus/foundation/containers/ring_buffer.hpp>
template <typename ElementType, usize Count>
class ludus::foundation::core::RingBuffer
Types¶
ValueType¶
using ludus::foundation::core::RingBuffer< ElementType, Count >::ValueType = ElementType
Declared in modules/foundation/containers/include/ludus/foundation/containers/ring_buffer.hpp
SizeType¶
using ludus::foundation::core::RingBuffer< ElementType, Count >::SizeType = usize
Related types: usize
Declared in modules/foundation/containers/include/ludus/foundation/containers/ring_buffer.hpp
Methods¶
RingBuffer¶
ludus::foundation::core::RingBuffer< ElementType, Count >::RingBuffer() noexcept=default
Declared in modules/foundation/containers/include/ludus/foundation/containers/ring_buffer.hpp
RingBuffer¶
ludus::foundation::core::RingBuffer< ElementType, Count >::RingBuffer(const RingBuffer &other)
requires std::is_copy_constructible_v<ElementType>
Declared in modules/foundation/containers/include/ludus/foundation/containers/ring_buffer.hpp
RingBuffer¶
ludus::foundation::core::RingBuffer< ElementType, Count >::RingBuffer(RingBuffer &&other) noexcept
requires std::is_nothrow_move_constructible_v<ElementType>
Declared in modules/foundation/containers/include/ludus/foundation/containers/ring_buffer.hpp
operator=¶
RingBuffer & ludus::foundation::core::RingBuffer< ElementType, Count >::operator=(const RingBuffer &other)
requires std::is_copy_constructible_v<ElementType>
Related types: RingBuffer
Declared in modules/foundation/containers/include/ludus/foundation/containers/ring_buffer.hpp
operator=¶
RingBuffer & ludus::foundation::core::RingBuffer< ElementType, Count >::operator=(RingBuffer &&other) noexcept
requires std::is_nothrow_move_constructible_v<ElementType>
Related types: RingBuffer
Declared in modules/foundation/containers/include/ludus/foundation/containers/ring_buffer.hpp
~RingBuffer¶
ludus::foundation::core::RingBuffer< ElementType, Count >::~RingBuffer()=default
requires std::is_trivially_destructible_v<ElementType>
Declared in modules/foundation/containers/include/ludus/foundation/containers/ring_buffer.hpp
~RingBuffer¶
ludus::foundation::core::RingBuffer< ElementType, Count >::~RingBuffer()
Declared in modules/foundation/containers/include/ludus/foundation/containers/ring_buffer.hpp
GetSize¶
LUDUS_INLINE usize ludus::foundation::core::RingBuffer< ElementType, Count >::GetSize() const noexcept
Related types: usize
Declared in modules/foundation/containers/include/ludus/foundation/containers/ring_buffer.hpp
IsEmpty¶
LUDUS_INLINE bool ludus::foundation::core::RingBuffer< ElementType, Count >::IsEmpty() const noexcept
Declared in modules/foundation/containers/include/ludus/foundation/containers/ring_buffer.hpp
IsFull¶
LUDUS_INLINE bool ludus::foundation::core::RingBuffer< ElementType, Count >::IsFull() const noexcept
Declared in modules/foundation/containers/include/ludus/foundation/containers/ring_buffer.hpp
operator[]¶
LUDUS_INLINE ElementType & ludus::foundation::core::RingBuffer< ElementType, Count >::operator[](usize index) noexcept
index positions after the oldest. Precondition
Related types: usize
Declared in modules/foundation/containers/include/ludus/foundation/containers/ring_buffer.hpp
operator[]¶
LUDUS_INLINE const ElementType & ludus::foundation::core::RingBuffer< ElementType, Count >::operator[](usize index) const noexcept
index positions after the oldest. Precondition
Related types: usize
Declared in modules/foundation/containers/include/ludus/foundation/containers/ring_buffer.hpp
GetFirst¶
LUDUS_INLINE ElementType & ludus::foundation::core::RingBuffer< ElementType, Count >::GetFirst() noexcept
Precondition
Declared in modules/foundation/containers/include/ludus/foundation/containers/ring_buffer.hpp
GetFirst¶
LUDUS_INLINE const ElementType & ludus::foundation::core::RingBuffer< ElementType, Count >::GetFirst() const noexcept
Precondition
Declared in modules/foundation/containers/include/ludus/foundation/containers/ring_buffer.hpp
GetLast¶
LUDUS_INLINE ElementType & ludus::foundation::core::RingBuffer< ElementType, Count >::GetLast() noexcept
Precondition
Declared in modules/foundation/containers/include/ludus/foundation/containers/ring_buffer.hpp
GetLast¶
LUDUS_INLINE const ElementType & ludus::foundation::core::RingBuffer< ElementType, Count >::GetLast() const noexcept
Precondition
Declared in modules/foundation/containers/include/ludus/foundation/containers/ring_buffer.hpp
GetLeadingSpan¶
std::span< ElementType > ludus::foundation::core::RingBuffer< ElementType, Count >::GetLeadingSpan() noexcept
Declared in modules/foundation/containers/include/ludus/foundation/containers/ring_buffer.hpp
GetLeadingSpan¶
std::span< const ElementType > ludus::foundation::core::RingBuffer< ElementType, Count >::GetLeadingSpan() const noexcept
Declared in modules/foundation/containers/include/ludus/foundation/containers/ring_buffer.hpp
GetTrailingSpan¶
std::span< ElementType > ludus::foundation::core::RingBuffer< ElementType, Count >::GetTrailingSpan() noexcept
Declared in modules/foundation/containers/include/ludus/foundation/containers/ring_buffer.hpp
GetTrailingSpan¶
std::span< const ElementType > ludus::foundation::core::RingBuffer< ElementType, Count >::GetTrailingSpan() const noexcept
Declared in modules/foundation/containers/include/ludus/foundation/containers/ring_buffer.hpp
TryAdd¶
bool ludus::foundation::core::RingBuffer< ElementType, Count >::TryAdd(const ElementType &value)
value at the back unless the ring is full. value may refer to an element of this ring. Returns
value are unchanged. Declared in modules/foundation/containers/include/ludus/foundation/containers/ring_buffer.hpp
TryAdd¶
bool ludus::foundation::core::RingBuffer< ElementType, Count >::TryAdd(ElementType &&value)
value at the back unless the ring is full. Returns
value is not moved from. Declared in modules/foundation/containers/include/ludus/foundation/containers/ring_buffer.hpp
TryAddInPlace¶
template <typename... Args>
ElementType * ludus::foundation::core::RingBuffer< ElementType, Count >::TryAddInPlace(Args &&... args)
args at the back unless the ring is full. args may refer to elements of this ring. Returns
args untouched. Declared in modules/foundation/containers/include/ludus/foundation/containers/ring_buffer.hpp
RemoveFirst¶
void ludus::foundation::core::RingBuffer< ElementType, Count >::RemoveFirst() noexcept
Precondition
Declared in modules/foundation/containers/include/ludus/foundation/containers/ring_buffer.hpp
Clear¶
void ludus::foundation::core::RingBuffer< ElementType, Count >::Clear() noexcept
Declared in modules/foundation/containers/include/ludus/foundation/containers/ring_buffer.hpp
Static methods¶
GetCapacity¶
static LUDUS_INLINE constexpr usize ludus::foundation::core::RingBuffer< ElementType, Count >::GetCapacity() noexcept
Related types: usize
Declared in modules/foundation/containers/include/ludus/foundation/containers/ring_buffer.hpp
Members¶
operator==¶
bool operator==(const RingBuffer &left, const RingBuffer &right)
Related types: RingBuffer
Declared in modules/foundation/containers/include/ludus/foundation/containers/ring_buffer.hpp