Embedded Template Library 1.0
|
Classes | |
class | etl::array_exception |
class | etl::array_out_of_range |
class | etl::array< T, SIZE_ > |
A replacement for std::array if you haven't got C++0x11.
A wrapper for arrays
class etl::array_exception |
The base class for array exceptions.
Public Member Functions | |
array_exception (string_type reason_, string_type file_name_, numeric_type line_number_) | |
![]() | |
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 | |
![]() | |
typedef const char * | string_type |
typedef int | numeric_type |
class etl::array_out_of_range |
The out of range exceptions.
Public Member Functions | |
array_out_of_range (string_type file_name_, numeric_type line_number_) | |
![]() | |
array_exception (string_type reason_, string_type file_name_, numeric_type line_number_) | |
![]() | |
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 | |
![]() | |
typedef const char * | string_type |
typedef int | numeric_type |
class etl::array |
A replacement for std::array if you haven't got C++0x11.
Public Types | |
typedef T | value_type |
typedef size_t | size_type |
typedef ptrdiff_t | difference_type |
typedef T & | reference |
typedef const T & | const_reference |
typedef T * | pointer |
typedef const T * | const_pointer |
typedef T * | iterator |
typedef const T * | const_iterator |
typedef ETL_OR_STD::reverse_iterator< iterator > | reverse_iterator |
typedef ETL_OR_STD::reverse_iterator< const_iterator > | const_reverse_iterator |
Public Member Functions | |
ETL_NODISCARD reference | at (size_t i) |
ETL_NODISCARD ETL_CONSTEXPR const_reference | at (size_t i) const |
ETL_NODISCARD reference | operator[] (size_t i) |
ETL_NODISCARD ETL_CONSTEXPR const_reference | operator[] (size_t i) const |
ETL_NODISCARD reference | front () |
Returns a reference to the first element. | |
ETL_NODISCARD ETL_CONSTEXPR const_reference | front () const |
Returns a const reference to the first element. | |
ETL_NODISCARD reference | back () |
Returns a reference to the last element. | |
ETL_NODISCARD ETL_CONSTEXPR const_reference | back () const |
Returns a const reference to the last element. | |
ETL_NODISCARD pointer | data () ETL_NOEXCEPT |
Returns a pointer to the first element of the internal buffer. | |
ETL_NODISCARD ETL_CONSTEXPR const_pointer | data () const ETL_NOEXCEPT |
Returns a const pointer to the first element of the internal buffer. | |
ETL_NODISCARD iterator | begin () ETL_NOEXCEPT |
Returns an iterator to the beginning of the array. | |
ETL_NODISCARD ETL_CONSTEXPR const_iterator | begin () const ETL_NOEXCEPT |
Returns a const iterator to the beginning of the array. | |
ETL_NODISCARD ETL_CONSTEXPR const_iterator | cbegin () const ETL_NOEXCEPT |
Returns a const iterator to the beginning of the array. | |
ETL_NODISCARD iterator | end () ETL_NOEXCEPT |
Returns an iterator to the end of the array. | |
ETL_NODISCARD ETL_CONSTEXPR const_iterator | end () const ETL_NOEXCEPT |
Returns a const iterator to the end of the array. | |
ETL_NODISCARD ETL_CONSTEXPR const_iterator | cend () const ETL_NOEXCEPT |
ETL_NODISCARD reverse_iterator | rbegin () ETL_NOEXCEPT |
ETL_NODISCARD ETL_CONSTEXPR const_reverse_iterator | rbegin () const ETL_NOEXCEPT |
Returns a const reverse iterator to the reverse beginning of the array. | |
ETL_NODISCARD ETL_CONSTEXPR const_reverse_iterator | crbegin () const ETL_NOEXCEPT |
Returns a const reverse iterator to the reverse beginning of the array. | |
ETL_NODISCARD reverse_iterator | rend () ETL_NOEXCEPT |
Returns a reverse iterator to the end of the array. | |
ETL_NODISCARD ETL_CONSTEXPR const_reverse_iterator | rend () const ETL_NOEXCEPT |
Returns a const reverse iterator to the end of the array. | |
ETL_NODISCARD ETL_CONSTEXPR const_reverse_iterator | crend () const ETL_NOEXCEPT |
Returns a const reverse iterator to the end of the array. | |
ETL_NODISCARD ETL_CONSTEXPR bool | empty () const ETL_NOEXCEPT |
Returns true if the array size is zero. | |
ETL_NODISCARD ETL_CONSTEXPR size_t | size () const ETL_NOEXCEPT |
Returns the size of the array. | |
ETL_NODISCARD ETL_CONSTEXPR size_t | max_size () const ETL_NOEXCEPT |
Returns the maximum possible size of the array. | |
ETL_CONSTEXPR14 void | fill (parameter_t value) |
ETL_CONSTEXPR14 void | swap (array &other) ETL_NOEXCEPT |
template<typename TIterator > | |
void | assign (TIterator first, const TIterator last) |
template<typename TIterator > | |
void | assign (TIterator first, const TIterator last, parameter_t value) |
iterator | insert_at (size_t position, parameter_t value) |
iterator | insert (const_iterator position, parameter_t value) |
template<typename TIterator > | |
iterator | insert_at (size_t position, TIterator first, const TIterator last) |
template<typename TIterator > | |
iterator | insert (const_iterator position, TIterator first, const TIterator last) |
iterator | erase_at (size_t position) |
iterator | erase (const_iterator position) |
iterator | erase_range (size_t first, size_t last) |
iterator | erase (const_iterator first, const_iterator last) |
iterator | erase_at (size_t position, parameter_t value) |
iterator | erase (const_iterator position, parameter_t value) |
iterator | erase_range (size_t first, size_t last, parameter_t value) |
iterator | erase (const_iterator first, const_iterator last, parameter_t value) |
Public Attributes | |
T | _buffer [SIZE] |
The array data. | |
Static Public Attributes | |
static ETL_CONSTANT size_t | SIZE = SIZE_ |
|
inline |
Fills the array from the range. If the range is smaller than the array then the unused array elements are left unmodified.
first | The iterator to the first item in the range. |
last | The iterator to one past the final item in the range. |
|
inline |
Fills the array from the range. If the range is smaller than the array then the unused array elements are initialised with the supplied value.
first | The iterator to the first item in the range. |
last | The iterator to one past the final item in the range. |
|
inline |
Returns a reference to the value at index 'i'.
i | The index of the element to access. |
|
inline |
Returns a const reference to the value at index 'i'.
i | The index of the element to access. |
|
inline |
Erases a range of values from the array. After erase, the last values in the array will be unmodified.
first | The first item to erase. |
last | The one past the last item to erase. |
|
inline |
Erases a range of values from the array.
position | The iterator to the position to erase at. |
value | The value to use to overwrite the last elements in the array. |
|
inline |
Erases a value from the array. After erase, the last value in the array will be unmodified.
position | The iterator to the position to erase at. |
|
inline |
Erases a value from the array.
position | The iterator to the position to erase at. |
value | The value to use to overwrite the last element in the array. |
|
inline |
Erases a value from the array. After erase, the last value in the array will be unmodified.
position | The index of the position to erase at. |
|
inline |
Erases a value from the array.
position | The index of the position to erase at. |
value | The value to use to overwrite the last element in the array. |
|
inline |
Erases a range of values from the array. After erase, the last values in the array will be unmodified.
first | The first item to erase. |
last | The one past the last item to erase. |
|
inline |
Erases a range of values from the array.
first | The first item to erase. |
last | The one past the last item to erase. |
value | The value to use to overwrite the last elements in the array. |
|
inline |
Fills the array with the specified value.
value | The value to fill the array with. |
|
inline |
Inserts a value into the array.
position | The iterator to the position to insert at. |
value | The value to insert. |
|
inline |
Insert into the array from the range.
position | The position to insert at. |
first | The iterator to the first item in the range. |
last | The iterator to one past the final item in the range. |
|
inline |
Inserts a value into the array.
position | The index of the position to insert at. |
value | The value to insert. |
|
inline |
Insert into the array from the range.
position | The position to insert at. |
first | The iterator to the first item in the range. |
last | The iterator to one past the final item in the range. |
|
inline |
[] operator. Returns a reference to the value at index 'i'.
i | The index of the element to access. |
|
inline |
[] operator. Returns a const reference to the value at index 'i'.
i | The index of the element to access. |
|
inline |
Swaps the contents of this array and another.
other | A reference to the other array. |