AUI Framework  master
Cross-platform module-based framework for developing C++20 desktop applications
ADeque< StoredType, Allocator > Class Template Reference

A std::deque with AUI extensions. More...

Detailed Description

template<class StoredType, class Allocator = std::allocator<StoredType>>
class ADeque< StoredType, Allocator >

A std::deque with AUI extensions.

Examples
/github/workspace/aui.core/src/AUI/IO/APath.h.

Public Types

using iterator = typename p::iterator
 

Public Member Functions

template<typename OtherContainer >
iterator insertAll (const OtherContainer &c) noexcept
 
template<typename OtherContainer >
iterator insertAll (iterator at, const OtherContainer &c) noexcept
 
void removeAll (const StoredType &item) noexcept
 
void removeFirst (const StoredType &item) noexcept
 
template<typename OtherContainer >
bool isSubsetOf (const OtherContainer &c) const noexcept
 
bool contains (const StoredType &value) const noexcept
 
selfoperator<< (const StoredType &rhs) noexcept
 
selfoperator<< (StoredType &&rhs) noexcept
 
template<typename OtherContainer , std::enable_if_t<!std::is_convertible_v< OtherContainer, StoredType >, bool > = true>
selfoperator<< (const OtherContainer &c) noexcept
 
StoredType & first () noexcept
 
const StoredType & first () const noexcept
 
StoredType & last () noexcept
 
const StoredType & last () const noexcept
 
size_t indexOf (const StoredType &value) const noexcept
 
void sort () noexcept
 
template<typename Comparator >
void sort (Comparator &&comparator) noexcept
 
void removeAt (size_t index) noexcept
 
template<typename Predicate >
void removeIf (Predicate &&predicate) noexcept
 
ASet< StoredType > toSet () const noexcept
 

Member Function Documentation

◆ contains()

template<class StoredType , class Allocator = std::allocator<StoredType>>
bool ADeque< StoredType, Allocator >::contains ( const StoredType &  value) const
inlinenoexcept
Returns
true if container contains an element, false otherwise.

◆ first() [1/2]

template<class StoredType , class Allocator = std::allocator<StoredType>>
const StoredType & ADeque< StoredType, Allocator >::first ( ) const
inlinenoexcept
Sneaky assertions
Container is not empty.
Returns
the first element.

◆ first() [2/2]

template<class StoredType , class Allocator = std::allocator<StoredType>>
StoredType & ADeque< StoredType, Allocator >::first ( )
inlinenoexcept
Sneaky assertions
Container is not empty.
Returns
the first element.

◆ indexOf()

template<class StoredType , class Allocator = std::allocator<StoredType>>
size_t ADeque< StoredType, Allocator >::indexOf ( const StoredType &  value) const
inlinenoexcept
Parameters
valueelement to find.
Returns
index of the specified element. If element is not found, -1 is returned.

◆ insertAll() [1/2]

template<class StoredType , class Allocator = std::allocator<StoredType>>
template<typename OtherContainer >
iterator ADeque< StoredType, Allocator >::insertAll ( const OtherContainer &  c)
inlinenoexcept

Inserts all values of the specified container to the end.

Template Parameters
OtherContainerother container type.
Parameters
cother container
Returns
iterator pointing to the first element inserted.

◆ insertAll() [2/2]

template<class StoredType , class Allocator = std::allocator<StoredType>>
template<typename OtherContainer >
iterator ADeque< StoredType, Allocator >::insertAll ( iterator  at,
const OtherContainer &  c 
)
inlinenoexcept

Inserts all values of the specified container.

Template Parameters
OtherContainerother container type.
Parameters
atposition to insert at.
cother container
Returns
iterator pointing to the first element inserted.

◆ isSubsetOf()

template<class StoredType , class Allocator = std::allocator<StoredType>>
template<typename OtherContainer >
bool ADeque< StoredType, Allocator >::isSubsetOf ( const OtherContainer &  c) const
inlinenoexcept
Returns
true if c container is a subset of this container, false otherwise.

◆ last() [1/2]

template<class StoredType , class Allocator = std::allocator<StoredType>>
const StoredType & ADeque< StoredType, Allocator >::last ( ) const
inlinenoexcept
Sneaky assertions
Container is not empty.
Returns
the last element.

◆ last() [2/2]

template<class StoredType , class Allocator = std::allocator<StoredType>>
StoredType & ADeque< StoredType, Allocator >::last ( )
inlinenoexcept
Sneaky assertions
Container is not empty.
Returns
the last element.

◆ operator<<() [1/3]

template<class StoredType , class Allocator = std::allocator<StoredType>>
template<typename OtherContainer , std::enable_if_t<!std::is_convertible_v< OtherContainer, StoredType >, bool > = true>
self & ADeque< StoredType, Allocator >::operator<< ( const OtherContainer &  c)
inlinenoexcept

Shortcut to insertAll.

Parameters
rhscontainer to push
Returns
self

◆ operator<<() [2/3]

template<class StoredType , class Allocator = std::allocator<StoredType>>
self & ADeque< StoredType, Allocator >::operator<< ( const StoredType &  rhs)
inlinenoexcept

Shortcut to push_back.

Parameters
rhsvalue to push
Returns
self

◆ operator<<() [3/3]

template<class StoredType , class Allocator = std::allocator<StoredType>>
self & ADeque< StoredType, Allocator >::operator<< ( StoredType &&  rhs)
inlinenoexcept

Shortcut to push_back.

Parameters
rhsvalue to push
Returns
self

◆ removeAll()

template<class StoredType , class Allocator = std::allocator<StoredType>>
void ADeque< StoredType, Allocator >::removeAll ( const StoredType &  item)
inlinenoexcept

Removes all occurrences of item.

Parameters
itemelement to remove.

◆ removeAt()

template<class StoredType , class Allocator = std::allocator<StoredType>>
void ADeque< StoredType, Allocator >::removeAt ( size_t  index)
inlinenoexcept

Removes element at the specified index.

Sneaky assertions
index points to the existing element.
Parameters
indexindex of the element.

◆ removeFirst()

template<class StoredType , class Allocator = std::allocator<StoredType>>
void ADeque< StoredType, Allocator >::removeFirst ( const StoredType &  item)
inlinenoexcept

Removes first occurrence of item.

Parameters
itemelement to remove.

◆ removeIf()

template<class StoredType , class Allocator = std::allocator<StoredType>>
template<typename Predicate >
void ADeque< StoredType, Allocator >::removeIf ( Predicate &&  predicate)
inlinenoexcept

Removes element if predicate(container[i]) == true.

Parameters
predicatepredicate

#include <AUI/Common/ADeque.h>


The documentation for this class was generated from the following file:
Inheritance diagram for ADeque< StoredType, Allocator >:
Collaboration diagram for ADeque< StoredType, Allocator >: