![]() |
The Open Master Hearing Aid (openMHA)
openMHA
Open community platform for hearing aid algorithm research
|
String converter namespace. More...
Functions | |
| int | num_brackets (const std::string &s) |
| count number of brackets More... | |
| int | bracket_balance (const std::string &s) |
| void | str2val (const std::string &, bool &) |
| Convert from string. More... | |
| void | str2val (const std::string &, float &) |
| Convert from string. More... | |
| void | str2val (const std::string &, mha_complex_t &) |
| Convert from string. More... | |
| void | str2val (const std::string &, int &) |
| Convert from string. More... | |
| void | str2val (const std::string &, keyword_list_t &) |
| Convert from string. More... | |
| void | str2val (const std::string &, std::string &) |
| Convert from string. More... | |
| template<class arg_t > | |
| void | str2val (const std::string &s, std::vector< arg_t > &val) |
| Converter for vector types. More... | |
| template<> | |
| void | str2val< mha_real_t > (const std::string &s, std::vector< mha_real_t > &v) |
| Converter for vector<mha_real_t> with Matlab-style expansion. More... | |
| template<class arg_t > | |
| void | str2val (const std::string &s, std::vector< std::vector< arg_t > > &val) |
| Converter for matrix types. More... | |
| std::string | val2str (const bool &) |
| Convert to string. More... | |
| std::string | val2str (const float &) |
| Convert to string. More... | |
| std::string | val2str (const mha_complex_t &) |
| Convert to string. More... | |
| std::string | val2str (const int &) |
| Convert to string. More... | |
| std::string | val2str (const keyword_list_t &) |
| Convert to string. More... | |
| std::string | val2str (const std::string &) |
| Convert to string. More... | |
| std::string | val2str (const std::vector< float > &) |
| Convert to string. More... | |
| std::string | val2str (const std::vector< mha_complex_t > &) |
| Convert to string. More... | |
| std::string | val2str (const std::vector< int > &) |
| Convert to string. More... | |
| std::string | val2str (const std::vector< std::vector< int > > &) |
| Convert to string. More... | |
| std::string | val2str (const std::vector< std::string > &) |
| Convert to string. More... | |
| std::string | val2str (const std::vector< std::vector< float > > &) |
| Convert to string. More... | |
| std::string | val2str (const std::vector< std::vector< mha_complex_t > > &) |
| Convert to string. More... | |
String converter namespace.
The functions defined in this namespace manage the conversions from C++ variables to strings and back. It was tried to keep a matlab compatible string format for vectors and vectors of vectors.
| int MHAParser::StrCnv::num_brackets | ( | const std::string & | s | ) |
count number of brackets
Return number of brackets according to layer depth (vector:2, matrix:4, etc)
| s | String |
| int MHAParser::StrCnv::bracket_balance | ( | const std::string & | s | ) |
| void MHAParser::StrCnv::str2val | ( | const std::string & | s, |
| bool & | v | ||
| ) |
Convert from string.
| void MHAParser::StrCnv::str2val | ( | const std::string & | s, |
| float & | v | ||
| ) |
Convert from string.
| void MHAParser::StrCnv::str2val | ( | const std::string & | s, |
| mha_complex_t & | v | ||
| ) |
Convert from string.
| void MHAParser::StrCnv::str2val | ( | const std::string & | s, |
| int & | v | ||
| ) |
Convert from string.
| void MHAParser::StrCnv::str2val | ( | const std::string & | s, |
| MHAParser::keyword_list_t & | v | ||
| ) |
Convert from string.
| void MHAParser::StrCnv::str2val | ( | const std::string & | s, |
| std::string & | v | ||
| ) |
Convert from string.
| void MHAParser::StrCnv::str2val | ( | const std::string & | s, |
| std::vector< arg_t > & | val | ||
| ) |
Converter for vector types.
| void MHAParser::StrCnv::str2val< mha_real_t > | ( | const std::string & | s, |
| std::vector< mha_real_t > & | v | ||
| ) |
Converter for vector<mha_real_t> with Matlab-style expansion.
| void MHAParser::StrCnv::str2val | ( | const std::string & | s, |
| std::vector< std::vector< arg_t > > & | val | ||
| ) |
Converter for matrix types.
| std::string MHAParser::StrCnv::val2str | ( | const bool & | v | ) |
Convert to string.
| std::string MHAParser::StrCnv::val2str | ( | const float & | v | ) |
Convert to string.
| std::string MHAParser::StrCnv::val2str | ( | const mha_complex_t & | v | ) |
Convert to string.
| std::string MHAParser::StrCnv::val2str | ( | const int & | v | ) |
Convert to string.
| std::string MHAParser::StrCnv::val2str | ( | const keyword_list_t & | v | ) |
Convert to string.
| std::string MHAParser::StrCnv::val2str | ( | const std::string & | v | ) |
Convert to string.
| std::string MHAParser::StrCnv::val2str | ( | const std::vector< float > & | v | ) |
Convert to string.
| std::string MHAParser::StrCnv::val2str | ( | const std::vector< mha_complex_t > & | v | ) |
Convert to string.
| std::string MHAParser::StrCnv::val2str | ( | const std::vector< int > & | v | ) |
Convert to string.
| std::string MHAParser::StrCnv::val2str | ( | const std::vector< std::vector< int > > & | v | ) |
Convert to string.
| std::string MHAParser::StrCnv::val2str | ( | const std::vector< std::string > & | v | ) |
Convert to string.
| std::string MHAParser::StrCnv::val2str | ( | const std::vector< std::vector< float > > & | v | ) |
Convert to string.
| std::string MHAParser::StrCnv::val2str | ( | const std::vector< std::vector< mha_complex_t > > & | v | ) |
Convert to string.