Vector implementation for ASmallVector.
More...
#include <AUI/Common/ADynamicVector.h>
template<typename StoredType>
class ADynamicVector< StoredType >
- Template Parameters
-
- Note
- This vector implementation is indented to use only by ASmallVector. If it's not your case, consider using AVector instead.
> 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>
- Sneaky assertions
- Container is not empty.
- Returns
- the first element.
◆ first() [2/2]
template<typename StoredType>
- Sneaky assertions
- Container is not empty.
- Returns
- the first element.
◆ fromRange()
template<typename StoredType>
static auto ADynamicVector< StoredType >::fromRange |
( |
aui::range< Iterator > | range, |
|
|
UnaryOperation && | transformer ) -> AVector<decltype(transformer(range.first()))> |
|
inlinestatic |
- Parameters
-
range | items to transform from. |
transformer | transformer function. |
- Returns
- A new vector.
◆ indexOf()
template<typename StoredType>
- Parameters
-
- 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
-
OtherContainer | other container type. |
- Parameters
-
- 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
-
OtherContainer | other container type. |
- Parameters
-
at | position to insert at. |
c | other 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
-
OtherContainer | other container type. |
- Parameters
-
at | position to insert at. |
c | other 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
-
OtherContainer | other container type. |
- Parameters
-
- 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>
- Sneaky assertions
- Container is not empty.
- Returns
- the last element.
◆ last() [2/2]
template<typename StoredType>
- 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>
Shortcut to insertAll
.
- Parameters
-
- Returns
- self
◆ operator<<() [2/4]
template<typename StoredType>
Shortcut to push_back
.
- Parameters
-
- Returns
- self
◆ operator<<() [3/4]
template<typename StoredType>
template<typename OtherContainer, std::enable_if_t<!std::is_convertible_v< OtherContainer, StoredType >, bool > = true>
Shortcut to insertAll
.
- Parameters
-
- Returns
- self
◆ operator<<() [4/4]
template<typename StoredType>
Shortcut to push_back
.
- Parameters
-
- Returns
- self
◆ removeAll()
template<typename StoredType>
void ADynamicVector< StoredType >::removeAll |
( |
const StoredType & | item | ) |
|
|
inlinenoexcept |
Removes all occurrences of item
.
- Parameters
-
◆ removeAt()
template<typename StoredType>
Removes element at the specified index.
- Sneaky assertions
index
points to the existing element.
- Parameters
-
index | index of the element. |
◆ removeFirst()
template<typename StoredType>
void ADynamicVector< StoredType >::removeFirst |
( |
const StoredType & | item | ) |
|
|
inlinenoexcept |
Removes first occurrence of item
.
- Parameters
-
◆ removeIf()
template<typename StoredType>
template<typename Predicate>
Removes element if predicate(container[i]) == true.
- Parameters
-