ALib C++ Library
Library Version: 2412 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
List< TAllocator, T, TRecycling > Class Template Reference

Description:

template<typename TAllocator, typename T, Recycling TRecycling = Recycling::Private>
class alib::containers::List< TAllocator, T, TRecycling >

Implements a doubly linked list, likewise std::list does. Memory for inserted elements is allocated using the Allocator provided with construction.

Elements that are erased from the list will be recycled with subsequent insert operations. With that, remove and insert operations do not lead to leaked memory when a monotonic allocator is used.

It is allowed to use different allocator objects with insertions. However, the life-cycle of the allocated memory and the objects stored in this container has to be kept in sync by the user of this object. For more information on this topic see methods Clear and Reset.

See also
Template Parameters
TAllocatorThe allocator type to use.
TThe type of the contained objects.
TRecyclingDenotes the type of recycling that is to be performed. Possible values are None, Private (the default), or Shared.

Definition at line 69 of file list.hpp.

#include <list.hpp>

Inheritance diagram for List< TAllocator, T, TRecycling >:
[legend]
Collaboration diagram for List< TAllocator, T, TRecycling >:
[legend]

Inner Type Index:

struct  TIterator
 

Public Type Index:

using AllocatorType = TAllocator
 The allocator type that TAllocator specifies.
 
using ConstIterator = TIterator<const T>
 The constant iterator exposed by this container.
 
using ConstReverseIterator = std::reverse_iterator<ConstIterator>
 The constant iterator exposed by this container.
 
using Iterator = TIterator< T>
 The mutable iterator exposed by this container.
 
using ReverseIterator = std::reverse_iterator<Iterator>
 The mutable iterator exposed by this container.
 
using SharedRecyclerType
 

Public Method Index:

std::iterator_traits Interface
Iterator begin ()
 
Iterator end ()
 
ConstIterator begin () const
 
ConstIterator end () const
 
ConstIterator cbegin () const
 
ConstIterator cend () const
 
ReverseIterator rbegin ()
 
ReverseIterator rend ()
 
ConstReverseIterator rbegin () const
 
ConstReverseIterator rend () const
 
ConstReverseIterator crbegin () const
 
ConstReverseIterator crend () const
 
 List ()
 
 List (std::initializer_list< T > initList)
 
 List (const List &copy)
 
 List (List &&move)
 
 List (AllocatorType &pAllocator)
 
 List (AllocatorType &pAllocator, std::initializer_list< T > initList)
 
template<typename TSharedRecycler = SharedRecyclerType, ATMP_T_IF(int, !ATMP_EQ(TSharedRecycler, void)) = 0>
 List (TSharedRecycler &pSharedRecycler)
 
template<typename TSharedRecycler = SharedRecyclerType, ATMP_T_IF(int, !ATMP_EQ(TSharedRecycler, void)) = 0>
 List (TSharedRecycler &pSharedRecycler, std::initializer_list< T > initList)
 
 ~List ()
 Destructor. Invokes Clear.
 
Allocation
AllocatorTypeGetAllocator ()
 
integer RecyclablesCount () const
 
Size and Capacity
integer Count () const
 
bool IsEmpty () const
 
bool IsNotEmpty () const
 
void Clear ()
 
void Reset ()
 
void ReserveRecyclables (integer qty, lang::ValueReference reference)
 
Element Access
T & ElementAt (integer idx)
 
const T & ElementAt (integer idx) const
 
T & Front ()
 
const T & Front () const
 
T & Back ()
 
const T & Back () const
 
Element Insertion
Iterator Insert (ConstIterator position, const T &copy)
 
Iterator Insert (ConstIterator position, T &&move)
 
T & PushBack (const T &copy)
 
T & PushBack (T &&move)
 
T & PushFront (const T &copy)
 
T & PushFront (T &&move)
 
template<typename... TArgs>
Iterator Emplace (ConstIterator position, TArgs &&... args)
 
template<typename... TArgs>
T & EmplaceBack (TArgs &&... args)
 
template<typename... TArgs>
T & EmplaceFront (TArgs &&... args)
 
Element Removal
Iterator Erase (ConstIterator position)
 
Iterator Erase (ConstIterator begin, ConstIterator end)
 
void PopFront ()
 Removes the first element.
 
void PopBack ()
 Removes the last element.
 
- Public Method Index: inherited from DbgCriticalSections
ALIB_FORCE_INLINE DbgCriticalSections (const char *name)
 
ALIB_FORCE_INLINE ~DbgCriticalSections ()
 Destructor. Checks that this instance is unused.
 
ALIB_API void Acquire (const CallerInfo &ci) const
 
ALIB_API void AcquireShared (const CallerInfo &ci) const
 
ALIB_API void doAssert (bool cond, const CallerInfo &ciAssert, const CallerInfo &ci, const char *headline) const
 
ALIB_API void Release (const CallerInfo &ci) const
 
ALIB_API void ReleaseShared (const CallerInfo &ci) const
 
ALIB_FORCE_INLINE void yieldOrSleep () const
 

Protected Type Index:

using allocBase = lang::AllocatorMember<TAllocator>
 The allocator type that TAllocator specifies.
 
using Element = detail::ListElement<T>
 The list element type.
 
using hook = lang::BidiListHook<detail::ListElement<T>>
 The allocator type that TAllocator specifies.
 
using recyclerType
 The recycler type.
 

Additional Inherited Members

- Public Static Field Index: inherited from DbgCriticalSections
static ALIB_API const char * ASSERTION_FORMAT
 
- Public Field Index: inherited from DbgCriticalSections
CallerInfo DCSAcq
 Source location of acquirement.
 
AssociatedLockDCSLock {nullptr}
 
const char * DCSName
 The name of this DCS. Used for debug-output.
 
std::atomic< int > DCSReaderCnt {0}
 Tracks enter/exit calls of readers.
 
CallerInfo DCSRel
 Source location of the last "reader" seen.
 
CallerInfo DCSSAcq
 Source location of acquirement.
 
CallerInfo DCSSRel
 Source location of the last "reader" seen.
 
std::atomic< int > DCSWriterCnt {0}
 Tracks enter/exit calls (including readers)
 
int DCSYieldOrSleepTimeInNS = -1
 
- Private Type Index: inherited from BidiListHook< detail::ListElement< T > >
using TFNode
 An alias for the base type of the node type of this list.
 
using TNode
 An alias for the node type of this list.
 
- Private Field Index: inherited from BidiListHook< detail::ListElement< T > >
TNode hook
 The root node. Points twice to itself when the list is empty.
 
- Private Method Index: inherited from BidiListHook< detail::ListElement< T > >
 BidiListHook () noexcept
 Default constructor. Initializes this list to be empty.
 
 BidiListHook (BidiListHook &&move) noexcept
 
 BidiListHook (const BidiListHook &)=delete
 Deleted copy constructor.
 
 BidiListHook (detail::ListElement< T > *first) noexcept
 
 BidiListHook (detail::ListElement< T > *first, detail::ListElement< T > *last) noexcept
 
integer count (const TNode *end=nullptr) const noexcept
 
detail::ListElement< T > * end () const noexcept
 
detail::ListElement< T > * first () const noexcept
 
bool isEmpty () const noexcept
 
bool isFirst (const detail::ListElement< T > *elem) const noexcept
 
bool isLast (const detail::ListElement< T > *elem) const noexcept
 
detail::ListElement< T > * last () const noexcept
 
BidiListHookoperator= (BidiListHook &&) noexcept=default
 
BidiListHookoperator= (const BidiListHook &)=delete
 
detail::ListElement< T > * popEnd () noexcept
 
detail::ListElement< T > * popFront () noexcept
 
void pushEnd (detail::ListElement< T > *elem) noexcept
 
void pushEnd (detail::ListElement< T > *first, detail::ListElement< T > *last) noexcept
 
void pushFront (detail::ListElement< T > *elem) noexcept
 
void pushFront (detail::ListElement< T > *first, detail::ListElement< T > *last) noexcept
 
void reset () noexcept
 Resets this list to zero elements.
 

Type Definition Details:

◆ AllocatorType

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
using AllocatorType = TAllocator

The allocator type that TAllocator specifies.

Definition at line 95 of file list.hpp.

◆ allocBase

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
using allocBase = lang::AllocatorMember<TAllocator>
protected

The allocator type that TAllocator specifies.

Definition at line 84 of file list.hpp.

◆ ConstIterator

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
using ConstIterator = TIterator<const T>

The constant iterator exposed by this container.

Definition at line 232 of file list.hpp.

◆ ConstReverseIterator

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
using ConstReverseIterator = std::reverse_iterator<ConstIterator>

The constant iterator exposed by this container.

Definition at line 238 of file list.hpp.

◆ Element

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
using Element = detail::ListElement<T>
protected

The list element type.

Definition at line 87 of file list.hpp.

◆ hook

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
using hook = lang::BidiListHook<detail::ListElement<T>>
protected

The allocator type that TAllocator specifies.

Definition at line 81 of file list.hpp.

◆ Iterator

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
using Iterator = TIterator< T>

The mutable iterator exposed by this container.

Definition at line 235 of file list.hpp.

◆ recyclerType

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
using recyclerType
protected
Initial value:
typename detail::RecyclingSelector<TRecycling>:: template Type< TAllocator,
detail::ListElement<T> >

The recycler type.

Definition at line 90 of file list.hpp.

◆ ReverseIterator

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
using ReverseIterator = std::reverse_iterator<Iterator>

The mutable iterator exposed by this container.

Definition at line 241 of file list.hpp.

◆ SharedRecyclerType

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
using SharedRecyclerType
Initial value:
typename detail::RecyclingSelector<TRecycling>
::template HookType<TAllocator, detail::ListElement<T> >

This type definition may be used to define an externally managed shared recycler, which can be passed to the alternative constructor of this class when template parameter TRecycling equals Shared.

See also
Chapter 4.3 Shared Recycling of the Programmer's Manual for this ALib Module.

Definition at line 103 of file list.hpp.

Constructor(s) / Destructor Details:

◆ List() [1/8]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
List ( )
inline

Constructor neither requiring an allocator, nor a shared recycler.

Note
This constructor is not available if the template argument TRecycling equals Shared and if argument TAllocator does not equal type HeapAllocator.

Definition at line 306 of file list.hpp.

◆ List() [2/8]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
List ( std::initializer_list< T > initList)
inline

Constructor that takes an initializer list, but neither a n allocator, nor a shared recycler.

Note
This constructor is not available if the template argument TRecycling equals Shared.
Parameters
initListThe initial lists of elements to add.

Definition at line 321 of file list.hpp.

Here is the call graph for this function:

◆ List() [3/8]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
List ( const List< TAllocator, T, TRecycling > & copy)
inline

Copy constructor. Invokes implementation dependent copy constructor of recycler, copies the pointer to the allocator and then copies each element.

Parameters
copyThe list to copy.

Definition at line 334 of file list.hpp.

Here is the call graph for this function:

◆ List() [4/8]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
List ( List< TAllocator, T, TRecycling > && move)
inline

Move constructor. Invokes implementation dependent move constructor of recycler, moves the pointer to the allocator and then copies each element.

Parameters
moveThe private recycler to move.

Definition at line 352 of file list.hpp.

◆ List() [5/8]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
List ( AllocatorType & pAllocator)
inline

Constructor accepting an allocator.

Note
This constructor is not available if the template argument TRecycling equals Shared and if argument TAllocator does not equal type HeapAllocator.
Parameters
pAllocatorThe allocator to use.

Definition at line 366 of file list.hpp.

◆ List() [6/8]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
List ( AllocatorType & pAllocator,
std::initializer_list< T > initList )
inline

Constructor that takes an allocator and an initializer list.

Note
This constructor is not available if the template argument TRecycling equals Shared.
Parameters
pAllocatorThe allocator to use.
initListThe initial lists of elements to add.

Definition at line 383 of file list.hpp.

Here is the call graph for this function:

◆ List() [7/8]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
template<typename TSharedRecycler = SharedRecyclerType, ATMP_T_IF(int, !ATMP_EQ(TSharedRecycler, void)) = 0>
List ( TSharedRecycler & pSharedRecycler)
inline

Constructor taking a shared recycler. This constructor is not available if the template argument TRecycling does not equal Shared.

Parameters
pSharedRecyclerThe shared recycler.

Definition at line 398 of file list.hpp.

◆ List() [8/8]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
template<typename TSharedRecycler = SharedRecyclerType, ATMP_T_IF(int, !ATMP_EQ(TSharedRecycler, void)) = 0>
List ( TSharedRecycler & pSharedRecycler,
std::initializer_list< T > initList )
inline

Constructor taking a shared recycler and an initializer list. This constructor is not available if the template argument TRecycling does not equal Shared.

Parameters
pSharedRecyclerThe shared recycler.
initListThe initial lists of elements to add.

Definition at line 415 of file list.hpp.

Here is the call graph for this function:

◆ ~List()

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
~List ( )
inline

Destructor. Invokes Clear.

Definition at line 425 of file list.hpp.

Here is the call graph for this function:

Method Details:

◆ Back() [1/2]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
T & Back ( )
inline

Returns a non-constant reference to the last object of the list.

Returns
A mutable reference to T.

Definition at line 616 of file list.hpp.

Here is the call graph for this function:

◆ Back() [2/2]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
const T & Back ( ) const
inline

Returns a constant reference to the last object of the list.

Returns
A constant reference to T.

Definition at line 627 of file list.hpp.

Here is the call graph for this function:

◆ begin() [1/2]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
Iterator begin ( )
inline

Returns an iterator pointing to a mutable value at the start of this list.

Returns
The start of this list.

Definition at line 248 of file list.hpp.

Here is the call graph for this function:

◆ begin() [2/2]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
ConstIterator begin ( ) const
inline

Returns an iterator pointing to a constant value at the start of this list.

Returns
The start of this list.

Definition at line 256 of file list.hpp.

Here is the call graph for this function:

◆ cbegin()

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
ConstIterator cbegin ( ) const
inline

Returns an iterator pointing to a constant value at the start of this list.

Returns
The start of this list.

Definition at line 264 of file list.hpp.

Here is the call graph for this function:

◆ cend()

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
ConstIterator cend ( ) const
inline

Returns an iterator pointing to the first element behind this list.

Returns
The end of this list.

Definition at line 268 of file list.hpp.

Here is the call graph for this function:

◆ Clear()

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
void Clear ( )
inline

Invokes the destructor of all elements and empties the list. All allocated internal elements are kept for future recycling. Hence, the invocation of this method with this value implies that an associated monotonic allocator is not reset.

As the life-cycle of the monotonic allocator(s) used for insertions is not under control of this object, it is the obligation of the caller to ensure that the monotonic allocator is kept in sync with this object.

Definition at line 491 of file list.hpp.

Here is the call graph for this function:

◆ Count()

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
integer Count ( ) const
inline

Evaluates the size of the list by traversing all elements.

Returns
The number of elements contained in this listed.

Definition at line 467 of file list.hpp.

Here is the call graph for this function:

◆ crbegin()

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
ConstReverseIterator crbegin ( ) const
inline

Returns a reverse iterator pointing to a constant value at the end of this list.

Returns
The start of this list.

Definition at line 288 of file list.hpp.

Here is the call graph for this function:

◆ crend()

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
ConstReverseIterator crend ( ) const
inline

Returns a reverse iterator pointing to the first element behind the start of this list.

Returns
The end of this list.

Definition at line 292 of file list.hpp.

Here is the call graph for this function:

◆ ElementAt() [1/2]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
T & ElementAt ( integer idx)
inline

Traverses the list to return the item with the given idx. (Executes in linear time O(N).)

Parameters
idxThe index of the element to retrieve.
Returns
A mutable reference to T.

Definition at line 554 of file list.hpp.

Here is the call graph for this function:

◆ ElementAt() [2/2]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
const T & ElementAt ( integer idx) const
inline

Traverses the list to return the item with the given idx. (Executes in linear time O(N).)

Parameters
idxThe index of the element to retrieve.
Returns
A constant reference to T.

Definition at line 575 of file list.hpp.

Here is the call graph for this function:

◆ Emplace()

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
template<typename... TArgs>
Iterator Emplace ( ConstIterator position,
TArgs &&... args )
inline

Adds a new element before the given position.

Template Parameters
TArgsTypes of variadic parameters given with parameter args.
Parameters
positionThe position to emplace the new element.
argsVariadic parameters to be forwarded to the constructor of type T.
Returns
A constant reference to the element added.

Definition at line 730 of file list.hpp.

Here is the call graph for this function:

◆ EmplaceBack()

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
template<typename... TArgs>
T & EmplaceBack ( TArgs &&... args)
inline

Adds a new element at the end of the list.

Template Parameters
TArgsTypes of variadic parameters given with parameter args.
Parameters
argsVariadic parameters to be forwarded to the constructor of type T.
Returns
A reference to the element added.

Definition at line 746 of file list.hpp.

Here is the call graph for this function:

◆ EmplaceFront()

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
template<typename... TArgs>
T & EmplaceFront ( TArgs &&... args)
inline

Adds a new element at the end of the list.

Template Parameters
TArgsTypes of variadic parameters given with parameter args.
Parameters
argsVariadic parameters to be forwarded to the constructor of type T.
Returns
A reference to the element added.

Definition at line 762 of file list.hpp.

Here is the call graph for this function:

◆ end() [1/2]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
Iterator end ( )
inline

Returns an iterator pointing to the first element behind this list.

Returns
The end of this list.

Definition at line 252 of file list.hpp.

Here is the call graph for this function:

◆ end() [2/2]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
ConstIterator end ( ) const
inline

Returns an iterator pointing to the first element behind this list.

Returns
The end of this list.

Definition at line 260 of file list.hpp.

Here is the call graph for this function:

◆ Erase() [1/2]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
Iterator Erase ( ConstIterator begin,
ConstIterator end )
inline

Removes a range of elements defined by iterators first and last.

Parameters
beginThe start of the range to remove.
endThe first element behind the range to remove.
Returns
A mutable iterator referring to the given last.

Definition at line 806 of file list.hpp.

Here is the call graph for this function:

◆ Erase() [2/2]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
Iterator Erase ( ConstIterator position)
inline

Removes an element at the given position.

Parameters
positionA constant iterator pointing to the element to be removed. Mutable iterators are inherently converted with the invocation of this method.
Returns
A mutable iterator pointing behind the removed element. If position refers to the last element of the list, iterator end() is returned.

Definition at line 784 of file list.hpp.

Here is the call graph for this function:

◆ Front() [1/2]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
T & Front ( )
inline

Returns a non-constant reference to the first object of the list.

Returns
A mutable reference to T.

Definition at line 593 of file list.hpp.

Here is the call graph for this function:

◆ Front() [2/2]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
const T & Front ( ) const
inline

Returns a constant reference to the first object of the list.

Returns
A constant reference to T.

Definition at line 605 of file list.hpp.

Here is the call graph for this function:

◆ GetAllocator()

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
AllocatorType & GetAllocator ( )
inline

Returns the allocator of this object. Usually the allocator might be used to perform allocations in respect to data found in objects stored in this object. However, such allowance is dependent on the use case and not part of this class's contract.

Returns
The allocator that was provided in the constructor.

Definition at line 442 of file list.hpp.

Here is the call graph for this function:

◆ Insert() [1/2]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
Iterator Insert ( ConstIterator position,
const T & copy )
inline

Adds a new element before the given position.

Parameters
positionThe position to emplace the new element.
copyThe value to copy and insert.
Returns
A constant reference to the element added.

Definition at line 643 of file list.hpp.

Here is the call graph for this function:

◆ Insert() [2/2]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
Iterator Insert ( ConstIterator position,
T && move )
inline

Moves a value into this container before the given position.

Parameters
positionThe position to emplace the new element.
moveThe value to move into this container.
Returns
A constant reference to the element moved.

Definition at line 658 of file list.hpp.

Here is the call graph for this function:

◆ IsEmpty()

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
bool IsEmpty ( ) const
inline

Tests this container for emptiness.

Returns
true if this list is empty, false otherwise.

Definition at line 473 of file list.hpp.

Here is the call graph for this function:

◆ IsNotEmpty()

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
bool IsNotEmpty ( ) const
inline

Tests this container for emptiness.

Returns
true if this list is empty, false otherwise.

Definition at line 479 of file list.hpp.

Here is the call graph for this function:

◆ PopBack()

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
void PopBack ( )
inline

Removes the last element.

Definition at line 831 of file list.hpp.

Here is the call graph for this function:

◆ PopFront()

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
void PopFront ( )
inline

Removes the first element.

Definition at line 822 of file list.hpp.

Here is the call graph for this function:

◆ PushBack() [1/2]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
T & PushBack ( const T & copy)
inline

Adds a new element at the end of the list.

Parameters
copyThe value to copy and insert.
Returns
A reference to the element added.

Definition at line 672 of file list.hpp.

Here is the call graph for this function:

◆ PushBack() [2/2]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
T & PushBack ( T && move)
inline

Moves a value to the end of this list.

Parameters
moveThe value to move into this container.
Returns
A reference to the element moved.

Definition at line 686 of file list.hpp.

Here is the call graph for this function:

◆ PushFront() [1/2]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
T & PushFront ( const T & copy)
inline

Adds a new element at the start of the list.

Parameters
copyThe value to copy and insert.
Returns
A reference to the element added.

Definition at line 700 of file list.hpp.

Here is the call graph for this function:

◆ PushFront() [2/2]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
T & PushFront ( T && move)
inline

Moves a value to the start of this list.

Parameters
moveThe value to move into this container.
Returns
A reference to the element moved.

Definition at line 713 of file list.hpp.

Here is the call graph for this function:

◆ rbegin() [1/2]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
ReverseIterator rbegin ( )
inline

Returns a reverse iterator pointing to a mutable value at the end of this list.

Returns
The start of this list.

Definition at line 272 of file list.hpp.

Here is the call graph for this function:

◆ rbegin() [2/2]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
ConstReverseIterator rbegin ( ) const
inline

Returns a reverse iterator pointing to a constant value at the end of this list.

Returns
The start of this list.

Definition at line 280 of file list.hpp.

Here is the call graph for this function:

◆ RecyclablesCount()

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
integer RecyclablesCount ( ) const
inline

Counts the number of currently allocated but unused (not contained) list elements that will be recycled with upcoming insertions.

Note
This method is provided for completeness and unit-testing. It should not be of relevance for common usage.
Furthermore, this method is not available (aka does not compile) with instantiations that specify template parameter TRecycling as None.
Returns
The number of removed and not yet recycled elements.

Definition at line 457 of file list.hpp.

◆ rend() [1/2]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
ReverseIterator rend ( )
inline

Returns a reverse iterator pointing to the first element behind the start of this list.

Returns
The end of this list.

Definition at line 276 of file list.hpp.

Here is the call graph for this function:

◆ rend() [2/2]

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
ConstReverseIterator rend ( ) const
inline

Returns a reverse iterator pointing to the first element behind the start of this list.

Returns
The end of this list.

Definition at line 284 of file list.hpp.

Here is the call graph for this function:

◆ ReserveRecyclables()

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
void ReserveRecyclables ( integer qty,
lang::ValueReference reference )
inline

Allocates the required memory for the number of additional elements expected.

See also
Chapter 4.5 Reserving Capacity of the Programmer's Manual.
Parameters
qtyThe expected resulting number (or increase) of elements to be stored in this container.
referenceDenotes whether qty is meant as an absolute size or an increase.

Definition at line 532 of file list.hpp.

Here is the call graph for this function:

◆ Reset()

template<typename TAllocator , typename T , Recycling TRecycling = Recycling::Private>
void Reset ( )
inline

Same as clear, but does not recycle internal nodes. Furthermore, all recyclables are deleted. The latter is done only if recycling type is not Shared. In this case, the elements are still recycled.

This method is useful with monotonic allocators, that can be reset as well, after this instance is reset. But, because the life-cycle of the monotonic allocator(s) used for insertions is not under control of this object, it is the obligation of the caller to ensure that the monotonic allocator is kept in sync with this object.

Definition at line 512 of file list.hpp.

Here is the call graph for this function:

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