Sound Open Firmware
Loading...
Searching...
No Matches
intel_adsp::FixedArray< VALUE > Struct Template Reference

#include <fixed_array.h>

Inheritance diagram for intel_adsp::FixedArray< VALUE >:

Public Types

typedef VALUE ValueType

Public Member Functions

 FixedArray (ValueType *array, size_t length)
 Initializes a new instance of FixedArray.
ValueType GetValue (int index=0) const
 Gets value at the given index of the array.
ValueType operator[] (int index) const
 Subscript operator.
size_t GetLength (void) const
 Gets the number of elements.
void Copy (ValueType *array, size_t length) const
 Copies the values wrapped by the FixedArray into the given C-array.

Member Typedef Documentation

◆ ValueType

template<class VALUE>
typedef VALUE intel_adsp::FixedArray< VALUE >::ValueType

Constructor & Destructor Documentation

◆ FixedArray()

template<class VALUE>
intel_adsp::FixedArray< VALUE >::FixedArray ( ValueType * array,
size_t length )
inlineexplicit

Initializes a new instance of FixedArray.

Member Function Documentation

◆ Copy()

template<class VALUE>
void intel_adsp::FixedArray< VALUE >::Copy ( ValueType * array,
size_t length ) const
inline

Copies the values wrapped by the FixedArray into the given C-array.

◆ GetLength()

template<class VALUE>
size_t intel_adsp::FixedArray< VALUE >::GetLength ( void ) const
inline

Gets the number of elements.

◆ GetValue()

template<class VALUE>
ValueType intel_adsp::FixedArray< VALUE >::GetValue ( int index = 0) const
inline

Gets value at the given index of the array.

Parameters
indexindex of the value to retrieve. By default index is set to 0.
Note
If index is out of range (i.e. is equal or greater than value returned by GetLength()) the returned value is mal-formed.
Remarks
Return is by value rather than reference to prevent client code from working with dangling reference. Indeed a FixedArray object does not own the underlying associated buffer.

◆ operator[]()

template<class VALUE>
ValueType intel_adsp::FixedArray< VALUE >::operator[] ( int index) const
inline

Subscript operator.

This method actually returns the result of GetValue()


The documentation for this struct was generated from the following file:
  • /home/lrg/work/sof-dox-work/src/include/sof/audio/module_adapter/iadk/fixed_array.h