neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neolib::segmented_array< T, SegmentSize, Alloc > Class Template Reference

#include <segmented_array.hpp>

Inheritance diagram for neolib::segmented_array< T, SegmentSize, Alloc >:
neolib::array_tree< Alloc >

Classes

class  const_iterator
 
class  iterator
 

Public Types

typedef T value_type
 
typedef Alloc allocator_type
 
typedef value_typereference
 
typedef value_type constconst_reference
 
typedef std::allocator_traits< allocator_type >::pointer pointer
 
typedef std::allocator_traits< allocator_type >::const_pointer const_pointer
 
typedef std::allocator_traits< allocator_type >::size_type size_type
 
typedef std::allocator_traits< allocator_type >::difference_type difference_type
 
typedef std::reverse_iterator< iteratorreverse_iterator
 
typedef std::reverse_iterator< const_iteratorconst_reverse_iterator
 

Public Member Functions

 segmented_array (const Alloc &aAllocator=Alloc())
 
 segmented_array (const size_type aCount, const value_type &aValue, const Alloc &aAllocator=Alloc())
 
template<typename InputIterator >
 segmented_array (InputIterator aFirst, InputIterator aLast, const Alloc &aAllocator=Alloc())
 
 segmented_array (const segmented_array &aOther, const Alloc &aAllocator=Alloc())
 
 segmented_array (segmented_array &&aOther)
 
 ~segmented_array ()
 
segmented_arrayoperator= (segmented_array &&aOther)
 
segmented_arrayoperator= (const segmented_array &aOther)
 
size_type size () const
 
bool empty () const
 
const_iterator cbegin () const
 
const_iterator begin () const
 
const_iterator cend () const
 
const_iterator end () const
 
iterator begin ()
 
iterator end ()
 
const_reverse_iterator rbegin () const
 
const_reverse_iterator rend () const
 
reverse_iterator rbegin ()
 
reverse_iterator rend ()
 
const_iterator citer (const value_type &aValue) const
 
const_iterator iter (const value_type &aValue) const
 
iterator iter (const value_type &aValue)
 
const_reference front () const
 
reference front ()
 
const_reference back () const
 
reference back ()
 
iterator insert (const_iterator aPosition, const value_type &aValue)
 
template<typename... Args>
iterator emplace_insert (const_iterator aPosition, Args &&... aArguments)
 
const_reference operator[] (size_type aIndex) const
 
reference operator[] (size_type aIndex)
 
template<class InputIterator >
std::enable_if<!std::is_integral< InputIterator >::value, iterator >::type insert (const_iterator aPosition, InputIterator aFirst, InputIterator aLast)
 
iterator insert (const_iterator aPosition, size_type aCount, const value_type &aValue)
 
template<typename... Args>
iterator emplace_insert (const_iterator aPosition, size_type aCount, Args &&... aArguments)
 
void clear ()
 
void push_front (const value_type &aValue)
 
void push_back (const value_type &aValue)
 
template<typename... Args>
void emplace_front (Args &&... aArguments)
 
template<typename... Args>
void emplace_back (Args &&... aArguments)
 
void resize (std::size_t aNewSize, const value_type &aValue=value_type{})
 
iterator erase (const_iterator aPosition)
 
iterator erase (const_iterator aFirst, const_iterator aLast)
 
void pop_front ()
 
void pop_back ()
 
void swap (segmented_array &aOther)
 

Detailed Description

template<typename T, std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
class neolib::segmented_array< T, SegmentSize, Alloc >

Definition at line 48 of file segmented_array.hpp.

Member Typedef Documentation

◆ allocator_type

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
typedef Alloc neolib::segmented_array< T, SegmentSize, Alloc >::allocator_type

Definition at line 54 of file segmented_array.hpp.

◆ const_pointer

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
typedef std::allocator_traits<allocator_type>::const_pointer neolib::segmented_array< T, SegmentSize, Alloc >::const_pointer

Definition at line 58 of file segmented_array.hpp.

◆ const_reference

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
typedef value_type const& neolib::segmented_array< T, SegmentSize, Alloc >::const_reference

Definition at line 56 of file segmented_array.hpp.

◆ const_reverse_iterator

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
typedef std::reverse_iterator<const_iterator> neolib::segmented_array< T, SegmentSize, Alloc >::const_reverse_iterator

Definition at line 361 of file segmented_array.hpp.

◆ difference_type

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
typedef std::allocator_traits<allocator_type>::difference_type neolib::segmented_array< T, SegmentSize, Alloc >::difference_type

Definition at line 60 of file segmented_array.hpp.

◆ pointer

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
typedef std::allocator_traits<allocator_type>::pointer neolib::segmented_array< T, SegmentSize, Alloc >::pointer

Definition at line 57 of file segmented_array.hpp.

◆ reference

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
typedef value_type& neolib::segmented_array< T, SegmentSize, Alloc >::reference

Definition at line 55 of file segmented_array.hpp.

◆ reverse_iterator

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
typedef std::reverse_iterator<iterator> neolib::segmented_array< T, SegmentSize, Alloc >::reverse_iterator

Definition at line 360 of file segmented_array.hpp.

◆ size_type

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
typedef std::allocator_traits<allocator_type>::size_type neolib::segmented_array< T, SegmentSize, Alloc >::size_type

Definition at line 59 of file segmented_array.hpp.

◆ value_type

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
typedef T neolib::segmented_array< T, SegmentSize, Alloc >::value_type

Definition at line 53 of file segmented_array.hpp.

Constructor & Destructor Documentation

◆ segmented_array() [1/5]

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
neolib::segmented_array< T, SegmentSize, Alloc >::segmented_array ( const Alloc aAllocator = Alloc())
inline

Definition at line 364 of file segmented_array.hpp.

◆ segmented_array() [2/5]

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
neolib::segmented_array< T, SegmentSize, Alloc >::segmented_array ( const size_type  aCount,
const value_type aValue,
const Alloc aAllocator = Alloc() 
)
inline

Definition at line 368 of file segmented_array.hpp.

◆ segmented_array() [3/5]

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
template<typename InputIterator >
neolib::segmented_array< T, SegmentSize, Alloc >::segmented_array ( InputIterator  aFirst,
InputIterator  aLast,
const Alloc aAllocator = Alloc() 
)
inline

Definition at line 374 of file segmented_array.hpp.

◆ segmented_array() [4/5]

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
neolib::segmented_array< T, SegmentSize, Alloc >::segmented_array ( const segmented_array< T, SegmentSize, Alloc > &  aOther,
const Alloc aAllocator = Alloc() 
)
inline

Definition at line 379 of file segmented_array.hpp.

◆ segmented_array() [5/5]

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
neolib::segmented_array< T, SegmentSize, Alloc >::segmented_array ( segmented_array< T, SegmentSize, Alloc > &&  aOther)
inline

Definition at line 384 of file segmented_array.hpp.

◆ ~segmented_array()

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
neolib::segmented_array< T, SegmentSize, Alloc >::~segmented_array ( )
inline

Definition at line 390 of file segmented_array.hpp.

Member Function Documentation

◆ back() [1/2]

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
reference neolib::segmented_array< T, SegmentSize, Alloc >::back ( )
inline

Definition at line 479 of file segmented_array.hpp.

◆ back() [2/2]

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
const_reference neolib::segmented_array< T, SegmentSize, Alloc >::back ( ) const
inline

Definition at line 475 of file segmented_array.hpp.

◆ begin() [1/2]

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
iterator neolib::segmented_array< T, SegmentSize, Alloc >::begin ( )
inline

Definition at line 431 of file segmented_array.hpp.

◆ begin() [2/2]

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
const_iterator neolib::segmented_array< T, SegmentSize, Alloc >::begin ( ) const
inline

Definition at line 419 of file segmented_array.hpp.

◆ cbegin()

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
const_iterator neolib::segmented_array< T, SegmentSize, Alloc >::cbegin ( ) const
inline

Definition at line 415 of file segmented_array.hpp.

◆ cend()

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
const_iterator neolib::segmented_array< T, SegmentSize, Alloc >::cend ( ) const
inline

Definition at line 423 of file segmented_array.hpp.

◆ citer()

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
const_iterator neolib::segmented_array< T, SegmentSize, Alloc >::citer ( const value_type aValue) const
inline

Definition at line 455 of file segmented_array.hpp.

◆ clear()

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
void neolib::segmented_array< T, SegmentSize, Alloc >::clear ( )
inline

Definition at line 531 of file segmented_array.hpp.

◆ emplace_back()

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
template<typename... Args>
void neolib::segmented_array< T, SegmentSize, Alloc >::emplace_back ( Args &&...  aArguments)
inline

Definition at line 549 of file segmented_array.hpp.

◆ emplace_front()

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
template<typename... Args>
void neolib::segmented_array< T, SegmentSize, Alloc >::emplace_front ( Args &&...  aArguments)
inline

Definition at line 544 of file segmented_array.hpp.

◆ emplace_insert() [1/2]

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
template<typename... Args>
iterator neolib::segmented_array< T, SegmentSize, Alloc >::emplace_insert ( const_iterator  aPosition,
Args &&...  aArguments 
)
inline

Definition at line 488 of file segmented_array.hpp.

◆ emplace_insert() [2/2]

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
template<typename... Args>
iterator neolib::segmented_array< T, SegmentSize, Alloc >::emplace_insert ( const_iterator  aPosition,
size_type  aCount,
Args &&...  aArguments 
)
inline

Definition at line 518 of file segmented_array.hpp.

◆ empty()

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
bool neolib::segmented_array< T, SegmentSize, Alloc >::empty ( ) const
inline

Definition at line 411 of file segmented_array.hpp.

◆ end() [1/2]

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
iterator neolib::segmented_array< T, SegmentSize, Alloc >::end ( )
inline

Definition at line 435 of file segmented_array.hpp.

◆ end() [2/2]

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
const_iterator neolib::segmented_array< T, SegmentSize, Alloc >::end ( ) const
inline

Definition at line 427 of file segmented_array.hpp.

◆ erase() [1/2]

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
iterator neolib::segmented_array< T, SegmentSize, Alloc >::erase ( const_iterator  aFirst,
const_iterator  aLast 
)
inline

Definition at line 565 of file segmented_array.hpp.

◆ erase() [2/2]

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
iterator neolib::segmented_array< T, SegmentSize, Alloc >::erase ( const_iterator  aPosition)
inline

Definition at line 560 of file segmented_array.hpp.

◆ front() [1/2]

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
reference neolib::segmented_array< T, SegmentSize, Alloc >::front ( )
inline

Definition at line 471 of file segmented_array.hpp.

◆ front() [2/2]

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
const_reference neolib::segmented_array< T, SegmentSize, Alloc >::front ( ) const
inline

Definition at line 467 of file segmented_array.hpp.

◆ insert() [1/3]

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
iterator neolib::segmented_array< T, SegmentSize, Alloc >::insert ( const_iterator  aPosition,
const value_type aValue 
)
inline

Definition at line 483 of file segmented_array.hpp.

◆ insert() [2/3]

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
template<class InputIterator >
std::enable_if<!std::is_integral< InputIterator >::value, iterator >::type neolib::segmented_array< T, SegmentSize, Alloc >::insert ( const_iterator  aPosition,
InputIterator  aFirst,
InputIterator  aLast 
)
inline

Definition at line 502 of file segmented_array.hpp.

◆ insert() [3/3]

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
iterator neolib::segmented_array< T, SegmentSize, Alloc >::insert ( const_iterator  aPosition,
size_type  aCount,
const value_type aValue 
)
inline

Definition at line 506 of file segmented_array.hpp.

◆ iter() [1/2]

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
iterator neolib::segmented_array< T, SegmentSize, Alloc >::iter ( const value_type aValue)
inline

Definition at line 463 of file segmented_array.hpp.

◆ iter() [2/2]

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
const_iterator neolib::segmented_array< T, SegmentSize, Alloc >::iter ( const value_type aValue) const
inline

Definition at line 459 of file segmented_array.hpp.

◆ operator=() [1/2]

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
segmented_array & neolib::segmented_array< T, SegmentSize, Alloc >::operator= ( const segmented_array< T, SegmentSize, Alloc > &  aOther)
inline

Definition at line 399 of file segmented_array.hpp.

◆ operator=() [2/2]

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
segmented_array & neolib::segmented_array< T, SegmentSize, Alloc >::operator= ( segmented_array< T, SegmentSize, Alloc > &&  aOther)
inline

Definition at line 394 of file segmented_array.hpp.

◆ operator[]() [1/2]

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
reference neolib::segmented_array< T, SegmentSize, Alloc >::operator[] ( size_type  aIndex)
inline

Definition at line 496 of file segmented_array.hpp.

◆ operator[]() [2/2]

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
const_reference neolib::segmented_array< T, SegmentSize, Alloc >::operator[] ( size_type  aIndex) const
inline

Definition at line 492 of file segmented_array.hpp.

◆ pop_back()

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
void neolib::segmented_array< T, SegmentSize, Alloc >::pop_back ( )
inline

Definition at line 610 of file segmented_array.hpp.

◆ pop_front()

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
void neolib::segmented_array< T, SegmentSize, Alloc >::pop_front ( )
inline

Definition at line 606 of file segmented_array.hpp.

◆ push_back()

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
void neolib::segmented_array< T, SegmentSize, Alloc >::push_back ( const value_type aValue)
inline

Definition at line 539 of file segmented_array.hpp.

◆ push_front()

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
void neolib::segmented_array< T, SegmentSize, Alloc >::push_front ( const value_type aValue)
inline

Definition at line 535 of file segmented_array.hpp.

◆ rbegin() [1/2]

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
reverse_iterator neolib::segmented_array< T, SegmentSize, Alloc >::rbegin ( )
inline

Definition at line 447 of file segmented_array.hpp.

◆ rbegin() [2/2]

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
const_reverse_iterator neolib::segmented_array< T, SegmentSize, Alloc >::rbegin ( ) const
inline

Definition at line 439 of file segmented_array.hpp.

◆ rend() [1/2]

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
reverse_iterator neolib::segmented_array< T, SegmentSize, Alloc >::rend ( )
inline

Definition at line 451 of file segmented_array.hpp.

◆ rend() [2/2]

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
const_reverse_iterator neolib::segmented_array< T, SegmentSize, Alloc >::rend ( ) const
inline

Definition at line 443 of file segmented_array.hpp.

◆ resize()

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
void neolib::segmented_array< T, SegmentSize, Alloc >::resize ( std::size_t  aNewSize,
const value_type aValue = value_type{} 
)
inline

Definition at line 553 of file segmented_array.hpp.

◆ size()

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
size_type neolib::segmented_array< T, SegmentSize, Alloc >::size ( ) const
inline

Definition at line 407 of file segmented_array.hpp.

◆ swap()

template<typename T , std::size_t SegmentSize = 64, typename Alloc = std::allocator<T>>
void neolib::segmented_array< T, SegmentSize, Alloc >::swap ( segmented_array< T, SegmentSize, Alloc > &  aOther)
inline

Definition at line 614 of file segmented_array.hpp.


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