Dataflow Runtime API  3.0.3.0
Static Public Member Functions | List of all members
imt::base::os::winec7::VectorUtils Class Reference

Utility methods for class std::vector. More...

#include <Imt.Base.OS.WinEC7/VectorUtils.h>

Static Public Member Functions

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...
 

Detailed Description

Utility methods for class std::vector.

Pure static class.

Member Function Documentation

◆ 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

Erase all elements.

◆ 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
vectorThe vector to operate on
valThe 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: