|
Sound Byte Libs 1ee2ca6
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
Fixed-size array container. More...
#include <fixed_array.hpp>
Public Types | |
| using | value_type = T |
| using | size_type = size_t |
| using | reference = T & |
| using | const_reference = const T & |
| using | pointer = T * |
| using | const_pointer = const T * |
| using | iterator = T * |
| using | const_iterator = const T * |
Public Member Functions | |
| Array ()=default | |
| Default constructor. | |
| Array (const T &value) | |
| Fill constructor. | |
| reference | operator[] (size_type index) |
| Access element at index. | |
| const_reference | operator[] (size_type index) const |
| Access element at index (const) | |
| reference | at (size_type index) |
| Access element with bounds checking. | |
| const_reference | at (size_type index) const |
| Access element with bounds checking (const) | |
| reference | front () |
| Access first element. | |
| const_reference | front () const |
| Access first element (const) | |
| reference | back () |
| Access last element. | |
| const_reference | back () const |
| Access last element (const) | |
| pointer | data () |
| Get pointer to underlying array. | |
| const_pointer | data () const |
| Get pointer to underlying array (const) | |
| iterator | begin () |
| Get iterator to beginning. | |
| const_iterator | begin () const |
| Get iterator to beginning (const) | |
| iterator | end () |
| Get iterator to end. | |
| const_iterator | end () const |
| Get iterator to end (const) | |
| constexpr bool | empty () const |
| Check if array is empty. | |
| constexpr size_type | size () const |
| Get array size. | |
| constexpr size_type | max_size () const |
| Get maximum size. | |
| void | fill (const T &value) |
| Fill array with value. | |
| void | swap (Array &other) |
| Swap contents with another array. | |
Fixed-size array container.
Lightweight array wrapper providing bounds-safe access and iteration support. All storage is allocated at compile time.
| T | Element type |
| N | Array size (must be greater than 0) |
Definition at line 31 of file fixed_array.hpp.
| using sbl::core::primitives::containers::Array< T, N >::const_iterator = const T* |
Definition at line 42 of file fixed_array.hpp.
| using sbl::core::primitives::containers::Array< T, N >::const_pointer = const T* |
Definition at line 40 of file fixed_array.hpp.
| using sbl::core::primitives::containers::Array< T, N >::const_reference = const T& |
Definition at line 38 of file fixed_array.hpp.
| using sbl::core::primitives::containers::Array< T, N >::iterator = T* |
Definition at line 41 of file fixed_array.hpp.
| using sbl::core::primitives::containers::Array< T, N >::pointer = T* |
Definition at line 39 of file fixed_array.hpp.
| using sbl::core::primitives::containers::Array< T, N >::reference = T& |
Definition at line 37 of file fixed_array.hpp.
| using sbl::core::primitives::containers::Array< T, N >::size_type = size_t |
Definition at line 36 of file fixed_array.hpp.
| using sbl::core::primitives::containers::Array< T, N >::value_type = T |
Definition at line 35 of file fixed_array.hpp.
|
default |
Default constructor.
Elements are default-initialized.
|
inlineexplicit |
Fill constructor.
| value | Value to fill array with |
Definition at line 56 of file fixed_array.hpp.
References sbl::core::primitives::containers::Array< T, N >::fill().
|
inline |
Access element with bounds checking.
| index | Element index |
Definition at line 90 of file fixed_array.hpp.
|
inline |
Access element with bounds checking (const)
| index | Element index |
Definition at line 100 of file fixed_array.hpp.
|
inline |
Access last element.
Definition at line 127 of file fixed_array.hpp.
|
inline |
Access last element (const)
Definition at line 136 of file fixed_array.hpp.
|
inline |
Get iterator to beginning.
Definition at line 163 of file fixed_array.hpp.
|
inline |
Get iterator to beginning (const)
Definition at line 172 of file fixed_array.hpp.
|
inline |
Get pointer to underlying array.
Definition at line 145 of file fixed_array.hpp.
|
inline |
Get pointer to underlying array (const)
Definition at line 154 of file fixed_array.hpp.
|
inlineconstexpr |
Check if array is empty.
Definition at line 199 of file fixed_array.hpp.
|
inline |
Get iterator to end.
Definition at line 181 of file fixed_array.hpp.
|
inline |
Get iterator to end (const)
Definition at line 190 of file fixed_array.hpp.
|
inline |
Fill array with value.
| value | Value to fill with |
Definition at line 226 of file fixed_array.hpp.
Referenced by sbl::core::primitives::containers::Array< T, N >::Array().
|
inline |
Access first element.
Definition at line 109 of file fixed_array.hpp.
|
inline |
Access first element (const)
Definition at line 118 of file fixed_array.hpp.
|
inlineconstexpr |
Get maximum size.
Definition at line 217 of file fixed_array.hpp.
|
inline |
Access element at index.
| index | Element index |
Definition at line 68 of file fixed_array.hpp.
|
inline |
Access element at index (const)
| index | Element index |
Definition at line 78 of file fixed_array.hpp.
|
inlineconstexpr |
|
inline |
Swap contents with another array.
| other | Array to swap with |
Definition at line 237 of file fixed_array.hpp.