Utility methods for class std::vector.
More...
#include <Imt.Base.OS.WinEC7/VectorUtils.h>
|
| template<class T > |
| static void | removeElements (std::vector< T > &vector, const T &val) |
| | Erases elements in a vector that match a specified value. More...
|
| |
| template<class T > |
| static bool | includes (const std::vector< T > &vector, const T &val) |
| | Tests whether the value is included in the vector. More...
|
| |
| template<class T > |
| static int32_t | findFirstIndex (const std::vector< T > &vector, const T &val) |
| | Returns the index of the first element which matches the specified value. More...
|
| |
| template<class T > |
| static void | eraseAll (std::vector< T > &vector) |
| | Erase all elements. More...
|
| |
| template<class T > |
| static void | deleteAll (std::vector< T > &vector) |
| | Delete all elements (allocated memory). More...
|
| |
Utility methods for class std::vector.
Pure static class.
◆ deleteAll()
template<class T >
| static void imt::base::os::winec7::VectorUtils::deleteAll |
( |
std::vector< T > & |
vector | ) |
|
|
inlinestatic |
Delete all elements (allocated memory).
◆ eraseAll()
template<class T >
| static void imt::base::os::winec7::VectorUtils::eraseAll |
( |
std::vector< T > & |
vector | ) |
|
|
inlinestatic |
◆ findFirstIndex()
template<class T >
| static int32_t imt::base::os::winec7::VectorUtils::findFirstIndex |
( |
const std::vector< T > & |
vector, |
|
|
const T & |
val |
|
) |
| |
|
inlinestatic |
Returns the index of the first element which matches the specified value.
-1 if not found.
◆ includes()
template<class T >
| static bool imt::base::os::winec7::VectorUtils::includes |
( |
const std::vector< T > & |
vector, |
|
|
const T & |
val |
|
) |
| |
|
inlinestatic |
Tests whether the value is included in the vector.
The operator== used to determine the match between an element and the specified value must impose an equivalence relation between its operands.
- Parameters
-
| vector | The vector to operate on |
| val | The value to search in the vector |
- Returns
- true if the value is included in the vector, false otherwise
- See also
- std::find
◆ removeElements()
template<class T >
| static void imt::base::os::winec7::VectorUtils::removeElements |
( |
std::vector< T > & |
vector, |
|
|
const T & |
val |
|
) |
| |
|
inlinestatic |
Erases elements in a vector that match a specified value.
The documentation for this class was generated from the following file: