Open 3D Engine AzCore API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZStd::ring_buffer< T, Allocator > Class Template Reference

#include <ring_buffer.h>

Classes

class  const_iterator_impl
 
class  iterator_impl
 

Public Types

typedef T value_type
 
typedef T * pointer
 
typedef const T * const_pointer
 
typedef T & reference
 
typedef const T & const_reference
 
typedef Allocator::difference_type difference_type
 
typedef Allocator::size_type size_type
 
typedef Allocator allocator_type
 
typedef iterator_impl iterator
 
typedef const_iterator_impl const_iterator
 
typedef AZStd::reverse_iterator< iteratorreverse_iterator
 
typedef AZStd::reverse_iterator< const_iteratorconst_reverse_iterator
 
typedef AZStd::pair< pointer, size_type > array_range
 
typedef AZStd::pair< const_pointer, size_type > const_array_range
 
typedef value_type node_type
 Allocation node type. Common for all AZStd containers. For ring_buffer's case we allocate always "sizeof(node_type)*capacity" block.
 

Public Member Functions

AZ_FORCE_INLINE ring_buffer (const allocator_type &alloc=allocator_type())
 
AZ_FORCE_INLINE ring_buffer (size_type capacity, const allocator_type &alloc=allocator_type())
 
AZ_FORCE_INLINE ring_buffer (size_type size, const_reference value, const allocator_type &alloc=allocator_type())
 
AZ_FORCE_INLINE ring_buffer (size_type capacity, size_type size, const_reference value, const allocator_type &alloc=allocator_type())
 
AZ_FORCE_INLINE ring_buffer (const this_type &rhs)
 
template<class InputIterator >
AZ_FORCE_INLINE ring_buffer (InputIterator first, InputIterator last, const allocator_type &alloc=allocator_type())
 
template<class InputIterator >
AZ_FORCE_INLINE ring_buffer (size_type capacity, InputIterator first, InputIterator last, const allocator_type &alloc=allocator_type())
 
AZ_FORCE_INLINE this_typeoperator= (const this_type &rhs)
 
AZ_FORCE_INLINE iterator begin ()
 
AZ_FORCE_INLINE const_iterator begin () const
 
AZ_FORCE_INLINE iterator end ()
 
AZ_FORCE_INLINE const_iterator end () const
 
AZ_FORCE_INLINE reverse_iterator rbegin ()
 
AZ_FORCE_INLINE const_reverse_iterator rbegin () const
 
AZ_FORCE_INLINE reverse_iterator rend ()
 
AZ_FORCE_INLINE const_reverse_iterator rend () const
 
AZ_FORCE_INLINE reference operator[] (size_type index)
 
AZ_FORCE_INLINE const_reference operator[] (size_type index) const
 
AZ_FORCE_INLINE reference at (size_type index)
 
AZ_FORCE_INLINE const_reference at (size_type index) const
 
AZ_FORCE_INLINE reference front ()
 
AZ_FORCE_INLINE reference back ()
 
AZ_FORCE_INLINE const_reference front () const
 
AZ_FORCE_INLINE const_reference back () const
 
AZ_FORCE_INLINE array_range array_one ()
 Get the first continuous array of the internal buffer.
 
AZ_FORCE_INLINE array_range array_two ()
 
AZ_FORCE_INLINE const_array_range array_one () const
 
AZ_FORCE_INLINE const_array_range array_two () const
 
pointer linearize ()
 Linearize the internal buffer into a continuous array.
 
AZ_FORCE_INLINE bool is_linearized () const
 
void rotate (iterator new_begin)
 Rotate elements in the circular_buffer. A more effective implementation of AZStd::rotate.
 
AZ_FORCE_INLINE size_type size () const
 
AZ_FORCE_INLINE size_type max_size () const
 
AZ_FORCE_INLINE bool empty () const
 
AZ_FORCE_INLINE bool full () const
 
AZ_FORCE_INLINE size_type free () const
 
AZ_FORCE_INLINE size_type capacity () const
 
void resize (size_type new_size, const_reference value=value_type())
 
AZ_FORCE_INLINE void swap (this_type &rhs)
 
void push_back (const_reference value)
 
void push_back (value_type &&value)
 
template<class... Args>
reference emplace_back (Args &&... args)
 
void push_front (const_reference value)
 
void push_front (value_type &&value)
 
template<class... Args>
reference emplace_front (Args &&... args)
 
AZ_FORCE_INLINE void pop_back ()
 
AZ_FORCE_INLINE void pop_front ()
 
AZ_FORCE_INLINE iterator insert (iterator pos, const_reference value=value_type())
 
void insert (iterator pos, size_type size, const_reference value)
 
template<class InputIterator >
AZ_FORCE_INLINE void insert (iterator pos, InputIterator first, InputIterator last)
 
iterator erase (const_iterator constPos)
 
iterator erase (const_iterator constFirst, const_iterator constLast)
 
iterator rerase (iterator pos)
 
iterator rerase (iterator first, iterator last)
 Erase the range [first, last).
 
AZ_FORCE_INLINE void clear ()
 
void set_capacity (size_type new_capacity)
 
void rset_capacity (size_type new_capacity)
 
bool validate () const
 Validate container status.
 
int validate_iterator (const iterator &iter) const
 Validates an iter iterator. Returns a combination of iterator_status_flag.
 
int validate_iterator (const const_iterator &iter) const
 

Detailed Description

template<class T, class Allocator = AZStd::allocator>
class AZStd::ring_buffer< T, Allocator >

Ring buffer container, based on the boost circular_buffer.


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