Embedded Template Library 1.0
Loading...
Searching...
No Matches
vector

Classes

class  etl::deque_incompatible_type
 
class  etl::hash_finalised
 
class  etl::indirect_vector_buffer_missmatch
 
class  etl::ivector< T * >
 
class  etl::pvoidvector
 
class  etl::vector_exception
 
class  etl::vector_full
 
class  etl::vector_empty
 
class  etl::vector_out_of_bounds
 
class  etl::vector_incompatible_type
 
class  etl::vector_base
 
class  etl::ivector< T >
 

Functions

template<typename T >
bool etl::operator== (const etl::ivector< T * > &lhs, const etl::ivector< T * > &rhs)
 
template<typename T >
bool etl::operator!= (const etl::ivector< T * > &lhs, const etl::ivector< T * > &rhs)
 
template<typename T >
bool etl::operator< (const etl::ivector< T * > &lhs, const etl::ivector< T * > &rhs)
 
template<typename T >
bool etl::operator> (const etl::ivector< T * > &lhs, const etl::ivector< T * > &rhs)
 
template<typename T >
bool etl::operator<= (const etl::ivector< T * > &lhs, const etl::ivector< T * > &rhs)
 
template<typename T >
bool etl::operator>= (const etl::ivector< T * > &lhs, const etl::ivector< T * > &rhs)
 
bool etl::operator== (const etl::pvoidvector &lhs, const etl::pvoidvector &rhs)
 
bool etl::operator!= (const etl::pvoidvector &lhs, const etl::pvoidvector &rhs)
 
bool etl::operator< (const etl::pvoidvector &lhs, const etl::pvoidvector &rhs)
 
bool etl::operator> (const etl::pvoidvector &lhs, const etl::pvoidvector &rhs)
 
bool etl::operator<= (const etl::pvoidvector &lhs, const etl::pvoidvector &rhs)
 
bool etl::operator>= (const etl::pvoidvector &lhs, const etl::pvoidvector &rhs)
 
template<typename T >
bool etl::operator== (const etl::ivector< T > &lhs, const etl::ivector< T > &rhs)
 
template<typename T >
bool etl::operator!= (const etl::ivector< T > &lhs, const etl::ivector< T > &rhs)
 
template<typename T >
bool etl::operator< (const etl::ivector< T > &lhs, const etl::ivector< T > &rhs)
 
template<typename T >
bool etl::operator> (const etl::ivector< T > &lhs, const etl::ivector< T > &rhs)
 
template<typename T >
bool etl::operator<= (const etl::ivector< T > &lhs, const etl::ivector< T > &rhs)
 
template<typename T >
bool etl::operator>= (const etl::ivector< T > &lhs, const etl::ivector< T > &rhs)
 

Detailed Description

A vector with the capacity defined at compile time.


Class Documentation

◆ etl::deque_incompatible_type

class etl::deque_incompatible_type

Deque incompatible type exception.

Public Member Functions

 deque_incompatible_type (string_type file_name_, numeric_type line_number_)
 
- Public Member Functions inherited from etl::deque_exception
 deque_exception (string_type reason_, string_type file_name_, numeric_type line_number_)
 
- Public Member Functions inherited from etl::exception
ETL_CONSTEXPR exception (string_type reason_, string_type, numeric_type line_)
 Constructor.
 
ETL_CONSTEXPR string_type what () const
 
ETL_CONSTEXPR string_type file_name () const
 
ETL_CONSTEXPR numeric_type line_number () const
 

Additional Inherited Members

- Public Types inherited from etl::exception
typedef const charstring_type
 
typedef int numeric_type
 

◆ etl::hash_finalised

class etl::hash_finalised

Hash finalised exception.

Public Member Functions

 hash_finalised (string_type file_name_, numeric_type line_number_)
 
- Public Member Functions inherited from etl::hash_exception
 hash_exception (string_type reason_, string_type file_name_, numeric_type line_number_)
 
- Public Member Functions inherited from etl::exception
ETL_CONSTEXPR exception (string_type reason_, string_type, numeric_type line_)
 Constructor.
 
ETL_CONSTEXPR string_type what () const
 
ETL_CONSTEXPR string_type file_name () const
 
ETL_CONSTEXPR numeric_type line_number () const
 

Additional Inherited Members

- Public Types inherited from etl::exception
typedef const charstring_type
 
typedef int numeric_type
 

◆ etl::indirect_vector_buffer_missmatch

class etl::indirect_vector_buffer_missmatch

Vector full exception.

Public Member Functions

 indirect_vector_buffer_missmatch (string_type file_name_, numeric_type line_number_)
 
- Public Member Functions inherited from etl::vector_exception
 vector_exception (string_type reason_, string_type file_name_, numeric_type line_number_)
 
- Public Member Functions inherited from etl::exception
ETL_CONSTEXPR exception (string_type reason_, string_type, numeric_type line_)
 Constructor.
 
ETL_CONSTEXPR string_type what () const
 
ETL_CONSTEXPR string_type file_name () const
 
ETL_CONSTEXPR numeric_type line_number () const
 

Additional Inherited Members

- Public Types inherited from etl::exception
typedef const charstring_type
 
typedef int numeric_type
 

◆ etl::ivector< T * >

class etl::ivector< T * >
template<typename T>
class etl::ivector< T * >

The base class for specifically sized vectors. Can be used as a reference type for all vectors containing a specific pointer type.

Public Types

typedef Tvalue_type
 
typedef value_type & reference
 
typedef const value_type & const_reference
 
typedef value_type * pointer
 
typedef const value_type * const_pointer
 
typedef value_type * iterator
 
typedef const value_type * const_iterator
 
typedef ETL_OR_STD::reverse_iterator< iterator > reverse_iterator
 
typedef ETL_OR_STD::reverse_iterator< const_iterator > const_reverse_iterator
 
typedef size_t size_type
 
typedef etl::iterator_traits< iterator >::difference_type difference_type
 
- Public Types inherited from etl::pvoidvector
typedef voidvalue_type
 
typedef value_type & reference
 
typedef const value_type & const_reference
 
typedef value_type * pointer
 
typedef const value_type * const_pointer
 
typedef value_type * iterator
 
typedef const value_type * const_iterator
 
typedef ETL_OR_STD::reverse_iterator< iterator > reverse_iterator
 
typedef ETL_OR_STD::reverse_iterator< const_iterator > const_reverse_iterator
 
typedef size_t size_type
 
typedef etl::iterator_traits< iterator >::difference_type difference_type
 
- Public Types inherited from etl::vector_base
typedef size_t size_type
 

Public Member Functions

iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
const_reverse_iterator crbegin () const
 
const_reverse_iterator crend () const
 
void resize (size_t new_size)
 
void resize (size_t new_size, value_type value)
 
void uninitialized_resize (size_t new_size)
 
reference operator[] (size_t i)
 
const_reference operator[] (size_t i) const
 
reference at (size_t i)
 
const_reference at (size_t i) const
 
reference front ()
 
const_reference front () const
 
reference back ()
 
const_reference back () const
 
pointer data ()
 
const_pointer data () const
 
template<typename TIterator >
void assign (TIterator first, TIterator last)
 
void assign (size_t n, parameter_t value)
 
void clear ()
 Clears the vector.
 
void push_back (parameter_t value)
 
reference emplace_back ()
 
reference emplace_back (parameter_t value)
 
void pop_back ()
 
iterator insert (const_iterator position, parameter_t value)
 
iterator emplace (const_iterator position)
 Emplaces a value to the vector at the specified position.
 
iterator emplace (const_iterator position, parameter_t value)
 Emplaces a value to the vector at the specified position.
 
void insert (const_iterator position, size_t n, parameter_t value)
 
template<class TIterator >
void insert (const_iterator position, TIterator first, TIterator last)
 
iterator erase (iterator i_element)
 
iterator erase (const_iterator i_element)
 
iterator erase (const_iterator first, const_iterator last)
 
ivectoroperator= (const ivector &rhs)
 Assignment operator.
 
- Public Member Functions inherited from etl::pvoidvector
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
const_reverse_iterator crbegin () const
 
const_reverse_iterator crend () const
 
void resize (size_t new_size)
 
void resize (size_t new_size, value_type value)
 
void uninitialized_resize (size_t new_size)
 
reference operator[] (size_t i)
 
const_reference operator[] (size_t i) const
 
reference at (size_t i)
 
const_reference at (size_t i) const
 
reference front ()
 
const_reference front () const
 
reference back ()
 
const_reference back () const
 
pointer data ()
 
const_pointer data () const
 
template<typename TIterator >
etl::enable_if<!etl::is_pointer< TIterator >::value, void >::type assign (TIterator first, TIterator last)
 
template<typename TIterator >
etl::enable_if< etl::is_pointer< TIterator >::value, void >::type assign (TIterator first, TIterator last)
 
void assign (size_t n, value_type value)
 
void clear ()
 Clears the vector.
 
void push_back (value_type value)
 
void emplace_back (value_type value)
 
void pop_back ()
 
iterator insert (const_iterator position, value_type value)
 
iterator emplace (const_iterator position)
 
iterator emplace (const_iterator position, value_type value)
 
void insert (const_iterator position, size_t n, value_type value)
 
template<typename TIterator >
void insert (const_iterator position, TIterator first, TIterator last)
 
iterator erase (iterator i_element)
 
iterator erase (const_iterator i_element)
 
iterator erase (const_iterator first, const_iterator last)
 
etl::pvoidvectoroperator= (const etl::pvoidvector &rhs)
 Assignment operator.
 
size_type size () const
 
bool empty () const
 
bool full () const
 
size_t available () const
 
- Public Member Functions inherited from etl::vector_base
size_type capacity () const
 
size_type max_size () const
 

Protected Types

typedef value_type parameter_t
 

Protected Member Functions

 ivector (T **p_buffer_, size_t MAX_SIZE_)
 Constructor.
 
- Protected Member Functions inherited from etl::pvoidvector
 pvoidvector (void **p_buffer_, size_t MAX_SIZE)
 Constructor.
 
void initialise ()
 Initialise the vector.
 
void repair_buffer (void **p_buffer_)
 Fix the internal pointers after a low level memory copy.
 
- Protected Member Functions inherited from etl::vector_base
 vector_base (size_t max_size_)
 Constructor.
 
 ~vector_base ()
 Destructor.
 

Additional Inherited Members

- Protected Attributes inherited from etl::pvoidvector
void ** p_buffer
 
void ** p_end
 
- Protected Attributes inherited from etl::vector_base
const size_type CAPACITY
 The maximum number of elements in the vector.
 
 ETL_DECLARE_DEBUG_COUNT
 Internal debugging.
 

Member Function Documentation

◆ assign() [1/2]

template<typename T >
void etl::ivector< T * >::assign ( size_t  n,
parameter_t  value 
)
inline

Assigns values to the vector. If asserts or exceptions are enabled, emits vector_full if the vector does not have enough free space.

Parameters
nThe number of elements to add.
valueThe value to insert for each element.

◆ assign() [2/2]

template<typename T >
template<typename TIterator >
void etl::ivector< T * >::assign ( TIterator  first,
TIterator  last 
)
inline

Assigns values to the vector. If asserts or exceptions are enabled, emits vector_full if the vector does not have enough free space. If asserts or exceptions are enabled, emits vector_iterator if the iterators are reversed.

Parameters
firstThe iterator to the first element.
lastThe iterator to the last element + 1.

◆ at() [1/2]

template<typename T >
reference etl::ivector< T * >::at ( size_t  i)
inline

Returns a reference to the value at index 'i' If asserts or exceptions are enabled, emits an etl::vector_out_of_bounds if the index is out of range.

Parameters
iThe index.
Returns
A reference to the value at index 'i'

◆ at() [2/2]

template<typename T >
const_reference etl::ivector< T * >::at ( size_t  i) const
inline

Returns a const reference to the value at index 'i' If asserts or exceptions are enabled, emits an etl::vector_out_of_bounds if the index is out of range.

Parameters
iThe index.
Returns
A const reference to the value at index 'i'

◆ back() [1/2]

template<typename T >
reference etl::ivector< T * >::back ( )
inline

Returns a reference to the last element.

Returns
A reference to the last element.

◆ back() [2/2]

template<typename T >
const_reference etl::ivector< T * >::back ( ) const
inline

Returns a const reference to the last element.

Returns
A const reference to the last element.

◆ begin() [1/2]

template<typename T >
iterator etl::ivector< T * >::begin ( )
inline

Returns an iterator to the beginning of the vector.

Returns
An iterator to the beginning of the vector.

◆ begin() [2/2]

template<typename T >
const_iterator etl::ivector< T * >::begin ( ) const
inline

Returns a const_iterator to the beginning of the vector.

Returns
A const iterator to the beginning of the vector.

◆ cbegin()

template<typename T >
const_iterator etl::ivector< T * >::cbegin ( ) const
inline

Returns a const_iterator to the beginning of the vector.

Returns
A const iterator to the beginning of the vector.

◆ cend()

template<typename T >
const_iterator etl::ivector< T * >::cend ( ) const
inline

Returns a const_iterator to the end of the vector.

Returns
A const iterator to the end of the vector.

◆ crbegin()

template<typename T >
const_reverse_iterator etl::ivector< T * >::crbegin ( ) const
inline

Returns a const reverse iterator to the reverse beginning of the vector.

Returns
Const reverse iterator to the reverse beginning of the vector.

◆ crend()

template<typename T >
const_reverse_iterator etl::ivector< T * >::crend ( ) const
inline

Returns a const reverse iterator to the end + 1 of the vector.

Returns
Const reverse iterator to the end + 1 of the vector.

◆ data() [1/2]

template<typename T >
pointer etl::ivector< T * >::data ( )
inline

Returns a pointer to the beginning of the vector data.

Returns
A pointer to the beginning of the vector data.

◆ data() [2/2]

template<typename T >
const_pointer etl::ivector< T * >::data ( ) const
inline

Returns a const pointer to the beginning of the vector data.

Returns
A const pointer to the beginning of the vector data.

◆ emplace_back() [1/2]

template<typename T >
reference etl::ivector< T * >::emplace_back ( )
inline

Constructs a value at the end of the vector. If asserts or exceptions are enabled, emits vector_full if the vector is already full.

Parameters
valueThe value to add.

◆ emplace_back() [2/2]

template<typename T >
reference etl::ivector< T * >::emplace_back ( parameter_t  value)
inline

Constructs a value at the end of the vector. If asserts or exceptions are enabled, emits vector_full if the vector is already full.

Parameters
valueThe value to add.

◆ end() [1/2]

template<typename T >
iterator etl::ivector< T * >::end ( )
inline

Returns an iterator to the end of the vector.

Returns
An iterator to the end of the vector.

◆ end() [2/2]

template<typename T >
const_iterator etl::ivector< T * >::end ( ) const
inline

Returns a const_iterator to the end of the vector.

Returns
A const iterator to the end of the vector.

◆ erase() [1/3]

template<typename T >
iterator etl::ivector< T * >::erase ( const_iterator  first,
const_iterator  last 
)
inline

Erases a range of elements. The range includes all the elements between first and last, including the element pointed by first, but not the one pointed by last.

Parameters
firstIterator to the first element.
lastIterator to the last element.
Returns
An iterator pointing to the element that followed the erased element.

◆ erase() [2/3]

template<typename T >
iterator etl::ivector< T * >::erase ( const_iterator  i_element)
inline

Erases an element.

Parameters
i_elementIterator to the element.
Returns
An iterator pointing to the element that followed the erased element.

◆ erase() [3/3]

template<typename T >
iterator etl::ivector< T * >::erase ( iterator  i_element)
inline

Erases an element.

Parameters
i_elementIterator to the element.
Returns
An iterator pointing to the element that followed the erased element.

◆ front() [1/2]

template<typename T >
reference etl::ivector< T * >::front ( )
inline

Returns a reference to the first element.

Returns
A reference to the first element.

◆ front() [2/2]

template<typename T >
const_reference etl::ivector< T * >::front ( ) const
inline

Returns a const reference to the first element.

Returns
A const reference to the first element.

◆ insert() [1/3]

template<typename T >
iterator etl::ivector< T * >::insert ( const_iterator  position,
parameter_t  value 
)
inline

Inserts a value to the vector. If asserts or exceptions are enabled, emits vector_full if the vector is already full.

Parameters
positionThe position to insert before.
valueThe value to insert.

◆ insert() [2/3]

template<typename T >
void etl::ivector< T * >::insert ( const_iterator  position,
size_t  n,
parameter_t  value 
)
inline

Inserts 'n' values to the vector. If asserts or exceptions are enabled, emits vector_full if the vector does not have enough free space.

Parameters
positionThe position to insert before.
nThe number of elements to add.
valueThe value to insert.

◆ insert() [3/3]

template<typename T >
template<class TIterator >
void etl::ivector< T * >::insert ( const_iterator  position,
TIterator  first,
TIterator  last 
)
inline

Inserts a range of values to the vector. If asserts or exceptions are enabled, emits vector_full if the vector does not have enough free space.

Parameters
positionThe position to insert before.
firstThe first element to add.
lastThe last + 1 element to add.

◆ operator[]() [1/2]

template<typename T >
reference etl::ivector< T * >::operator[] ( size_t  i)
inline

Returns a reference to the value at index 'i'

Parameters
iThe index.
Returns
A reference to the value at index 'i'

◆ operator[]() [2/2]

template<typename T >
const_reference etl::ivector< T * >::operator[] ( size_t  i) const
inline

Returns a const reference to the value at index 'i'

Parameters
iThe index.
Returns
A const reference to the value at index 'i'

◆ pop_back()

template<typename T >
void etl::ivector< T * >::pop_back ( )
inline

Removes an element from the end of the vector. Does nothing if the vector is empty.

◆ push_back()

template<typename T >
void etl::ivector< T * >::push_back ( parameter_t  value)
inline

Inserts a value at the end of the vector. If asserts or exceptions are enabled, emits vector_full if the vector is already full.

Parameters
valueThe value to add.

◆ rbegin() [1/2]

template<typename T >
reverse_iterator etl::ivector< T * >::rbegin ( )
inline

Returns an reverse iterator to the reverse beginning of the vector.

Returns
Iterator to the reverse beginning of the vector.

◆ rbegin() [2/2]

template<typename T >
const_reverse_iterator etl::ivector< T * >::rbegin ( ) const
inline

Returns a const reverse iterator to the reverse beginning of the vector.

Returns
Const iterator to the reverse beginning of the vector.

◆ rend() [1/2]

template<typename T >
reverse_iterator etl::ivector< T * >::rend ( )
inline

Returns a reverse iterator to the end + 1 of the vector.

Returns
Reverse iterator to the end + 1 of the vector.

◆ rend() [2/2]

template<typename T >
const_reverse_iterator etl::ivector< T * >::rend ( ) const
inline

Returns a const reverse iterator to the end + 1 of the vector.

Returns
Const reverse iterator to the end + 1 of the vector.

◆ resize() [1/2]

template<typename T >
void etl::ivector< T * >::resize ( size_t  new_size)
inline

Resizes the vector. If asserts or exceptions are enabled and the new size is larger than the maximum then a vector_full is thrown.

Parameters
new_sizeThe new size.

◆ resize() [2/2]

template<typename T >
void etl::ivector< T * >::resize ( size_t  new_size,
value_type  value 
)
inline

Resizes the vector. If asserts or exceptions are enabled and the new size is larger than the maximum then a vector_full is thrown.

Parameters
new_sizeThe new size.
valueThe value to fill new elements with. Default = default constructed value.

◆ uninitialized_resize()

template<typename T >
void etl::ivector< T * >::uninitialized_resize ( size_t  new_size)
inline

Resizes the vector, but does not initialise new entries.

Parameters
new_sizeThe new size.

◆ etl::pvoidvector

class etl::pvoidvector

The base class for void* vectors.

Public Types

typedef voidvalue_type
 
typedef value_type & reference
 
typedef const value_type & const_reference
 
typedef value_type * pointer
 
typedef const value_type * const_pointer
 
typedef value_type * iterator
 
typedef const value_type * const_iterator
 
typedef ETL_OR_STD::reverse_iterator< iterator > reverse_iterator
 
typedef ETL_OR_STD::reverse_iterator< const_iterator > const_reverse_iterator
 
typedef size_t size_type
 
typedef etl::iterator_traits< iterator >::difference_type difference_type
 
- Public Types inherited from etl::vector_base
typedef size_t size_type
 

Public Member Functions

iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
const_reverse_iterator crbegin () const
 
const_reverse_iterator crend () const
 
void resize (size_t new_size)
 
void resize (size_t new_size, value_type value)
 
void uninitialized_resize (size_t new_size)
 
reference operator[] (size_t i)
 
const_reference operator[] (size_t i) const
 
reference at (size_t i)
 
const_reference at (size_t i) const
 
reference front ()
 
const_reference front () const
 
reference back ()
 
const_reference back () const
 
pointer data ()
 
const_pointer data () const
 
template<typename TIterator >
etl::enable_if<!etl::is_pointer< TIterator >::value, void >::type assign (TIterator first, TIterator last)
 
template<typename TIterator >
etl::enable_if< etl::is_pointer< TIterator >::value, void >::type assign (TIterator first, TIterator last)
 
void assign (size_t n, value_type value)
 
void clear ()
 Clears the vector.
 
void push_back (value_type value)
 
void emplace_back (value_type value)
 
void pop_back ()
 
iterator insert (const_iterator position, value_type value)
 
iterator emplace (const_iterator position)
 
iterator emplace (const_iterator position, value_type value)
 
void insert (const_iterator position, size_t n, value_type value)
 
template<typename TIterator >
void insert (const_iterator position, TIterator first, TIterator last)
 
iterator erase (iterator i_element)
 
iterator erase (const_iterator i_element)
 
iterator erase (const_iterator first, const_iterator last)
 
etl::pvoidvectoroperator= (const etl::pvoidvector &rhs)
 Assignment operator.
 
size_type size () const
 
bool empty () const
 
bool full () const
 
size_t available () const
 
- Public Member Functions inherited from etl::vector_base
size_type capacity () const
 
size_type max_size () const
 

Protected Member Functions

 pvoidvector (void **p_buffer_, size_t MAX_SIZE)
 Constructor.
 
void initialise ()
 Initialise the vector.
 
void repair_buffer (void **p_buffer_)
 Fix the internal pointers after a low level memory copy.
 
- Protected Member Functions inherited from etl::vector_base
 vector_base (size_t max_size_)
 Constructor.
 
 ~vector_base ()
 Destructor.
 

Protected Attributes

void ** p_buffer
 
void ** p_end
 
- Protected Attributes inherited from etl::vector_base
const size_type CAPACITY
 The maximum number of elements in the vector.
 
 ETL_DECLARE_DEBUG_COUNT
 Internal debugging.
 

Member Function Documentation

◆ assign() [1/3]

void etl::pvoidvector::assign ( size_t  n,
value_type  value 
)
inline

Assigns values to the vector. If asserts or exceptions are enabled, emits vector_full if the vector does not have enough free space.

Parameters
nThe number of elements to add.
valueThe value to insert for each element.

◆ assign() [2/3]

template<typename TIterator >
etl::enable_if<!etl::is_pointer< TIterator >::value, void >::type etl::pvoidvector::assign ( TIterator  first,
TIterator  last 
)
inline

Assigns values to the vector. Non-pointer If asserts or exceptions are enabled, emits vector_full if the vector does not have enough free space. If asserts or exceptions are enabled, emits vector_iterator if the iterators are reversed.

Parameters
firstThe iterator to the first element.
lastThe iterator to the last element + 1.

◆ assign() [3/3]

template<typename TIterator >
etl::enable_if< etl::is_pointer< TIterator >::value, void >::type etl::pvoidvector::assign ( TIterator  first,
TIterator  last 
)
inline

Assigns values to the vector. Pointer If asserts or exceptions are enabled, emits vector_full if the vector does not have enough free space. If asserts or exceptions are enabled, emits vector_iterator if the iterators are reversed.

Parameters
firstThe iterator to the first element.
lastThe iterator to the last element + 1.

◆ at() [1/2]

reference etl::pvoidvector::at ( size_t  i)
inline

Returns a reference to the value at index 'i' If asserts or exceptions are enabled, emits an etl::vector_out_of_bounds if the index is out of range.

Parameters
iThe index.
Returns
A reference to the value at index 'i'

◆ at() [2/2]

const_reference etl::pvoidvector::at ( size_t  i) const
inline

Returns a const reference to the value at index 'i' If asserts or exceptions are enabled, emits an etl::vector_out_of_bounds if the index is out of range.

Parameters
iThe index.
Returns
A const reference to the value at index 'i'

◆ available()

size_t etl::pvoidvector::available ( ) const
inline

Returns the remaining capacity.

Returns
The remaining capacity.

◆ back() [1/2]

reference etl::pvoidvector::back ( )
inline

Returns a reference to the last element.

Returns
A reference to the last element.

◆ back() [2/2]

const_reference etl::pvoidvector::back ( ) const
inline

Returns a const reference to the last element.

Returns
A const reference to the last element.

◆ begin() [1/2]

iterator etl::pvoidvector::begin ( )
inline

Returns an iterator to the beginning of the vector.

Returns
An iterator to the beginning of the vector.

◆ begin() [2/2]

const_iterator etl::pvoidvector::begin ( ) const
inline

Returns a const_iterator to the beginning of the vector.

Returns
A const iterator to the beginning of the vector.

◆ cbegin()

const_iterator etl::pvoidvector::cbegin ( ) const
inline

Returns a const_iterator to the beginning of the vector.

Returns
A const iterator to the beginning of the vector.

◆ cend()

const_iterator etl::pvoidvector::cend ( ) const
inline

Returns a const_iterator to the end of the vector.

Returns
A const iterator to the end of the vector.

◆ crbegin()

const_reverse_iterator etl::pvoidvector::crbegin ( ) const
inline

Returns a const reverse iterator to the reverse beginning of the vector.

Returns
Const reverse iterator to the reverse beginning of the vector.

◆ crend()

const_reverse_iterator etl::pvoidvector::crend ( ) const
inline

Returns a const reverse iterator to the end + 1 of the vector.

Returns
Const reverse iterator to the end + 1 of the vector.

◆ data() [1/2]

pointer etl::pvoidvector::data ( )
inline

Returns a pointer to the beginning of the vector data.

Returns
A pointer to the beginning of the vector data.

◆ data() [2/2]

const_pointer etl::pvoidvector::data ( ) const
inline

Returns a const pointer to the beginning of the vector data.

Returns
A const pointer to the beginning of the vector data.

◆ emplace() [1/2]

iterator etl::pvoidvector::emplace ( const_iterator  position)
inline

Emplaces a value to the vector at the specified position. If asserts or exceptions are enabled, emits vector_full if the vector is already full.

◆ emplace() [2/2]

iterator etl::pvoidvector::emplace ( const_iterator  position,
value_type  value 
)
inline

Emplaces a value to the vector at the specified position. If asserts or exceptions are enabled, emits vector_full if the vector is already full.

◆ emplace_back()

void etl::pvoidvector::emplace_back ( value_type  value)
inline

Emplaces a value at the end of the vector. If asserts or exceptions are enabled, emits vector_full if the vector is already full.

Parameters
valueThe value to add.

◆ empty()

bool etl::pvoidvector::empty ( ) const
inline

Checks the 'empty' state of the vector.

Returns
true if empty.

◆ end() [1/2]

iterator etl::pvoidvector::end ( )
inline

Returns an iterator to the end of the vector.

Returns
An iterator to the end of the vector.

◆ end() [2/2]

const_iterator etl::pvoidvector::end ( ) const
inline

Returns a const_iterator to the end of the vector.

Returns
A const iterator to the end of the vector.

◆ erase() [1/3]

iterator etl::pvoidvector::erase ( const_iterator  first,
const_iterator  last 
)
inline

Erases a range of elements. The range includes all the elements between first and last, including the element pointed by first, but not the one pointed by last.

Parameters
firstIterator to the first element.
lastIterator to the last element.
Returns
An iterator pointing to the element that followed the erased element.

◆ erase() [2/3]

iterator etl::pvoidvector::erase ( const_iterator  i_element)
inline

Erases an element.

Parameters
i_elementIterator to the element.
Returns
An iterator pointing to the element that followed the erased element.

◆ erase() [3/3]

iterator etl::pvoidvector::erase ( iterator  i_element)
inline

Erases an element.

Parameters
i_elementIterator to the element.
Returns
An iterator pointing to the element that followed the erased element.

◆ front() [1/2]

reference etl::pvoidvector::front ( )
inline

Returns a reference to the first element.

Returns
A reference to the first element.

◆ front() [2/2]

const_reference etl::pvoidvector::front ( ) const
inline

Returns a const reference to the first element.

Returns
A const reference to the first element.

◆ full()

bool etl::pvoidvector::full ( ) const
inline

Checks the 'full' state of the vector.

Returns
true if full.

◆ insert() [1/3]

void etl::pvoidvector::insert ( const_iterator  position,
size_t  n,
value_type  value 
)
inline

Inserts 'n' values to the vector. If asserts or exceptions are enabled, emits vector_full if the vector does not have enough free space.

Parameters
positionThe position to insert before.
nThe number of elements to add.
valueThe value to insert.

◆ insert() [2/3]

template<typename TIterator >
void etl::pvoidvector::insert ( const_iterator  position,
TIterator  first,
TIterator  last 
)
inline

Inserts a range of values to the vector. If asserts or exceptions are enabled, emits vector_full if the vector does not have enough free space. For fundamental and pointer types.

Parameters
positionThe position to insert before.
firstThe first element to add.
lastThe last + 1 element to add.

◆ insert() [3/3]

iterator etl::pvoidvector::insert ( const_iterator  position,
value_type  value 
)
inline

Inserts a value to the vector. If asserts or exceptions are enabled, emits vector_full if the vector is already full.

Parameters
positionThe position to insert before.
valueThe value to insert.

◆ operator[]() [1/2]

reference etl::pvoidvector::operator[] ( size_t  i)
inline

Returns a reference to the value at index 'i'

Parameters
iThe index.
Returns
A reference to the value at index 'i'

◆ operator[]() [2/2]

const_reference etl::pvoidvector::operator[] ( size_t  i) const
inline

Returns a const reference to the value at index 'i'

Parameters
iThe index.
Returns
A const reference to the value at index 'i'

◆ pop_back()

void etl::pvoidvector::pop_back ( )
inline

Removes an element from the end of the vector. Does nothing if the vector is empty.

◆ push_back()

void etl::pvoidvector::push_back ( value_type  value)
inline

Inserts a value at the end of the vector. If asserts or exceptions are enabled, emits vector_full if the vector is already full.

Parameters
valueThe value to add.

◆ rbegin() [1/2]

reverse_iterator etl::pvoidvector::rbegin ( )
inline

Returns an reverse iterator to the reverse beginning of the vector.

Returns
Iterator to the reverse beginning of the vector.

◆ rbegin() [2/2]

const_reverse_iterator etl::pvoidvector::rbegin ( ) const
inline

Returns a const reverse iterator to the reverse beginning of the vector.

Returns
Const iterator to the reverse beginning of the vector.

◆ rend() [1/2]

reverse_iterator etl::pvoidvector::rend ( )
inline

Returns a reverse iterator to the end + 1 of the vector.

Returns
Reverse iterator to the end + 1 of the vector.

◆ rend() [2/2]

const_reverse_iterator etl::pvoidvector::rend ( ) const
inline

Returns a const reverse iterator to the end + 1 of the vector.

Returns
Const reverse iterator to the end + 1 of the vector.

◆ resize() [1/2]

void etl::pvoidvector::resize ( size_t  new_size)
inline

Resizes the vector. If asserts or exceptions are enabled and the new size is larger than the maximum then a vector_full is thrown.

Parameters
new_sizeThe new size.

◆ resize() [2/2]

void etl::pvoidvector::resize ( size_t  new_size,
value_type  value 
)
inline

Resizes the vector. If asserts or exceptions are enabled and the new size is larger than the maximum then a vector_full is thrown.

Parameters
new_sizeThe new size.
valueThe value to fill new elements with. Default = default constructed value.

◆ size()

size_type etl::pvoidvector::size ( ) const
inline

Gets the current size of the vector.

Returns
The current size of the vector.

◆ uninitialized_resize()

void etl::pvoidvector::uninitialized_resize ( size_t  new_size)
inline

Resizes the vector, but does not initialise new entries.

Parameters
new_sizeThe new size.

◆ etl::vector_exception

class etl::vector_exception

Exception base for vectors

Public Member Functions

 vector_exception (string_type reason_, string_type file_name_, numeric_type line_number_)
 
- Public Member Functions inherited from etl::exception
ETL_CONSTEXPR exception (string_type reason_, string_type, numeric_type line_)
 Constructor.
 
ETL_CONSTEXPR string_type what () const
 
ETL_CONSTEXPR string_type file_name () const
 
ETL_CONSTEXPR numeric_type line_number () const
 

Additional Inherited Members

- Public Types inherited from etl::exception
typedef const charstring_type
 
typedef int numeric_type
 

◆ etl::vector_full

class etl::vector_full

Vector full exception.

Public Member Functions

 vector_full (string_type file_name_, numeric_type line_number_)
 
- Public Member Functions inherited from etl::vector_exception
 vector_exception (string_type reason_, string_type file_name_, numeric_type line_number_)
 
- Public Member Functions inherited from etl::exception
ETL_CONSTEXPR exception (string_type reason_, string_type, numeric_type line_)
 Constructor.
 
ETL_CONSTEXPR string_type what () const
 
ETL_CONSTEXPR string_type file_name () const
 
ETL_CONSTEXPR numeric_type line_number () const
 

Additional Inherited Members

- Public Types inherited from etl::exception
typedef const charstring_type
 
typedef int numeric_type
 

◆ etl::vector_empty

class etl::vector_empty

Vector empty exception.

Public Member Functions

 vector_empty (string_type file_name_, numeric_type line_number_)
 
- Public Member Functions inherited from etl::vector_exception
 vector_exception (string_type reason_, string_type file_name_, numeric_type line_number_)
 
- Public Member Functions inherited from etl::exception
ETL_CONSTEXPR exception (string_type reason_, string_type, numeric_type line_)
 Constructor.
 
ETL_CONSTEXPR string_type what () const
 
ETL_CONSTEXPR string_type file_name () const
 
ETL_CONSTEXPR numeric_type line_number () const
 

Additional Inherited Members

- Public Types inherited from etl::exception
typedef const charstring_type
 
typedef int numeric_type
 

◆ etl::vector_out_of_bounds

class etl::vector_out_of_bounds

Vector out of bounds exception.

Public Member Functions

 vector_out_of_bounds (string_type file_name_, numeric_type line_number_)
 
- Public Member Functions inherited from etl::vector_exception
 vector_exception (string_type reason_, string_type file_name_, numeric_type line_number_)
 
- Public Member Functions inherited from etl::exception
ETL_CONSTEXPR exception (string_type reason_, string_type, numeric_type line_)
 Constructor.
 
ETL_CONSTEXPR string_type what () const
 
ETL_CONSTEXPR string_type file_name () const
 
ETL_CONSTEXPR numeric_type line_number () const
 

Additional Inherited Members

- Public Types inherited from etl::exception
typedef const charstring_type
 
typedef int numeric_type
 

◆ etl::vector_incompatible_type

class etl::vector_incompatible_type

Vector incompatible type exception.

Public Member Functions

 vector_incompatible_type (string_type file_name_, numeric_type line_number_)
 
- Public Member Functions inherited from etl::vector_exception
 vector_exception (string_type reason_, string_type file_name_, numeric_type line_number_)
 
- Public Member Functions inherited from etl::exception
ETL_CONSTEXPR exception (string_type reason_, string_type, numeric_type line_)
 Constructor.
 
ETL_CONSTEXPR string_type what () const
 
ETL_CONSTEXPR string_type file_name () const
 
ETL_CONSTEXPR numeric_type line_number () const
 

Additional Inherited Members

- Public Types inherited from etl::exception
typedef const charstring_type
 
typedef int numeric_type
 

◆ etl::vector_base

class etl::vector_base

The base class for all templated vector types.

Public Types

typedef size_t size_type
 

Public Member Functions

size_type capacity () const
 
size_type max_size () const
 

Protected Member Functions

 vector_base (size_t max_size_)
 Constructor.
 
 ~vector_base ()
 Destructor.
 

Protected Attributes

const size_type CAPACITY
 The maximum number of elements in the vector.
 
 ETL_DECLARE_DEBUG_COUNT
 Internal debugging.
 

Member Function Documentation

◆ capacity()

size_type etl::vector_base::capacity ( ) const
inline

Returns the capacity of the vector.

Returns
The capacity of the vector.

◆ max_size()

size_type etl::vector_base::max_size ( ) const
inline

Returns the maximum possible size of the vector.

Returns
The maximum size of the vector.

◆ etl::ivector

class etl::ivector
template<typename T>
class etl::ivector< T >

The base class for specifically sized vectors. Can be used as a reference type for all vectors containing a specific type.

Public Types

typedef T value_type
 
typedef Treference
 
typedef const Tconst_reference
 
typedef Tpointer
 
typedef const Tconst_pointer
 
typedef Titerator
 
typedef const Tconst_iterator
 
typedef ETL_OR_STD::reverse_iterator< iteratorreverse_iterator
 
typedef ETL_OR_STD::reverse_iterator< const_iteratorconst_reverse_iterator
 
typedef size_t size_type
 
typedef etl::iterator_traits< iterator >::difference_type difference_type
 
- Public Types inherited from etl::vector_base
typedef size_t size_type
 

Public Member Functions

iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
const_reverse_iterator crbegin () const
 
const_reverse_iterator crend () const
 
void resize (size_t new_size)
 
void resize (size_t new_size, const_reference value)
 
void uninitialized_resize (size_t new_size)
 
void reserve (size_t n)
 
reference operator[] (size_t i)
 
const_reference operator[] (size_t i) const
 
reference at (size_t i)
 
const_reference at (size_t i) const
 
reference front ()
 
const_reference front () const
 
reference back ()
 
const_reference back () const
 
pointer data ()
 
ETL_CONSTEXPR const_pointer data () const
 
template<typename TIterator >
etl::enable_if<!etl::is_integral< TIterator >::value, void >::type assign (TIterator first, TIterator last)
 
void assign (size_t n, parameter_t value)
 
void clear ()
 Clears the vector.
 
void fill (const T &value)
 Fills the vector.
 
void push_back (const_reference value)
 
reference emplace_back ()
 
template<typename T1 >
reference emplace_back (const T1 &value1)
 
template<typename T1 , typename T2 >
reference emplace_back (const T1 &value1, const T2 &value2)
 
template<typename T1 , typename T2 , typename T3 >
reference emplace_back (const T1 &value1, const T2 &value2, const T3 &value3)
 
template<typename T1 , typename T2 , typename T3 , typename T4 >
reference emplace_back (const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4)
 
void pop_back ()
 
iterator insert (const_iterator position, const_reference value)
 
template<typename T1 >
iterator emplace (const_iterator position, const T1 &value1)
 Emplaces a value to the vector at the specified position.
 
template<typename T1 , typename T2 >
iterator emplace (const_iterator position, const T1 &value1, const T2 &value2)
 
template<typename T1 , typename T2 , typename T3 >
iterator emplace (const_iterator position, const T1 &value1, const T2 &value2, const T3 &value3)
 
template<typename T1 , typename T2 , typename T3 , typename T4 >
iterator emplace (const_iterator position, const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4)
 
void insert (const_iterator position, size_t n, parameter_t value)
 
template<class TIterator >
void insert (const_iterator position, TIterator first, TIterator last, typename etl::enable_if<!etl::is_integral< TIterator >::value, int >::type=0)
 
iterator erase (iterator i_element)
 
iterator erase (const_iterator i_element)
 
iterator erase (const_iterator first, const_iterator last)
 
ivectoroperator= (const ivector &rhs)
 Assignment operator.
 
size_type size () const
 
bool empty () const
 
bool full () const
 
size_t available () const
 
- Public Member Functions inherited from etl::vector_base
size_type capacity () const
 
size_type max_size () const
 

Protected Types

typedef etl::parameter_type< T >::type parameter_t
 

Protected Member Functions

 ivector (T *p_buffer_, size_t MAX_SIZE)
 Constructor.
 
void initialise ()
 Initialise the vector.
 
void repair_buffer (T *p_buffer_)
 Fix the internal pointers after a low level memory copy.
 
- Protected Member Functions inherited from etl::vector_base
 vector_base (size_t max_size_)
 Constructor.
 
 ~vector_base ()
 Destructor.
 

Protected Attributes

pointer p_buffer
 Pointer to the start of the buffer.
 
pointer p_end
 Pointer to one past the last element in the buffer.
 
- Protected Attributes inherited from etl::vector_base
const size_type CAPACITY
 The maximum number of elements in the vector.
 
 ETL_DECLARE_DEBUG_COUNT
 Internal debugging.
 

Member Function Documentation

◆ assign() [1/2]

template<typename T >
void etl::ivector< T >::assign ( size_t  n,
parameter_t  value 
)
inline

Assigns values to the vector. If asserts or exceptions are enabled, emits vector_full if the vector does not have enough free space.

Parameters
nThe number of elements to add.
valueThe value to insert for each element.

◆ assign() [2/2]

template<typename T >
template<typename TIterator >
etl::enable_if<!etl::is_integral< TIterator >::value, void >::type etl::ivector< T >::assign ( TIterator  first,
TIterator  last 
)
inline

Assigns values to the vector. If asserts or exceptions are enabled, emits vector_full if the vector does not have enough free space. If asserts or exceptions are enabled, emits vector_iterator if the iterators are reversed.

Parameters
firstThe iterator to the first element.
lastThe iterator to the last element + 1.

◆ at() [1/2]

template<typename T >
reference etl::ivector< T >::at ( size_t  i)
inline

Returns a reference to the value at index 'i' If asserts or exceptions are enabled, emits an etl::vector_out_of_bounds if the index is out of range.

Parameters
iThe index.
Returns
A reference to the value at index 'i'

◆ at() [2/2]

template<typename T >
const_reference etl::ivector< T >::at ( size_t  i) const
inline

Returns a const reference to the value at index 'i' If asserts or exceptions are enabled, emits an etl::vector_out_of_bounds if the index is out of range.

Parameters
iThe index.
Returns
A const reference to the value at index 'i'

◆ available()

template<typename T >
size_t etl::ivector< T >::available ( ) const
inline

Returns the remaining capacity.

Returns
The remaining capacity.

◆ back() [1/2]

template<typename T >
reference etl::ivector< T >::back ( )
inline

Returns a reference to the last element.

Returns
A reference to the last element.

◆ back() [2/2]

template<typename T >
const_reference etl::ivector< T >::back ( ) const
inline

