A std::deque with AUI extensions.
More...
#include <AUI/Common/ADeque.h>
|
using | iterator = typename p::iterator |
|
|
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 |
|
self & | operator<< (const StoredType &rhs) noexcept |
|
self & | operator<< (StoredType &&rhs) noexcept |
|
template<typename OtherContainer, std::enable_if_t<!std::is_convertible_v< OtherContainer, StoredType >, bool > = true> |
self & | operator<< (const OtherContainer &c) noexcept |
|
StoredType & | first () noexcept |
|
const StoredType & | first () const noexcept |
|
StoredType & | last () noexcept |
|
const StoredType & | last () const noexcept |
|
AOptional< 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 |
|
template<class StoredType, class Allocator = std::allocator<StoredType>>
class ADeque< StoredType, Allocator >
A std::deque with AUI extensions.
◆ 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>>
AOptional< size_t > ADeque< StoredType, Allocator >::indexOf |
( |
const StoredType & | value | ) |
const |
|
inlinenodiscardnoexcept |
- Parameters
-
- Returns
- index of the specified element. If element is not found, std::nullopt 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
-
OtherContainer | other container type. |
- Parameters
-
- 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
-
OtherContainer | other container type. |
- Parameters
-
at | position to insert at. |
c | other 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
-
- 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
-
- 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
-
- 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
-
◆ 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
-
index | index 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
-
◆ 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
-
The documentation for this class was generated from the following file: