The Open Master Hearing Aid (openMHA)  openMHA
Open community platform for hearing aid algorithm research
mha_os.cpp File Reference

Functions

bool mha_hasenv (const std::string &envvar)
 Checks if environment variable exists. More...
 
std::string mha_getenv (const std::string &envvar)
 Get value of environment variable. More...
 
void mha_delenv (const std::string &envvar)
 Deletes environment variable from process environment if it exists. More...
 
int mha_setenv (const std::string &envvar, const std::string &value)
 Set value of environment variable. More...
 
std::list< std::string > mha_library_paths ()
 
std::list< std::string > list_dir (const std::string &path, const std::string &pattern)
 

Function Documentation

◆ mha_hasenv()

bool mha_hasenv ( const std::string &  envvar)

Checks if environment variable exists.

Parameters
envvarName of environment variable to check
Returns
true if the environment has a variable of this name

◆ mha_getenv()

std::string mha_getenv ( const std::string &  envvar)

Get value of environment variable.

Parameters
envvarName of environment variable to retrieve
Returns
content of environment variable if it exists, empty string if the environment variable does not exist

◆ mha_delenv()

void mha_delenv ( const std::string &  envvar)

Deletes environment variable from process environment if it exists.

Parameters
envvarName of environment variable to delete

◆ mha_setenv()

int mha_setenv ( const std::string &  envvar,
const std::string &  value 
)

Set value of environment variable.

Parameters
envvarName of environment variable to set
valueNew content for environment variable
Returns
error code: 0 on success, OS dependent error code on failure

◆ mha_library_paths()

std::list<std::string> mha_library_paths ( )

◆ list_dir()

std::list<std::string> list_dir ( const std::string &  path,
const std::string &  pattern 
)