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

JSON array type whose API mimics that of std::vector<Value>. More...

#include <GREM/core/formats/json.hpp>

Public Types

using value_type = ValueBase<Allocator>
using size_type = typename ArrayList<value_type>::size_type
using difference_type = typename ArrayList<value_type>::difference_type
using allocator_type = Allocator<value_type>
using reference = typename ArrayList<value_type>::reference
using const_reference = typename ArrayList<value_type>::const_reference
using pointer = typename ArrayList<value_type>::pointer
using const_pointer = typename ArrayList<value_type>::const_pointer
using iterator = typename ArrayList<value_type>::iterator
using const_iterator = typename ArrayList<value_type>::const_iterator
using reverse_iterator = typename ArrayList<value_type>::reverse_iterator
using const_reverse_iterator = typename ArrayList<value_type>::const_reverse_iterator

Public Member Functions

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

Friends

template<typename U>
size_type erase (ArrayBase &container, const U &value)
template<typename Predicate>
size_type erase_if (ArrayBase &container, Predicate predicate)

Detailed Description

template<template< typename > typename Allocator>
class grem::json::ArrayBase< Allocator >

JSON array type whose API mimics that of std::vector<Value>.

Template Parameters
Allocatorallocator type template to use.

Member Typedef Documentation

◆ value_type

template<template< typename > typename Allocator>
using grem::json::ArrayBase< Allocator >::value_type = ValueBase<Allocator>

◆ size_type

template<template< typename > typename Allocator>
using grem::json::ArrayBase< Allocator >::size_type = typename ArrayList<value_type>::size_type

◆ difference_type

template<template< typename > typename Allocator>
using grem::json::ArrayBase< Allocator >::difference_type = typename ArrayList<value_type>::difference_type

◆ allocator_type

template<template< typename > typename Allocator>
using grem::json::ArrayBase< Allocator >::allocator_type = Allocator<value_type>

◆ reference

template<template< typename > typename Allocator>
using grem::json::ArrayBase< Allocator >::reference = typename ArrayList<value_type>::reference

◆ const_reference

template<template< typename > typename Allocator>
using grem::json::ArrayBase< Allocator >::const_reference = typename ArrayList<value_type>::const_reference

◆ pointer

template<template< typename > typename Allocator>
using grem::json::ArrayBase< Allocator >::pointer = typename ArrayList<value_type>::pointer

◆ const_pointer

template<template< typename > typename Allocator>
using grem::json::ArrayBase< Allocator >::const_pointer = typename ArrayList<value_type>::const_pointer

◆ iterator

template<template< typename > typename Allocator>
using grem::json::ArrayBase< Allocator >::iterator = typename ArrayList<value_type>::iterator

◆ const_iterator

template<template< typename > typename Allocator>
using grem::json::ArrayBase< Allocator >::const_iterator = typename ArrayList<value_type>::const_iterator

◆ reverse_iterator

template<template< typename > typename Allocator>
using grem::json::ArrayBase< Allocator >::reverse_iterator = typename ArrayList<value_type>::reverse_iterator

◆ const_reverse_iterator

template<template< typename > typename Allocator>
using grem::json::ArrayBase< Allocator >::const_reverse_iterator = typename ArrayList<value_type>::const_reverse_iterator

Constructor & Destructor Documentation

◆ ArrayBase() [1/9]

template<template< typename > typename Allocator>
grem::json::ArrayBase< Allocator >::ArrayBase ( )
inlinenoexcept

◆ ArrayBase() [2/9]

template<template< typename > typename Allocator>
grem::json::ArrayBase< Allocator >::ArrayBase ( const allocator_type & allocator)
inlineexplicitnoexcept

◆ ~ArrayBase()

template<template< typename > typename Allocator>
grem::json::ArrayBase< Allocator >::~ArrayBase ( )
inlinedefault

◆ ArrayBase() [3/9]

template<template< typename > typename Allocator>
template<input_iterator InputIterator, sentinel_for< InputIterator > Sentinel>
grem::json::ArrayBase< Allocator >::ArrayBase ( InputIterator first,
Sentinel last,
const allocator_type & allocator = allocator_type() )
inline

◆ ArrayBase() [4/9]

template<template< typename > typename Allocator>
grem::json::ArrayBase< Allocator >::ArrayBase ( size_type count,
const value_type & value,
const allocator_type & allocator = allocator_type() )
inline

◆ ArrayBase() [5/9]

template<template< typename > typename Allocator>
grem::json::ArrayBase< Allocator >::ArrayBase ( std::initializer_list< value_type > ilist,
const allocator_type & allocator = allocator_type() )
inline

◆ ArrayBase() [6/9]

template<template< typename > typename Allocator>
grem::json::ArrayBase< Allocator >::ArrayBase ( const ArrayBase< Allocator > & other,
const allocator_type & allocator )
inline

◆ ArrayBase() [7/9]

template<template< typename > typename Allocator>
grem::json::ArrayBase< Allocator >::ArrayBase ( const ArrayBase< Allocator > & other)
inline

◆ ArrayBase() [8/9]

template<template< typename > typename Allocator>
grem::json::ArrayBase< Allocator >::ArrayBase ( ArrayBase< Allocator > && other,
const allocator_type & allocator )
inlinenoexcept

◆ ArrayBase() [9/9]

template<template< typename > typename Allocator>
grem::json::ArrayBase< Allocator >::ArrayBase ( ArrayBase< Allocator > && other)
inlinenoexcept

Member Function Documentation

◆ operator=() [1/3]

template<template< typename > typename Allocator>
ArrayBase< Allocator > & grem::json::ArrayBase< Allocator >::operator= ( const ArrayBase< Allocator > & other)
inlinedefault

◆ operator=() [2/3]

template<template< typename > typename Allocator>
ArrayBase< Allocator > & grem::json::ArrayBase< Allocator >::operator= ( ArrayBase< Allocator > && other) const
inlinedefaultnoexcept

◆ operator=() [3/3]

template<template< typename > typename Allocator>
ArrayBase< Allocator > & grem::json::ArrayBase< Allocator >::operator= ( std::initializer_list< value_type > ilist)
inline

◆ swap()

template<template< typename > typename Allocator>
void grem::json::ArrayBase< Allocator >::swap ( ArrayBase< Allocator > & other)
inlinenoexcept

◆ get_allocator()

template<template< typename > typename Allocator>
ArrayBase< Allocator >::allocator_type grem::json::ArrayBase< Allocator >::get_allocator ( ) const
inlinenodiscardnoexcept

◆ data() [1/2]

template<template< typename > typename Allocator>
ArrayBase< Allocator >::pointer grem::json::ArrayBase< Allocator >::data ( )
inlinenodiscardnoexcept

◆ data() [2/2]

template<template< typename > typename Allocator>
ArrayBase< Allocator >::const_pointer grem::json::ArrayBase< Allocator >::data ( ) const
inlinenodiscardnoexcept

◆ size()

template<template< typename > typename Allocator>
ArrayBase< Allocator >::size_type grem::json::ArrayBase< Allocator >::size ( ) const
inlinenodiscardnoexcept

◆ max_size()

template<template< typename > typename Allocator>
ArrayBase< Allocator >::size_type grem::json::ArrayBase< Allocator >::max_size ( ) const
inlinenodiscardnoexcept

◆ capacity()

template<template< typename > typename Allocator>
ArrayBase< Allocator >::size_type grem::json::ArrayBase< Allocator >::capacity ( ) const
inlinenodiscardnoexcept

◆ empty()

template<template< typename > typename Allocator>
bool grem::json::ArrayBase< Allocator >::empty ( ) const
inlinenodiscardnoexcept

◆ begin() [1/2]

template<template< typename > typename Allocator>
ArrayBase< Allocator >::iterator grem::json::ArrayBase< Allocator >::begin ( )
inlinenodiscardnoexcept

◆ begin() [2/2]

template<template< typename > typename Allocator>
ArrayBase< Allocator >::const_iterator grem::json::ArrayBase< Allocator >::begin ( ) const
inlinenodiscardnoexcept

◆ cbegin()

template<template< typename > typename Allocator>
ArrayBase< Allocator >::const_iterator grem::json::ArrayBase< Allocator >::cbegin ( ) const
inlinenodiscardnoexcept

◆ end() [1/2]

template<template< typename > typename Allocator>
ArrayBase< Allocator >::iterator grem::json::ArrayBase< Allocator >::end ( )
inlinenodiscardnoexcept

◆ end() [2/2]

template<template< typename > typename Allocator>
ArrayBase< Allocator >::const_iterator grem::json::ArrayBase< Allocator >::end ( ) const
inlinenodiscardnoexcept

◆ cend()

template<template< typename > typename Allocator>
ArrayBase< Allocator >::const_iterator grem::json::ArrayBase< Allocator >::cend ( ) const
inlinenodiscardnoexcept

◆ rbegin() [1/2]

template<template< typename > typename Allocator>
ArrayBase< Allocator >::reverse_iterator grem::json::ArrayBase< Allocator >::rbegin ( )
inlinenodiscardnoexcept

◆ rbegin() [2/2]

template<template< typename > typename Allocator>
ArrayBase< Allocator >::const_reverse_iterator grem::json::ArrayBase< Allocator >::rbegin ( ) const
inlinenodiscardnoexcept

◆ crbegin()

template<template< typename > typename Allocator>
ArrayBase< Allocator >::const_reverse_iterator grem::json::ArrayBase< Allocator >::crbegin ( ) const
inlinenodiscardnoexcept

◆ rend() [1/2]

template<template< typename > typename Allocator>
ArrayBase< Allocator >::reverse_iterator grem::json::ArrayBase< Allocator >::rend ( )
inlinenodiscardnoexcept

◆ rend() [2/2]

template<template< typename > typename Allocator>
ArrayBase< Allocator >::const_reverse_iterator grem::json::ArrayBase< Allocator >::rend ( ) const
inlinenodiscardnoexcept

◆ crend()

template<template< typename > typename Allocator>
ArrayBase< Allocator >::const_reverse_iterator grem::json::ArrayBase< Allocator >::crend ( ) const
inlinenodiscardnoexcept

◆ front() [1/2]

template<template< typename > typename Allocator>
ArrayBase< Allocator >::reference grem::json::ArrayBase< Allocator >::front ( )
inlinenodiscard

◆ front() [2/2]

template<template< typename > typename Allocator>
ArrayBase< Allocator >::const_reference grem::json::ArrayBase< Allocator >::front ( ) const
inlinenodiscard

◆ back() [1/2]

template<template< typename > typename Allocator>
ArrayBase< Allocator >::reference grem::json::ArrayBase< Allocator >::back ( )
inlinenodiscard

◆ back() [2/2]

template<template< typename > typename Allocator>
ArrayBase< Allocator >::const_reference grem::json::ArrayBase< Allocator >::back ( ) const
inlinenodiscard

◆ at() [1/2]

template<template< typename > typename Allocator>
ArrayBase< Allocator >::reference grem::json::ArrayBase< Allocator >::at ( size_type pos)
inlinenodiscard

◆ at() [2/2]

template<template< typename > typename Allocator>
ArrayBase< Allocator >::const_reference grem::json::ArrayBase< Allocator >::at ( size_type pos) const
inlinenodiscard

◆ operator[]() [1/2]

template<template< typename > typename Allocator>
ArrayBase< Allocator >::reference grem::json::ArrayBase< Allocator >::operator[] ( size_type pos)
inlinenodiscard

◆ operator[]() [2/2]

template<template< typename > typename Allocator>
ArrayBase< Allocator >::const_reference grem::json::ArrayBase< Allocator >::operator[] ( size_type pos) const
inlinenodiscard

◆ operator==()

template<template< typename > typename Allocator>
bool grem::json::ArrayBase< Allocator >::operator== ( const ArrayBase< Allocator > & other) const
inlinenodiscard

◆ operator<=>()

template<template< typename > typename Allocator>
std::partial_ordering grem::json::ArrayBase< Allocator >::operator<=> ( const ArrayBase< Allocator > & other) const
inlinenodiscardnoexcept

◆ clear()

template<template< typename > typename Allocator>
void grem::json::ArrayBase< Allocator >::clear ( )
inlinenoexcept

◆ reserve()

template<template< typename > typename Allocator>
void grem::json::ArrayBase< Allocator >::reserve ( size_type newCapacity)
inline

◆ shrink_to_fit()

template<template< typename > typename Allocator>
void grem::json::ArrayBase< Allocator >::shrink_to_fit ( )
inline

◆ assign() [1/3]

template<template< typename > typename Allocator>
void grem::json::ArrayBase< Allocator >::assign ( size_type count,
const value_type & value )
inline

◆ assign() [2/3]

template<template< typename > typename Allocator>
template<input_iterator InputIterator, sentinel_for< InputIterator > Sentinel>
void grem::json::ArrayBase< Allocator >::assign ( InputIterator first,
Sentinel last )
inline

◆ assign() [3/3]

template<template< typename > typename Allocator>
void grem::json::ArrayBase< Allocator >::assign ( std::initializer_list< value_type > ilist)
inline

◆ assign_range()

template<template< typename > typename Allocator>
template<typename R>
void grem::json::ArrayBase< Allocator >::assign_range ( R && r)
inline

◆ insert() [1/5]

template<template< typename > typename Allocator>
ArrayBase< Allocator >::iterator grem::json::ArrayBase< Allocator >::insert ( const_iterator pos,
const value_type & value )
inline

◆ insert() [2/5]

template<template< typename > typename Allocator>
ArrayBase< Allocator >::iterator grem::json::ArrayBase< Allocator >::insert ( const_iterator pos,
value_type && value )
inline

◆ insert() [3/5]

template<template< typename > typename Allocator>
ArrayBase< Allocator >::iterator grem::json::ArrayBase< Allocator >::insert ( const_iterator pos,
size_type count,
const value_type & value )
inline

◆ insert() [4/5]

template<template< typename > typename Allocator>
template<input_iterator InputIterator, sentinel_for< InputIterator > Sentinel>
ArrayBase< Allocator >::iterator grem::json::ArrayBase< Allocator >::insert ( const_iterator pos,
InputIterator first,
Sentinel last )
inline

◆ insert() [5/5]

template<template< typename > typename Allocator>
ArrayBase< Allocator >::iterator grem::json::ArrayBase< Allocator >::insert ( const_iterator pos,
std::initializer_list< value_type > ilist )
inline

◆ insert_range()

template<template< typename > typename Allocator>
template<typename R>
ArrayBase< Allocator >::iterator grem::json::ArrayBase< Allocator >::insert_range ( const_iterator pos,
R && r )
inline

◆ append_range()

template<template< typename > typename Allocator>
template<typename R>
void grem::json::ArrayBase< Allocator >::append_range ( R && r)
inline

◆ emplace()

template<template< typename > typename Allocator>
template<typename... Args>
ArrayBase< Allocator >::iterator grem::json::ArrayBase< Allocator >::emplace ( const_iterator pos,
Args &&... args )
inline

◆ erase() [1/2]

template<template< typename > typename Allocator>
ArrayBase< Allocator >::iterator grem::json::ArrayBase< Allocator >::erase ( const_iterator pos)
inline

◆ erase() [2/2]

template<template< typename > typename Allocator>
ArrayBase< Allocator >::iterator grem::json::ArrayBase< Allocator >::erase ( const_iterator first,
const_iterator last )
inline

◆ push_back() [1/2]

template<template< typename > typename Allocator>
void grem::json::ArrayBase< Allocator >::push_back ( const value_type & value)
inline

◆ push_back() [2/2]

template<template< typename > typename Allocator>
void grem::json::ArrayBase< Allocator >::push_back ( value_type && value)
inline

◆ emplace_back()

template<template< typename > typename Allocator>
template<typename... Args>
ArrayBase< Allocator >::reference grem::json::ArrayBase< Allocator >::emplace_back ( Args &&... args)
inline

◆ pop_back()

template<template< typename > typename Allocator>
void grem::json::ArrayBase< Allocator >::pop_back ( )
inline

◆ resize() [1/2]

template<template< typename > typename Allocator>
void grem::json::ArrayBase< Allocator >::resize ( size_type count)
inline

◆ resize() [2/2]

template<template< typename > typename Allocator>
void grem::json::ArrayBase< Allocator >::resize ( size_type count,
const value_type & value )
inline

◆ erase

template<template< typename > typename Allocator>
template<typename U>
size_type erase ( ArrayBase< Allocator > & container,
const U & value )
friend

◆ erase_if

template<template< typename > typename Allocator>
template<typename Predicate>
size_type erase_if ( ArrayBase< Allocator > & container,
Predicate predicate )
friend

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