The Open Master Hearing Aid (openMHA)  openMHA
Open community platform for hearing aid algorithm research
PluginLoader::mhapluginloader_t Class Reference
Inheritance diagram for PluginLoader::mhapluginloader_t:
Inheritance graph

Public Member Functions

std::string parse (const std::string &str) override
 
 mhapluginloader_t (MHA_AC::algo_comm_t &iac, const std::string &libname, bool check_version=true)
 Loads and initializes mha plugin and establishes interface. More...
 
 ~mhapluginloader_t () throw ()
 
bool has_process (mha_domain_t in, mha_domain_t out) const
 
bool has_parser () const
 
mha_domain_t input_domain () const
 
mha_domain_t output_domain () const
 
void prepare (mhaconfig_t &) override
 
void release () override
 
void process (mha_wave_t *, mha_wave_t **) override
 
void process (mha_spec_t *, mha_spec_t **) override
 
void process (mha_wave_t *, mha_spec_t **) override
 
void process (mha_spec_t *, mha_wave_t **) override
 
std::string getfullname () const
 
std::string get_documentation () const
 
std::vector< std::string > get_categories () const
 
bool is_prepared () const
 
- Public Member Functions inherited from PluginLoader::config_file_splitter_t
 config_file_splitter_t (const std::string &name)
 
const std::string & get_configname () const
 
const std::string & get_libname () const
 
const std::string & get_origname () const
 
const std::string & get_configfile () const
 
- Public Member Functions inherited from MHAParser::c_ifc_parser_t
 c_ifc_parser_t (const std::string &modulename_)
 
 ~c_ifc_parser_t ()
 
void set_parse_cb (c_parse_cmd_t, c_parse_err_t, void *)
 
- Public Member Functions inherited from MHAParser::base_t
 base_t (const std::string &)
 Constructor for base class of all parser nodes. More...
 
 base_t (const base_t &)
 Copy constructor for base_t. More...
 
base_toperator= (const base_t &)=default
 
 base_t (base_t &&)=delete
 
base_toperator= (base_t &&)=delete
 
virtual ~base_t ()
 
virtual void parse (const char *, char *, unsigned int)
 This function parses a command and writes the parsing result into a C character array. More...
 
virtual void parse (const std::vector< std::string > &, std::vector< std::string > &)
 
virtual std::string query_dump (const std::string &)
 
virtual std::string query_entries (const std::string &)
 
virtual std::string query_perm (const std::string &)
 
virtual std::string query_range (const std::string &)
 
virtual std::string query_type (const std::string &)
 
virtual std::string query_val (const std::string &)
 
virtual std::string query_readfile (const std::string &)
 
virtual std::string query_savefile (const std::string &)
 
virtual std::string query_savefile_compact (const std::string &)
 
virtual std::string query_savemons (const std::string &)
 
virtual std::string query_listids (const std::string &)
 
std::string query_version (const std::string &)
 
std::string query_id (const std::string &)
 
std::string query_subst (const std::string &)
 
std::string query_addsubst (const std::string &)
 
std::string query_help (const std::string &)
 
std::string query_cmds (const std::string &)
 
void set_node_id (const std::string &)
 Set the identification string of this parser node. More...
 
void set_help (const std::string &)
 Set the help comment of a variable or parser. More...
 
void add_parent_on_insert (parser_t *, std::string)
 
void rm_parent_on_remove (parser_t *)
 
const std::string & fullname () const
 Return the full dot-separated path name of this parser node in the openMHA configuration tree. More...
 
- Public Member Functions inherited from PluginLoader::fourway_processor_t
virtual ~fourway_processor_t ()
 Classes with virtual methods need virtual destructor. More...
 

Protected Member Functions

void test_error ()
 
void test_version ()
 
void mha_test_struct_size (unsigned int s)
 
void resolve_and_init ()
 
- Protected Member Functions inherited from MHAParser::c_ifc_parser_t
std::string op_subparse (MHAParser::expression_t &)
 
std::string op_setval (MHAParser::expression_t &)
 
std::string op_query (MHAParser::expression_t &)
 
- Protected Member Functions inherited from MHAParser::base_t
void activate_query (const std::string &, query_t)
 
