The Open Master Hearing Aid (openMHA)
openMHA
Open community platform for hearing aid algorithm research
|
Public Member Functions | |
scalar_t (algo_comm_t &ac, const std::string &name, numeric_t val=0, bool insert_now=true) | |
Initialize memory and metadata of the AC variable. More... | |
~scalar_t () | |
Destroy the AC variable: deallocate its memory. More... | |
void | insert () |
Insert or re-insert AC variable into AC space. More... | |
void | remove () |
Remove the AC variable by reference from the AC variable space. More... | |
Public Attributes | |
numeric_t | data |
Numeric value of this AC variable. More... | |
Private Attributes | |
algo_comm_t & | ac |
AC variable space. More... | |
const std::string | name |
Name of this AC variable in the AC variable space. More... | |
const bool | remove_during_destructor |
flag whether to remove from AC variable space in destructor. More... | |
Template for convenience classes for inserting a numeric scalar into the AC space.
|
inline |
Initialize memory and metadata of the AC variable.
ac | AC handle |
name | Name of variable in AC space |
val | Initial value |
insert_now | If true, then the constructor inserts the new variable into the AC space, and the destructor will remove the variable from AC space when it executes. |
|
inline |
Destroy the AC variable: deallocate its memory.
If the constructor parameter insert_now was true, then the destruc- tor removes the AC variable from AC space when it executes.
|
inline |
Insert or re-insert AC variable into AC space.
Plugins should call this method from their prepare() and process() functions.
|
inline |
Remove the AC variable by reference from the AC variable space.
Plugins may call this method only from their prepare(), release() methods or their plugin destructor. It is not necessary to remove the AC variable from AC space at all if either another AC variable with the same name has replaced this variable before this variable is destroyed, or if no plugin will access this variable between its destruction and either its replacement or the MHA exit.
numeric_t MHA_AC::scalar_t< numeric_t, MHA_AC_TYPECODE >::data |
Numeric value of this AC variable.
|
private |
AC variable space.
|
private |
Name of this AC variable in the AC variable space.
|
private |
flag whether to remove from AC variable space in destructor.