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

Class to access the information stored in the plugin source code's MHAPLUGIN_DOCUMENTATION macro. More...

Public Member Functions

 latex_doc_t (const std::string &plugname, const std::string &plugin_macro)
 Constructor loads the plugin into this process. More...
 
std::string get_latex_doc ()
 This method accesses the compiled-in contents of the MHAPLUGIN_DOCUMENTATION macro and the exported interface functions of the loaded plugin to produce latex docuementation for the plugin. More...
 
std::string get_main_category () const
 
std::vector< std::string > get_categories () const
 

Private Member Functions

std::string strdom (mha_domain_t d) const
 
std::string get_ac (MHA_AC::algo_comm_t &ac, std::string txt) const
 
std::string parsername (std::string s) const
 
std::string get_parser_var (MHAParser::base_t *p, std::string name) const
 
std::string get_parser_tab (MHAParser::base_t *p, const std::string &prefix, const std::string &latex_macro) const
 

Private Attributes

const std::string plugname
 
const std::string latex_plugname
 
MHA_AC::algo_comm_class_t ac
 
std::unique_ptr< plug_wrapperIloader
 
const std::string plugin_macro
 

Detailed Description

Class to access the information stored in the plugin source code's MHAPLUGIN_DOCUMENTATION macro.

Constructor & Destructor Documentation

◆ latex_doc_t()

latex_doc_t::latex_doc_t ( const std::string &  plugname,
const std::string &  plugin_macro 
)

Constructor loads the plugin into this process.

Parameters
plugnameName of the MHA plugin to process
plugin_macroname of the LaTeX section macro that documents a single plugin (e.g. "section", "subsection", "subsubsection", ...)

Member Function Documentation

◆ get_latex_doc()

std::string latex_doc_t::get_latex_doc ( )

This method accesses the compiled-in contents of the MHAPLUGIN_DOCUMENTATION macro and the exported interface functions of the loaded plugin to produce latex docuementation for the plugin.

It tentatively prepares the plugin for processing and checks the AC variables registered by the plugin.

Returns
the complete latex documentation for this plugin

◆ get_main_category()

std::string latex_doc_t::get_main_category ( ) const
Returns
the first word of the categories string in the MHAPLUGIN_DOCUMENTATION macro

◆ get_categories()

std::vector< std::string > latex_doc_t::get_categories ( ) const
Returns
a vector of all words in the categories string in the MHAPLUGIN_DOCUMENTATION macro

◆ strdom()

std::string latex_doc_t::strdom ( mha_domain_t  d) const
private

◆ get_ac()

std::string latex_doc_t::get_ac ( MHA_AC::algo_comm_t ac,
std::string  txt 
) const
private

◆ parsername()

std::string latex_doc_t::parsername ( std::string  s) const
private

◆ get_parser_var()

std::string latex_doc_t::get_parser_var ( MHAParser::base_t p,
std::string  name 
) const
private

◆ get_parser_tab()

std::string latex_doc_t::get_parser_tab ( MHAParser::base_t p,
const std::string &  prefix,
const std::string &  latex_macro 
) const
private

Member Data Documentation

◆ plugname

const std::string latex_doc_t::plugname
private

◆ latex_plugname

const std::string latex_doc_t::latex_plugname
private

◆ ac

MHA_AC::algo_comm_class_t latex_doc_t::ac
private

◆ loader

std::unique_ptr<plug_wrapperI> latex_doc_t::loader
private

◆ plugin_macro

const std::string latex_doc_t::plugin_macro
private

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