void notify ()
 

Protected Attributes

int lib_err
 
MHA_AC::algo_comm_tac
 
pluginlib_t lib_handle
 
void * lib_data
 
MHAGetVersion_t MHAGetVersion_cb
 
MHAInit_t MHAInit_cb
 
MHADestroy_t MHADestroy_cb
 
MHAPrepare_t MHAPrepare_cb
 
MHARelease_t MHARelease_cb
 
MHAProc_wave2wave_t MHAProc_wave2wave_cb
 
MHAProc_spec2spec_t MHAProc_spec2spec_cb
 
MHAProc_wave2spec_t MHAProc_wave2spec_cb
 
MHAProc_spec2wave_t MHAProc_spec2wave_cb
 
MHASet_t MHASet_cb
 
MHASetcpp_t MHASetcpp_cb
 
MHAStrError_t MHAStrError_cb
 
mhaconfig_t cf_input
 
mhaconfig_t cf_output
 
std::string plugin_documentation
 
std::vector< std::string > plugin_categories
 
bool b_check_version
 
bool b_is_prepared
 
- Protected Attributes inherited from MHAParser::base_t
query_map_t queries
 
bool data_is_initialized
 

Additional Inherited Members

- Public Attributes inherited from MHAParser::base_t
MHAEvents::emitter_t writeaccess
 Event emitted on write access. More...
 
MHAEvents::emitter_t valuechanged
 Event emitted if the value has changed. More...
 
MHAEvents::emitter_t readaccess
 Event emitted on read access. More...
 
MHAEvents::emitter_t prereadaccess
 Event emitted on read access, before the data field is accessed. More...
 

Constructor & Destructor Documentation

◆ mhapluginloader_t()

PluginLoader::mhapluginloader_t::mhapluginloader_t ( MHA_AC::algo_comm_t iac,
const std::string &  libname,
bool  check_version = true 
)

Loads and initializes mha plugin and establishes interface.

Parameters
iacAC space (algorithm communication variables)
libnameEither file name of MHA plugin without platform-specific extension (i.e. "identity" for "identity.so" or "identity.dll") to be found on the MHA_LIBRARY_PATH (which is an environment variable). Or the same file name without extension followed by a colon ":" followed by the "configuration name" of the MHA plugin, which may be used to differentiate between multiple identical MHA plugins or to give the plugin a self-documenting name that fits its purpose. The library name - configuration name expression can be followed by a "<" followed by a configuration file name, which will be read after initialization of the plugin.

Example: "overlapadd:agc<compression.cfg" will load the plugin "overlapadd.so" or "overlapadd.dll", insert it as the configuration node "agc", and reads the configuration file "compression.cfg" into that node.

Parameters
check_versionPluginloader will not check that the plugin was built using a known compatible MHA version if this flag is set to false. Disabling version check is discouraged.

◆ ~mhapluginloader_t()

PluginLoader::mhapluginloader_t::~mhapluginloader_t ( )
throw (
)

Member Function Documentation

◆ parse()

std::string PluginLoader::mhapluginloader_t::parse ( const std::string &  str)
overridevirtual

Implements PluginLoader::fourway_processor_t.

Reimplemented in plug_wrapper.

◆ has_process()

bool PluginLoader::mhapluginloader_t::has_process ( mha_domain_t  in,
mha_domain_t  out 
) const

◆ has_parser()

bool PluginLoader::mhapluginloader_t::has_parser ( ) const

◆ input_domain()

mha_domain_t PluginLoader::mhapluginloader_t::input_domain ( ) const

◆ output_domain()

mha_domain_t PluginLoader::mhapluginloader_t::output_domain ( ) const

◆ prepare()

void PluginLoader::mhapluginloader_t::prepare ( mhaconfig_t tf)
overridevirtual

Implements PluginLoader::fourway_processor_t.

Reimplemented in plug_t, and mhaplug_cfg_t.

◆ release()

void PluginLoader::mhapluginloader_t::release ( )
overridevirtual

Implements PluginLoader::fourway_processor_t.

Reimplemented in plug_t, and mhaplug_cfg_t.

◆ process() [1/4]

void PluginLoader::mhapluginloader_t::process ( mha_wave_t s_in,
mha_wave_t **  s_out 
)
overridevirtual

