GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::ArrayList< T, Allocator > Class Template Reference

#include <GREM/core/data/ArrayList.hpp>

Public Types

using value_type = T
using allocator_type = Allocator
using size_type = typename std::allocator_traits<Allocator>::size_type
using difference_type = typename std::allocator_traits<Allocator>::difference_type
using reference = value_type&
using const_reference = const value_type&
using pointer = typename std::allocator_traits<Allocator>::pointer
using const_pointer = typename std::allocator_traits<Allocator>::const_pointer
using iterator = pointer
using const_iterator = const_pointer
using reverse_iterator = std::reverse_iterator<iterator>
using const_reverse_iterator = std::reverse_iterator<const_iterator>

Public Member Functions

constexpr ArrayList () noexcept=default
constexpr ArrayList (const Allocator &allocator) noexcept
constexpr ArrayList (size_type count, const T &value, const Allocator &allocator=Allocator())
constexpr ArrayList (size_type count, const Allocator &allocator=Allocator())
template<std::input_iterator InputIterator, std::sentinel_for< InputIterator > Sentinel>
constexpr ArrayList (InputIterator first, Sentinel last, const Allocator &allocator=Allocator())
constexpr ArrayList (std::initializer_list< T > ilist, const Allocator &allocator=Allocator())
constexpr ~ArrayList ()
constexpr ArrayList (const ArrayList &other)
constexpr ArrayList (const ArrayList &other, const Allocator &allocator)
constexpr ArrayList (ArrayList &&other) noexcept
constexpr ArrayList (ArrayList &&other, const Allocator &allocator) noexcept
constexpr ArrayList & operator= (const ArrayList &other)
constexpr ArrayList & operator= (ArrayList &&other) noexcept(std::allocator_traits< Allocator >::propagate_on_container_move_assignment::value||//NOLINT(cppcoreguidelines-noexcept-move-operations, performance-noexcept-move-constructor) std::allocator_traits< Allocator >::is_always_equal::value)
constexpr ArrayList & operator= (std::initializer_list< T > ilist) noexcept
constexpr void assign (size_type count, const T &value)
template<std::input_iterator InputIterator, std::sentinel_for< InputIterator > Sentinel>
constexpr void assign (InputIterator first, Sentinel last)
constexpr void assign (std::initializer_list< T > ilist)
template<typename R>
constexpr void assign_range (R &&r)
constexpr allocator_type get_allocator () const noexcept
constexpr reference at (size_type pos)
constexpr const_reference at (size_type pos) const
constexpr reference operator[] (size_type pos)
constexpr const_reference operator[] (size_type pos) const
constexpr reference front ()
constexpr const_reference front () const
constexpr reference back ()
constexpr const_reference back () const
constexpr pointer data () noexcept
constexpr const_pointer data () const noexcept
constexpr iterator begin () noexcept
constexpr const_iterator begin () const noexcept
constexpr const_iterator cbegin () const noexcept
constexpr iterator end () noexcept
constexpr const_iterator end () const noexcept
constexpr const_iterator cend () const noexcept
constexpr reverse_iterator rbegin () noexcept
constexpr const_reverse_iterator rbegin () const noexcept
constexpr const_reverse_iterator crbegin () const noexcept
constexpr reverse_iterator rend () noexcept
constexpr const_reverse_iterator rend () const noexcept
constexpr const_reverse_iterator crend () const noexcept
constexpr bool empty () const noexcept
constexpr size_type size () const noexcept
constexpr size_type max_size () const noexcept
constexpr void reserve (size_type newCapacity)
constexpr size_type capacity () const noexcept
constexpr void shrink_to_fit ()
constexpr void clear () noexcept
constexpr iterator insert (const_iterator pos, const T &value)
constexpr iterator insert (const_iterator pos, T &&value)
constexpr iterator insert (const_iterator pos, size_type count, const T &value)
template<std::input_iterator InputIterator, std::sentinel_for< InputIterator > Sentinel>
constexpr iterator insert (const_iterator pos, InputIterator first, Sentinel last)
constexpr iterator insert (const_iterator pos, std::initializer_list< T > ilist)
template<typename R>
constexpr iterator insert_range (const_iterator pos, R &&r)
template<typename R>
constexpr void append_range (R &&r)
template<typename... Args>
constexpr iterator emplace (const_iterator pos, Args &&... args)
constexpr iterator erase (const_iterator pos)
constexpr iterator erase (const_iterator first, const_iterator last)
constexpr void push_back (const T &value)
constexpr void push_back (T &&value)
template<typename... Args>
constexpr reference emplace_back (Args &&... args)
constexpr void pop_back ()
constexpr void resize (size_type count)
constexpr void resize (size_type count, const value_type &value)
constexpr void swap (ArrayList &other) noexcept(std::allocator_traits< Allocator >::propagate_on_container_swap::value||//NOLINT(cppcoreguidelines-noexcept-swap, performance-noexcept-swap)(std::allocator_traits< Allocator >::is_always_equal::value &&std::is_nothrow_swappable_v< T >))
constexpr bool operator== (const ArrayList &other) const
constexpr bool operator< (const ArrayList &other) const
constexpr bool operator<= (const ArrayList &other) const
constexpr bool operator> (const ArrayList &other) const
constexpr bool operator>= (const ArrayList &other) const

Friends

constexpr void swap (ArrayList &a, ArrayList &b) noexcept
template<typename U>
constexpr size_type erase (ArrayList &c, const U &value)
template<typename Predicate>
constexpr size_type erase_if (ArrayList &c, Predicate predicate)

Member Typedef Documentation

◆ value_type

template<typename T, typename Allocator = std::allocator<T>>
using grem::ArrayList< T, Allocator >::value_type = T

◆ allocator_type

template<typename T, typename Allocator = std::allocator<T>>
using grem::ArrayList< T, Allocator >::allocator_type = Allocator

◆ size_type

template<typename T, typename Allocator = std::allocator<T>>
using grem::ArrayList< T, Allocator >::size_type = typename std::allocator_traits<Allocator>::size_type

◆ difference_type

template<typename T, typename Allocator = std::allocator<T>>
using grem::ArrayList< T, Allocator >::difference_type = typename std::allocator_traits<Allocator>::difference_type

◆ reference

template<typename T, typename Allocator = std::allocator<T>>
using grem::ArrayList< T, Allocator >::reference = value_type&

◆ const_reference

template<typename T, typename Allocator = std::allocator<T>>
using grem::ArrayList< T, Allocator >::const_reference = const value_type&

◆ pointer

template<typename T, typename Allocator = std::allocator<T>>
using grem::ArrayList< T, Allocator >::pointer = typename std::allocator_traits<Allocator>::pointer

◆ const_pointer

template<typename T, typename Allocator = std::allocator<T>>
using grem::ArrayList< T, Allocator >::const_pointer = typename std::allocator_traits<Allocator>::const_pointer

◆ iterator

template<typename T, typename Allocator = std::allocator<T>>
using grem::ArrayList< T, Allocator >::iterator = pointer

◆ const_iterator

template<typename T, typename Allocator = std::allocator<T>>
using grem::ArrayList< T, Allocator >::const_iterator = const_pointer

◆ reverse_iterator

template<typename T, typename Allocator = std::allocator<T>>
using grem::ArrayList< T, Allocator >::reverse_iterator = std::reverse_iterator<iterator>

◆ const_reverse_iterator

template<typename T, typename Allocator = std::allocator<T>>
using grem::ArrayList< T, Allocator >::const_reverse_iterator = std::reverse_iterator<const_iterator>

Constructor & Destructor Documentation

◆ ArrayList() [1/10]

template<typename T, typename Allocator = std::allocator<T>>
grem::ArrayList< T, Allocator >::ArrayList ( )
constexprdefaultnoexcept

◆ ArrayList() [2/10]

template<typename T, typename Allocator = std::allocator<T>>
grem::ArrayList< T, Allocator >::ArrayList ( const Allocator & allocator)
inlineexplicitconstexprnoexcept

◆ ArrayList() [3/10]

template<typename T, typename Allocator = std::allocator<T>>
grem::ArrayList< T, Allocator >::ArrayList ( size_type count,
const T & value,
const Allocator & allocator = Allocator() )
inlineconstexpr

◆ ArrayList() [4/10]

template<typename T, typename Allocator = std::allocator<T>>
grem::ArrayList< T, Allocator >::ArrayList ( size_type count,
const Allocator & allocator = Allocator() )
inlineexplicitconstexpr

◆ ArrayList() [5/10]

template<typename T, typename Allocator = std::allocator<T>>
template<std::input_iterator InputIterator, std::sentinel_for< InputIterator > Sentinel>
grem::ArrayList< T, Allocator >::ArrayList ( InputIterator first,
Sentinel last,
const Allocator & allocator = Allocator() )
inlineconstexpr

◆ ArrayList() [6/10]

template<typename T, typename Allocator = std::allocator<T>>
grem::ArrayList< T, Allocator >::ArrayList ( std::initializer_list< T > ilist,
const Allocator & allocator = Allocator() )
inlineconstexpr

◆ ~ArrayList()

template<typename T, typename Allocator = std::allocator<T>>
grem::ArrayList< T, Allocator >::~ArrayList ( )
inlineconstexpr

◆ ArrayList() [7/10]

template<typename T, typename Allocator = std::allocator<T>>
grem::ArrayList< T, Allocator >::ArrayList ( const ArrayList< T, Allocator > & other)
inlineconstexpr

◆ ArrayList() [8/10]

template<typename T, typename Allocator = std::allocator<T>>
grem::ArrayList< T, Allocator >::ArrayList ( const ArrayList< T, Allocator > & other,
const Allocator & allocator )
inlineconstexpr

◆ ArrayList() [9/10]

template<typename T, typename Allocator = std::allocator<T>>
grem::ArrayList< T, Allocator >::ArrayList ( ArrayList< T, Allocator > && other)
inlineconstexprnoexcept

◆ ArrayList() [10/10]

template<typename T, typename Allocator = std::allocator<T>>
grem::ArrayList< T, Allocator >::ArrayList ( ArrayList< T, Allocator > && other,
const Allocator & allocator )
inlineconstexprnoexcept

Member Function Documentation

◆ operator=() [1/3]

template<typename T, typename Allocator = std::allocator<T>>
ArrayList & grem::ArrayList< T, Allocator >::operator= ( const ArrayList< T, Allocator > & other)
inlineconstexpr

◆ operator=() [2/3]

template<typename T, typename Allocator = std::allocator<T>>
ArrayList & grem::ArrayList< T, Allocator >::operator= ( ArrayList< T, Allocator > && other)
inlineconstexprnoexcept

◆ operator=() [3/3]

template<typename T, typename Allocator = std::allocator<T>>
ArrayList & grem::ArrayList< T, Allocator >::operator= ( std::initializer_list< T > ilist)
inlineconstexprnoexcept

◆ assign() [1/3]

template<typename T, typename Allocator = std::allocator<T>>
void grem::ArrayList< T, Allocator >::assign ( size_type count,
const T & value )
inlineconstexpr

◆ assign() [2/3]

template<typename T, typename Allocator = std::allocator<T>>
template<std::input_iterator InputIterator, std::sentinel_for< InputIterator > Sentinel>
void grem::ArrayList< T, Allocator >::assign ( InputIterator first,
Sentinel last )
inlineconstexpr

◆ assign() [3/3]

template<typename T, typename Allocator = std::allocator<T>>
void grem::ArrayList< T, Allocator >::assign ( std::initializer_list< T > ilist)
inlineconstexpr

◆ assign_range()

template<typename T, typename Allocator = std::allocator<T>>
template<typename R>
void grem::ArrayList< T, Allocator >::assign_range ( R && r)
inlineconstexpr

◆ get_allocator()

template<typename T, typename Allocator = std::allocator<T>>
allocator_type grem::ArrayList< T, Allocator >::get_allocator ( ) const
inlinenodiscardconstexprnoexcept

◆ at() [1/2]

template<typename T, typename Allocator = std::allocator<T>>
reference grem::ArrayList< T, Allocator >::at ( size_type pos)
inlinenodiscardconstexpr

◆ at() [2/2]

template<typename T, typename Allocator = std::allocator<T>>
const_reference grem::ArrayList< T, Allocator >::at ( size_type pos) const
inlinenodiscardconstexpr

◆ operator[]() [1/2]

template<typename T, typename Allocator = std::allocator<T>>
reference grem::ArrayList< T, Allocator >::operator[] ( size_type pos)
inlinenodiscardconstexpr

◆ operator[]() [2/2]

template<typename T, typename Allocator = std::allocator<T>>
const_reference grem::ArrayList< T, Allocator >::operator[] ( size_type pos) const
inlinenodiscardconstexpr

◆ front() [1/2]

template<typename T, typename Allocator = std::allocator<T>>
reference grem::ArrayList< T, Allocator >::front ( )
inlinenodiscardconstexpr

◆ front() [2/2]

template<typename T, typename Allocator = std::allocator<T>>
const_reference grem::ArrayList< T, Allocator >::front ( ) const
inlinenodiscardconstexpr

◆ back() [1/2]

template<typename T, typename Allocator = std::allocator<T>>
reference grem::ArrayList< T, Allocator >::back ( )
inlinenodiscardconstexpr

◆ back() [2/2]

template<typename T, typename Allocator = std::allocator<T>>
const_reference grem::ArrayList< T, Allocator >::back ( ) const
inlinenodiscardconstexpr

◆ data() [1/2]

template<typename T, typename Allocator = std::allocator<T>>
pointer grem::ArrayList< T, Allocator >::data ( )
inlinenodiscardconstexprnoexcept

◆ data() [2/2]

template<typename T, typename Allocator = std::allocator<T>>
const_pointer grem::ArrayList< T, Allocator >::data ( ) const
inlinenodiscardconstexprnoexcept

◆ begin() [1/2]

template<typename T, typename Allocator = std::allocator<T>>
iterator grem::ArrayList< T, Allocator >::begin ( )
inlinenodiscardconstexprnoexcept

◆ begin() [2/2]

template<typename T, typename Allocator = std::allocator<T>>
const_iterator grem::ArrayList< T, Allocator >::begin ( ) const
inlinenodiscardconstexprnoexcept

◆ cbegin()

template<typename T, typename Allocator = std::allocator<T>>
const_iterator grem::ArrayList< T, Allocator >::cbegin ( ) const
inlinenodiscardconstexprnoexcept

◆ end() [1/2]

template<typename T, typename Allocator = std::allocator<T>>
iterator grem::ArrayList< T, Allocator >::end ( )
inlinenodiscardconstexprnoexcept

◆ end() [2/2]

template<typename T, typename Allocator = std::allocator<T>>
const_iterator grem::ArrayList< T, Allocator >::end ( ) const
inlinenodiscardconstexprnoexcept

◆ cend()

template<typename T, typename Allocator = std::allocator<T>>
const_iterator grem::ArrayList< T, Allocator >::cend ( ) const
inlinenodiscardconstexprnoexcept

◆ rbegin() [1/2]

template<typename T, typename Allocator = std::allocator<T>>
reverse_iterator grem::ArrayList< T, Allocator >::rbegin ( )
inlinenodiscardconstexprnoexcept

◆ rbegin() [2/2]

template<typename T, typename Allocator = std::allocator<T>>
const_reverse_iterator grem::ArrayList< T, Allocator >::rbegin ( ) const
inlinenodiscardconstexprnoexcept

◆ crbegin()

template<typename T, typename Allocator = std::allocator<T>>
const_reverse_iterator grem::ArrayList< T, Allocator >::crbegin ( ) const
inlinenodiscardconstexprnoexcept

◆ rend() [1/2]

template<typename T, typename Allocator = std::allocator<T>>
reverse_iterator grem::ArrayList< T, Allocator >::rend ( )
inlinenodiscardconstexprnoexcept

◆ rend() [2/2]

template<typename T, typename Allocator = std::allocator<T>>
const_reverse_iterator grem::ArrayList< T, Allocator >::rend ( ) const
inlinenodiscardconstexprnoexcept

◆ crend()

template<typename T, typename Allocator = std::allocator<T>>
const_reverse_iterator grem::ArrayList< T, Allocator >::crend ( ) const
inlinenodiscardconstexprnoexcept

◆ empty()

template<typename T, typename Allocator = std::allocator<T>>
bool grem::ArrayList< T, Allocator >::empty ( ) const
inlinenodiscardconstexprnoexcept

◆ size()

template<typename T, typename Allocator = std::allocator<T>>
size_type grem::ArrayList< T, Allocator >::size ( ) const
inlinenodiscardconstexprnoexcept

◆ max_size()

template<typename T, typename Allocator = std::allocator<T>>
size_type grem::ArrayList< T, Allocator >::max_size ( ) const
inlinenodiscardconstexprnoexcept

◆ reserve()

template<typename T, typename Allocator = std::allocator<T>>
void grem::ArrayList< T, Allocator >::reserve ( size_type newCapacity)
inlineconstexpr

◆ capacity()

template<typename T, typename Allocator = std::allocator<T>>
size_type grem::ArrayList< T, Allocator >::capacity ( ) const
inlinenodiscardconstexprnoexcept

◆ shrink_to_fit()

template<typename T, typename Allocator = std::allocator<T>>
void grem::ArrayList< T, Allocator >::shrink_to_fit ( )
inlineconstexpr

◆ clear()

template<typename T, typename Allocator = std::allocator<T>>
void grem::ArrayList< T, Allocator >::clear ( )
inlineconstexprnoexcept

◆ insert() [1/5]

template<typename T, typename Allocator = std::allocator<T>>
iterator grem::ArrayList< T, Allocator >::insert ( const_iterator pos,
const T & value )
inlineconstexpr

◆ insert() [2/5]

template<typename T, typename Allocator = std::allocator<T>>
iterator grem::ArrayList< T, Allocator >::insert ( const_iterator pos,
T && value )
inlineconstexpr

◆ insert() [3/5]

template<typename T, typename Allocator = std::allocator<T>>
iterator grem::ArrayList< T, Allocator >::insert ( const_iterator pos,
size_type count,
const T & value )
inlineconstexpr

◆ insert() [4/5]

template<typename T, typename Allocator = std::allocator<T>>
template<std::input_iterator InputIterator, std::sentinel_for< InputIterator > Sentinel>
iterator grem::ArrayList< T, Allocator >::insert ( const_iterator pos,
InputIterator first,
Sentinel last )
inlineconstexpr

◆ insert() [5/5]

template<typename T, typename Allocator = std::allocator<T>>
iterator grem::ArrayList< T, Allocator >::insert ( const_iterator pos,
std::initializer_list< T > ilist )
inlineconstexpr

◆ insert_range()

template<typename T, typename Allocator = std::allocator<T>>
template<typename R>
iterator grem::ArrayList< T, Allocator >::insert_range ( const_iterator pos,
R && r )
inlineconstexpr

◆ append_range()

template<typename T, typename Allocator = std::allocator<T>>
template<typename R>
void grem::ArrayList< T, Allocator >::append_range ( R && r)
inlineconstexpr

◆ emplace()

template<typename T, typename Allocator = std::allocator<T>>
template<typename... Args>
iterator grem::ArrayList< T, Allocator >::emplace ( const_iterator pos,
Args &&... args )
inlineconstexpr

◆ erase() [1/2]

template<typename T, typename Allocator = std::allocator<T>>
iterator grem::ArrayList< T, Allocator >::erase ( const_iterator pos)
inlineconstexpr

◆ erase() [2/2]

template<typename T, typename Allocator = std::allocator<T>>
iterator grem::ArrayList< T, Allocator >::erase ( const_iterator first,
const_iterator last )
inlineconstexpr

◆ push_back() [1/2]

template<typename T, typename Allocator = std::allocator<T>>
void grem::ArrayList< T, Allocator >::push_back ( const T & value)
inlineconstexpr

◆ push_back() [2/2]

template<typename T, typename Allocator = std::allocator<T>>
void grem::ArrayList< T, Allocator >::push_back ( T && value)
inlineconstexpr

◆ emplace_back()

template<typename T, typename Allocator = std::allocator<T>>
template<typename... Args>
reference grem::ArrayList< T, Allocator >::emplace_back ( Args &&... args)
inlineconstexpr

◆ pop_back()

template<typename T, typename Allocator = std::allocator<T>>
void grem::ArrayList< T, Allocator >::pop_back ( )
inlineconstexpr

◆ resize() [1/2]

template<typename T, typename Allocator = std::allocator<T>>
void grem::ArrayList< T, Allocator >::resize ( size_type count)
inlineconstexpr

◆ resize() [2/2]

template<typename T, typename Allocator = std::allocator<T>>
void grem::ArrayList< T, Allocator >::resize ( size_type count,
const value_type & value )
inlineconstexpr

◆ swap()

template<typename T, typename Allocator = std::allocator<T>>
void grem::ArrayList< T, Allocator >::swap ( ArrayList< T, Allocator > & other)
inlineconstexprnoexcept

◆ operator==()

template<typename T, typename Allocator = std::allocator<T>>
bool grem::ArrayList< T, Allocator >::operator== ( const ArrayList< T, Allocator > & other) const
inlinenodiscardconstexpr

◆ operator<()

template<typename T, typename Allocator = std::allocator<T>>
bool grem::ArrayList< T, Allocator >::operator< ( const ArrayList< T, Allocator > & other) const
inlinenodiscardconstexpr

◆ operator<=()

template<typename T, typename Allocator = std::allocator<T>>
bool grem::ArrayList< T, Allocator >::operator<= ( const ArrayList< T, Allocator > & other) const
inlinenodiscardconstexpr

◆ operator>()

template<typename T, typename Allocator = std::allocator<T>>
bool grem::ArrayList< T, Allocator >::operator> ( const ArrayList< T, Allocator > & other) const
inlinenodiscardconstexpr

◆ operator>=()

template<typename T, typename Allocator = std::allocator<T>>
bool grem::ArrayList< T, Allocator >::operator>= ( const ArrayList< T, Allocator > & other) const
inlinenodiscardconstexpr

◆ swap

template<typename T, typename Allocator = std::allocator<T>>
void swap ( ArrayList< T, Allocator > & a,
ArrayList< T, Allocator > & b )
friend

◆ erase

template<typename T, typename Allocator = std::allocator<T>>
template<typename U>
size_type erase ( ArrayList< T, Allocator > & c,
const U & value )
friend

◆ erase_if

template<typename T, typename Allocator = std::allocator<T>>
template<typename Predicate>
size_type erase_if ( ArrayList< T, Allocator > & c,
Predicate predicate )
friend

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