Returns a const reference to the last element.

Returns
A const reference to the last element.

◆ begin() [1/2]

template<typename T >
iterator etl::ivector< T >::begin ( )
inline

Returns an iterator to the beginning of the vector.

Returns
An iterator to the beginning of the vector.

◆ begin() [2/2]

template<typename T >
const_iterator etl::ivector< T >::begin ( ) const
inline

Returns a const_iterator to the beginning of the vector.

Returns
A const iterator to the beginning of the vector.

◆ cbegin()

template<typename T >
const_iterator etl::ivector< T >::cbegin ( ) const
inline

Returns a const_iterator to the beginning of the vector.

Returns
A const iterator to the beginning of the vector.

◆ cend()

template<typename T >
const_iterator etl::ivector< T >::cend ( ) const
inline

Returns a const_iterator to the end of the vector.

Returns
A const iterator to the end of the vector.

◆ crbegin()

template<typename T >
const_reverse_iterator etl::ivector< T >::crbegin ( ) const
inline

Returns a const reverse iterator to the reverse beginning of the vector.

Returns
Const reverse iterator to the reverse beginning of the vector.

◆ crend()

template<typename T >
const_reverse_iterator etl::ivector< T >::crend ( ) const
inline

Returns a const reverse iterator to the end + 1 of the vector.

Returns
Const reverse iterator to the end + 1 of the vector.

◆ data() [1/2]

template<typename T >
pointer etl::ivector< T >::data ( )
inline

Returns a pointer to the beginning of the vector data.

Returns
A pointer to the beginning of the vector data.

◆ data() [2/2]

template<typename T >
ETL_CONSTEXPR const_pointer etl::ivector< T >::data ( ) const
inline

Returns a const pointer to the beginning of the vector data.

Returns
A const pointer to the beginning of the vector data.

◆ emplace_back() [1/5]

template<typename T >
reference etl::ivector< T >::emplace_back ( )
inline

Constructs a value at the end of the vector. If asserts or exceptions are enabled, emits vector_full if the vector is already full.

Parameters
valueThe value to add.

◆ emplace_back() [2/5]

template<typename T >
template<typename T1 >
reference etl::ivector< T >::emplace_back ( const T1 value1)
inline

Constructs a value at the end of the vector. If asserts or exceptions are enabled, emits vector_full if the vector is already full.

Parameters
valueThe value to add.

◆ emplace_back() [3/5]

template<typename T >
template<typename T1 , typename T2 >
reference etl::ivector< T >::emplace_back ( const T1 value1,
const T2 value2 
)
inline

Constructs a value at the end of the vector. If asserts or exceptions are enabled, emits vector_full if the vector is already full.

Parameters
valueThe value to add.

◆ emplace_back() [4/5]

template<typename T >
template<typename T1 , typename T2 , typename T3 >
reference etl::ivector< T >::emplace_back ( const T1 value1,
const T2 value2,
const T3 value3 
)
inline

Constructs a value at the end of the vector. If asserts or exceptions are enabled, emits vector_full if the vector is already full.

Parameters
valueThe value to add.

◆ emplace_back() [5/5]

template<typename T >
reference etl::ivector< T >::emplace_back ( const T1 value1,
const T2 value2,
const T3 value3,
const T4 value4 
)
inline

Constructs a value at the end of the vector. If asserts or exceptions are enabled, emits vector_full if the vector is already full.

Parameters
valueThe value to add.

◆ empty()

template<typename T >
bool etl::ivector< T >::empty ( ) const
inline

Checks the 'empty' state of the vector.

Returns
true if empty.

◆ end() [1/2]

template<typename T >
iterator etl::ivector< T >::end ( )
inline

Returns an iterator to the end of the vector.

Returns
An iterator to the end of the vector.

◆ end() [2/2]

template<typename T >
const_iterator etl::ivector< T >::end ( ) const
inline

Returns a const_iterator to the end of the vector.

Returns
A const iterator to the end of the vector.

◆ erase() [1/3]

template<typename T >
iterator etl::ivector< T >::erase ( const_iterator  first,
const_iterator  last 
)
inline

Erases a range of elements. The range includes all the elements between first and last, including the element pointed by first, but not the one pointed by last.

Parameters
firstIterator to the first element.
lastIterator to the last element.
Returns
An iterator pointing to the element that followed the erased element.

◆ erase() [2/3]

template<typename T >
iterator etl::ivector< T >::erase ( const_iterator  i_element)
inline

Erases an element.

Parameters
i_elementIterator to the element.
Returns
An iterator pointing to the element that followed the erased element.

◆ erase() [3/3]

template<typename T >
iterator etl::ivector< T >::erase ( iterator  i_element)
inline

Erases an element.

Parameters
i_elementIterator to the element.
Returns
An iterator pointing to the element that followed the erased element.

◆ front() [1/2]

template<typename T >
reference etl::ivector< T >::front ( )
inline

Returns a reference to the first element.

Returns
A reference to the first element.

◆ front() [2/2]

template<typename T >
const_reference etl::ivector< T >::front ( ) const
inline

Returns a const reference to the first element.

Returns
A const reference to the first element.

◆ full()

template<typename T >
bool etl::ivector< T >::full ( ) const
inline

Checks the 'full' state of the vector.

Returns
true if full.

◆ insert() [1/3]

template<typename T >
iterator etl::ivector< T >::insert ( const_iterator  position,
const_reference  value 
)
inline

Inserts a value to the vector. If asserts or exceptions are enabled, emits vector_full if the vector is already full.

Parameters
positionThe position to insert before.
valueThe value to insert.

◆ insert() [2/3]

template<typename T >
void etl::ivector< T >::insert ( const_iterator  position,
size_t  n,
parameter_t  value 
)
inline

Inserts 'n' values to the vector. If asserts or exceptions are enabled, emits vector_full if the vector does not have enough free space.

Parameters
positionThe position to insert before.
nThe number of elements to add.
valueThe value to insert.

◆ insert() [3/3]

template<typename T >
template<class TIterator >
void etl::ivector< T >::insert ( const_iterator  position,
TIterator  first,
TIterator  last,
typename etl::enable_if<!etl::is_integral< TIterator >::value, int >::type  = 0 
)
inline

Inserts a range of values to the vector. If asserts or exceptions are enabled, emits vector_full if the vector does not have enough free space. For fundamental and pointer types.

Parameters
positionThe position to insert before.
firstThe first element to add.
lastThe last + 1 element to add.

◆ operator[]() [1/2]

template<typename T >
reference etl::ivector< T >::operator[] ( size_t  i)
inline

Returns a reference to the value at index 'i'

Parameters
iThe index.
Returns
A reference to the value at index 'i'

◆ operator[]() [2/2]

template<typename T >
const_reference etl::ivector< T >::operator[] ( size_t  i) const
inline

Returns a const reference to the value at index 'i'

Parameters
iThe index.
Returns
A const reference to the value at index 'i'

◆ pop_back()

template<typename T >
void etl::ivector< T >::pop_back ( )
inline

Removes an element from the end of the vector. Does nothing if the vector is empty.

◆ push_back()

template<typename T >
void etl::ivector< T >::push_back ( const_reference  value)
inline

Inserts a value at the end of the vector. If asserts or exceptions are enabled, emits vector_full if the vector is already full.

Parameters
valueThe value to add.

◆ rbegin() [1/2]

template<typename T >
reverse_iterator etl::ivector< T >::rbegin ( )
inline

Returns an reverse iterator to the reverse beginning of the vector.

Returns
Iterator to the reverse beginning of the vector.

◆ rbegin() [2/2]

template<typename T >
const_reverse_iterator etl::ivector< T >::rbegin ( ) const
inline

Returns a const reverse iterator to the reverse beginning of the vector.

Returns
Const iterator to the reverse beginning of the vector.

◆ rend() [1/2]

template<typename T >
reverse_iterator etl::ivector< T >::rend ( )
inline

Returns a reverse iterator to the end + 1 of the vector.

Returns
Reverse iterator to the end + 1 of the vector.

◆ rend() [2/2]

template<typename T >
const_reverse_iterator etl::ivector< T >::rend ( ) const
inline

Returns a const reverse iterator to the end + 1 of the vector.

Returns
Const reverse iterator to the end + 1 of the vector.

◆ reserve()

template<typename T >
void etl::ivector< T >::reserve ( size_t  n)
inline

For compatibility with the STL vector API. Does not increase the capacity, as this is fixed. Asserts an etl::vector_out_of_bounds error if the request is for more than the capacity.

◆ resize() [1/2]

template<typename T >
void etl::ivector< T >::resize ( size_t  new_size)
inline

Resizes the vector. If asserts or exceptions are enabled and the new size is larger than the maximum then a vector_full is thrown.

Parameters
new_sizeThe new size.

◆ resize() [2/2]

template<typename T >
void etl::ivector< T >::resize ( size_t  new_size,
const_reference  value 
)
inline

Resizes the vector. If asserts or exceptions are enabled and the new size is larger than the maximum then a vector_full is thrown.

Parameters
new_sizeThe new size.
valueThe value to fill new elements with. Default = default constructed value.

◆ size()

template<typename T >
size_type etl::ivector< T >::size ( ) const
inline

Gets the current size of the vector.

Returns
The current size of the vector.

◆ uninitialized_resize()

template<typename T >
void etl::ivector< T >::uninitialized_resize ( size_t  new_size)
inline

Resizes the vector, but does not initialise new entries.

Parameters
new_sizeThe new size.

Function Documentation

◆ operator!=() [1/3]

template<typename T >
bool etl::operator!= ( const etl::ivector< T * > &  lhs,
const etl::ivector< T * > &  rhs 
)

Not equal operator.

Parameters
lhsReference to the first vector.
rhsReference to the second vector.
Returns
true if the arrays are not equal, otherwise false

◆ operator!=() [2/3]

template<typename T >
bool etl::operator!= ( const etl::ivector< T > &  lhs,
const etl::ivector< T > &  rhs 
)

Not equal operator.

Parameters
lhsReference to the first vector.
rhsReference to the second vector.
Returns
true if the arrays are not equal, otherwise false

◆ operator!=() [3/3]

Not equal operator.

Parameters
lhsReference to the first vector.
rhsReference to the second vector.
Returns
true if the arrays are not equal, otherwise false

◆ operator<() [1/3]

template<typename T >
bool etl::operator< ( const etl::ivector< T * > &  lhs,
const etl::ivector< T * > &  rhs 
)

Less than operator.

Parameters
lhsReference to the first vector.
rhsReference to the second vector.
Returns
true if the first vector is lexicographically less than the second, otherwise false

◆ operator<() [2/3]

template<typename T >
bool etl::operator< ( const etl::ivector< T > &  lhs,
const etl::ivector< T > &  rhs 
)

Less than operator.

Parameters
lhsReference to the first vector.
rhsReference to the second vector.
Returns
true if the first vector is lexicographically less than the second, otherwise false

◆ operator<() [3/3]

Less than operator.

Parameters
lhsReference to the first vector.
rhsReference to the second vector.
Returns
true if the first vector is lexicographically less than the second, otherwise false

◆ operator<=() [1/3]

template<typename T >
bool etl::operator<= ( const etl::ivector< T * > &  lhs,
const etl::ivector< T * > &  rhs 
)

Less than or equal operator.

Parameters
lhsReference to the first vector.
rhsReference to the second vector.
Returns
true if the first vector is lexicographically less than or equal to the second, otherwise false

◆ operator<=() [2/3]

template<typename T >
bool etl::operator<= ( const etl::ivector< T > &  lhs,
const etl::ivector< T > &  rhs 
)

Less than or equal operator.

Parameters
lhsReference to the first vector.
rhsReference to the second vector.
Returns
true if the first vector is lexicographically less than or equal to the second, otherwise false

◆ operator<=() [3/3]

Less than or equal operator.

Parameters
lhsReference to the first vector.
rhsReference to the second vector.
Returns
true if the first vector is lexicographically less than or equal to the second, otherwise false

◆ operator==() [1/3]

template<typename T >
bool etl::operator== ( const etl::ivector< T * > &  lhs,
const etl::ivector< T * > &  rhs 
)

Equal operator.

Parameters
lhsReference to the first vector.
rhsReference to the second vector.
Returns
true if the arrays are equal, otherwise false

◆ operator==() [2/3]

template<typename T >
bool etl::operator== ( const etl::ivector< T > &  lhs,
const etl::ivector< T > &  rhs 
)

Equal operator.

Parameters
lhsReference to the first vector.
rhsReference to the second vector.
Returns
true if the arrays are equal, otherwise false

◆ operator==() [3/3]

Equal operator.

Parameters
lhsReference to the first vector.
rhsReference to the second vector.
Returns
true if the arrays are equal, otherwise false

◆ operator>() [1/3]

template<typename T >
bool etl::operator> ( const etl::ivector< T * > &  lhs,
const etl::ivector< T * > &  rhs 
)

Greater than operator.

Parameters
lhsReference to the first vector.
rhsReference to the second vector.
Returns
true if the first vector is lexicographically greater than the second, otherwise false

◆ operator>() [2/3]

template<typename T >
bool etl::operator> ( const etl::ivector< T > &  lhs,
const etl::ivector< T > &  rhs 
)

Greater than operator.

Parameters
lhsReference to the first vector.
rhsReference to the second vector.
Returns
true if the first vector is lexicographically greater than the second, otherwise false

◆ operator>() [3/3]

Greater than operator.

Parameters
lhsReference to the first vector.
rhsReference to the second vector.
Returns
true if the first vector is lexicographically greater than the second, otherwise false

◆ operator>=() [1/3]

template<typename T >
bool etl::operator>= ( const etl::ivector< T * > &  lhs,
const etl::ivector< T * > &  rhs 
)

Greater than or equal operator.

Parameters
lhsReference to the first vector.
rhsReference to the second vector.
Returns
true if the first vector is lexicographically greater than or equal to the second, otherwise false

◆ operator>=() [2/3]

template<typename T >
bool etl::operator>= ( const etl::ivector< T > &  lhs,
const etl::ivector< T > &  rhs 
)

Greater than or equal operator.

Parameters
lhsReference to the first vector.
rhsReference to the second vector.
Returns
true if the first vector is lexicographically greater than or equal to the second, otherwise false

◆ operator>=() [3/3]

Greater than or equal operator.

Parameters
lhsReference to the first vector.
rhsReference to the second vector.
Returns
true if the first vector is lexicographically greater than or equal to the second, otherwise false