◆ process() [2/4]

void PluginLoader::mhapluginloader_t::process ( mha_spec_t s_in,
mha_spec_t **  s_out 
)
overridevirtual

◆ process() [3/4]

void PluginLoader::mhapluginloader_t::process ( mha_wave_t s_in,
mha_spec_t **  s_out 
)
overridevirtual

◆ process() [4/4]

void PluginLoader::mhapluginloader_t::process ( mha_spec_t s_in,
mha_wave_t **  s_out 
)
overridevirtual

◆ getfullname()

std::string PluginLoader::mhapluginloader_t::getfullname ( ) const
inline

◆ get_documentation()

std::string PluginLoader::mhapluginloader_t::get_documentation ( ) const
inline

◆ get_categories()

std::vector<std::string> PluginLoader::mhapluginloader_t::get_categories ( ) const
inline

◆ is_prepared()

bool PluginLoader::mhapluginloader_t::is_prepared ( ) const
inline

◆ test_error()

void PluginLoader::mhapluginloader_t::test_error ( )
protected

◆ test_version()

void PluginLoader::mhapluginloader_t::test_version ( )
protected

◆ mha_test_struct_size()

void PluginLoader::mhapluginloader_t::mha_test_struct_size ( unsigned int  s)
protected

◆ resolve_and_init()

void PluginLoader::mhapluginloader_t::resolve_and_init ( )
protected

Member Data Documentation

◆ lib_err

int PluginLoader::mhapluginloader_t::lib_err
protected

◆ ac

MHA_AC::algo_comm_t& PluginLoader::mhapluginloader_t::ac
protected

◆ lib_handle

pluginlib_t PluginLoader::mhapluginloader_t::lib_handle
protected

◆ lib_data

void* PluginLoader::mhapluginloader_t::lib_data
protected

◆ MHAGetVersion_cb

MHAGetVersion_t PluginLoader::mhapluginloader_t::MHAGetVersion_cb
protected

◆ MHAInit_cb

MHAInit_t PluginLoader::mhapluginloader_t::MHAInit_cb
protected

◆ MHADestroy_cb

MHADestroy_t PluginLoader::mhapluginloader_t::MHADestroy_cb
protected

◆ MHAPrepare_cb

MHAPrepare_t PluginLoader::mhapluginloader_t::MHAPrepare_cb
protected

◆ MHARelease_cb

MHARelease_t PluginLoader::mhapluginloader_t::MHARelease_cb
protected

◆ MHAProc_wave2wave_cb

MHAProc_wave2wave_t PluginLoader::mhapluginloader_t::MHAProc_wave2wave_cb
protected

◆ MHAProc_spec2spec_cb

MHAProc_spec2spec_t PluginLoader::mhapluginloader_t::MHAProc_spec2spec_cb
protected

◆ MHAProc_wave2spec_cb

MHAProc_wave2spec_t PluginLoader::mhapluginloader_t::MHAProc_wave2spec_cb
protected

◆ MHAProc_spec2wave_cb

MHAProc_spec2wave_t PluginLoader::mhapluginloader_t::MHAProc_spec2wave_cb
protected

◆ MHASet_cb

MHASet_t PluginLoader::mhapluginloader_t::MHASet_cb
protected

◆ MHASetcpp_cb

MHASetcpp_t PluginLoader::mhapluginloader_t::MHASetcpp_cb
protected

◆ MHAStrError_cb

MHAStrError_t PluginLoader::mhapluginloader_t::MHAStrError_cb
protected

◆ cf_input

mhaconfig_t PluginLoader::mhapluginloader_t::cf_input
protected

◆ cf_output

mhaconfig_t PluginLoader::mhapluginloader_t::cf_output
protected

◆ plugin_documentation

std::string PluginLoader::mhapluginloader_t::plugin_documentation
protected

◆ plugin_categories

std::vector<std::string> PluginLoader::mhapluginloader_t::plugin_categories
protected

◆ b_check_version

bool PluginLoader::mhapluginloader_t::b_check_version
protected

◆ b_is_prepared

bool PluginLoader::mhapluginloader_t::b_is_prepared
protected

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