AUI Framework  develop
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
ADynamicVector< StoredType > Class Template Reference

Vector implementation for ASmallVector. More...

#include <AUI/Common/ADynamicVector.h>

Detailed Description

template<typename StoredType>
class ADynamicVector< StoredType >
Template Parameters
Tstored type
Note
This vector implementation is indented to use only by ASmallVector. If it's not your case, consider using AVector instead.

Member Function Documentation

> All members, including inherited

◆ contains()

template<typename StoredType>
bool ADynamicVector< StoredType >::contains ( const StoredType & value) const
inlinenoexcept
Returns
true if container contains an element, false otherwise.

◆ first() [1/2]

template<typename StoredType>
const StoredType & ADynamicVector< StoredType >::first ( ) const
inlinenoexcept
Sneaky assertions
Container is not empty.
Returns
the first element.

◆ first() [2/2]

template<typename StoredType>
StoredType & ADynamicVector< StoredType >::first ( )
inlinenoexcept
Sneaky assertions
Container is not empty.
Returns
the first element.

◆ fromRange()

template<typename StoredType>
template<aui::incrementable Iterator, aui::invocable< decltype(*std::declval< Iterator >())> UnaryOperation>
static auto ADynamicVector< StoredType >::fromRange ( aui::range< Iterator > range,
UnaryOperation && transformer ) -> AVector<decltype(transformer(range.first()))>
inlinestatic
Parameters
rangeitems to transform from.
transformertransformer function.
Returns
A new vector.

◆ indexOf()

template<typename StoredType>
AOptional< size_t > ADynamicVector< StoredType >::indexOf ( const StoredType & value) const
inlinenodiscardnoexcept
Parameters
valueelement to find.
Returns
index of the specified element. If element is not found, std::nullopt is returned.

◆ insertAll() [1/4]

template<typename StoredType>
template<typename OtherContainer>
iterator ADynamicVector< StoredType >::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/4]

template<typename StoredType>
template<typename OtherContainer>
iterator ADynamicVector< StoredType >::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.

◆ insertAll() [3/4]

template<typename StoredType>
template<typename OtherContainer>
iterator ADynamicVector< StoredType >::insertAll ( iterator at,
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.

◆ insertAll() [4/4]

template<typename StoredType>
template<typename OtherContainer>
iterator ADynamicVector< StoredType >::insertAll ( 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.

◆ isSubsetOf()

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

◆ last() [1/2]

template<typename StoredType>
const StoredType & ADynamicVector< StoredType >::last ( ) const
inlinenoexcept
Sneaky assertions
Container is not empty.
Returns
the last element.

◆ last() [2/2]

template<typename StoredType>
StoredType & ADynamicVector< StoredType >::last ( )
inlinenoexcept
Sneaky assertions
Container is not empty.
Returns
the last element.

◆ operator<<() [1/4]

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

Shortcut to insertAll.

Parameters
ccontainer to push
Returns
self

◆ operator<<() [2/4]

template<typename StoredType>
self & ADynamicVector< StoredType >::operator<< ( const StoredType & rhs)
inlinenoexcept

Shortcut to push_back.

Parameters
rhsvalue to push
Returns
self

◆ operator<<() [3/4]

template<typename StoredType>
template<typename OtherContainer, std::enable_if_t<!std::is_convertible_v< OtherContainer, StoredType >, bool > = true>
self & ADynamicVector< StoredType >::operator<< ( OtherContainer && c)
inlinenoexcept

Shortcut to insertAll.

Parameters
ccontainer to push
Returns
self

◆ operator<<() [4/4]

template<typename StoredType>
self & ADynamicVector< StoredType >::operator<< ( StoredType && rhs)
inlinenoexcept

Shortcut to push_back.

Parameters
rhsvalue to push
Returns
self

◆ removeAll()

template<typename StoredType>
void ADynamicVector< StoredType >::removeAll ( const StoredType & item)
inlinenoexcept

Removes all occurrences of item.

Parameters
itemelement to remove.

◆ removeAt()

template<typename StoredType>
void ADynamicVector< StoredType >::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<typename StoredType>
void ADynamicVector< StoredType >::removeFirst ( const StoredType & item)
inlinenoexcept

Removes first occurrence of item.

Parameters
itemelement to remove.

◆ removeIf()

template<typename StoredType>
template<typename Predicate>
void ADynamicVector< StoredType >::removeIf ( Predicate && predicate)
inlinenoexcept

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

Parameters
predicatepredicate