The Open Master Hearing Aid (openMHA)  openMHA
Open community platform for hearing aid algorithm research
MHASignal::uint_vector_t Class Reference

Vector of unsigned values, used for size and index description of n-dimensional matrixes. More...

Inheritance diagram for MHASignal::uint_vector_t:
Inheritance graph

Public Member Functions

 uint_vector_t (unsigned int len)
 Constructor, initializes all elements to zero. More...
 
 uint_vector_t (const uint_vector_t &)
 
 uint_vector_t (const uint8_t *buf, unsigned int len)
 Construct from memory area. More...
 
 ~uint_vector_t ()
 
bool operator== (const uint_vector_t &) const
 Check for equality. More...
 
uint_vector_toperator= (const uint_vector_t &)
 Assign from other uint_vector_t. More...
 
unsigned int get_length () const
 Return the length of the vector. More...
 
const uint32_t & operator[] (unsigned int k) const
 Read-only access to elements. More...
 
uint32_t & operator[] (unsigned int k)
 Access to elements. More...
 
unsigned int numbytes () const
 Return number of bytes needed to store into memory. More...
 
unsigned int write (uint8_t *buf, unsigned int len) const
 Copy to memory area. More...
 
const uint32_t * getdata () const
 Return pointer to the data field. More...
 

Protected Attributes

uint32_t length
 
uint32_t * data
 

Detailed Description

Vector of unsigned values, used for size and index description of n-dimensional matrixes.

Constructor & Destructor Documentation

◆ uint_vector_t() [1/3]

MHASignal::uint_vector_t::uint_vector_t ( unsigned int  len)

Constructor, initializes all elements to zero.

Parameters
lenLength of vector.

◆ uint_vector_t() [2/3]

MHASignal::uint_vector_t::uint_vector_t ( const uint_vector_t src)

◆ uint_vector_t() [3/3]

MHASignal::uint_vector_t::uint_vector_t ( const uint8_t *  buf,
unsigned int  len 
)

Construct from memory area.

Warning
This constructor is not real time safe

◆ ~uint_vector_t()

MHASignal::uint_vector_t::~uint_vector_t ( )

Member Function Documentation

◆ operator==()

bool MHASignal::uint_vector_t::operator== ( const uint_vector_t src) const

Check for equality.

◆ operator=()

uint_vector_t & MHASignal::uint_vector_t::operator= ( const uint_vector_t src)

Assign from other uint_vector_t.

Warning
This assignment will fail if the lengths mismatch.

◆ get_length()

unsigned int MHASignal::uint_vector_t::get_length ( ) const
inline

Return the length of the vector.

◆ operator[]() [1/2]

const uint32_t& MHASignal::uint_vector_t::operator[] ( unsigned int  k) const
inline

Read-only access to elements.

◆ operator[]() [2/2]

uint32_t& MHASignal::uint_vector_t::operator[] ( unsigned int  k)
inline

Access to elements.

◆ numbytes()

unsigned int MHASignal::uint_vector_t::numbytes ( ) const

Return number of bytes needed to store into memory.

◆ write()

unsigned int MHASignal::uint_vector_t::write ( uint8_t *  buf,
unsigned int  len 
) const

Copy to memory area.

◆ getdata()

const uint32_t* MHASignal::uint_vector_t::getdata ( ) const
inline

Return pointer to the data field.

Member Data Documentation

◆ length

uint32_t MHASignal::uint_vector_t::length
protected

◆ data

uint32_t* MHASignal::uint_vector_t::data
protected

The documentation for this class was generated from the following files: