#include <itpp/base/parser.h>
Public Member Functions | |
Parser () | |
Default Constructor. | |
Parser (const std::string &filename) | |
Constructor. Sets input file name. | |
Parser (int argc, char *argv[]) | |
Constructor. Uses argc and argv (command line arguments). | |
Parser (const std::string &filename, int argc, char *argv[]) | |
Constructor. Sets input file name and uses argc and argv (command line arguments). | |
Parser (const Array< std::string > &setup) | |
Constructor. Sets and Array of strings. | |
void | init (const std::string &filename) |
Initialization function. Sets input file name. | |
void | init (int argc, char *argv[]) |
Initialization function. Uses argc and argv (command line arguments). | |
void | init (const std::string &filename, int argc, char *argv[]) |
Initialization function. Sets input file name and uses argc and argv (command line arguments). | |
void | init (const Array< std::string > &setup) |
Initialization function. Sets and Array of strings. | |
void | set_silentmode (bool v=true) |
Sets silent mode if true, or verbose mode if false. | |
bool | exist (const std::string &name) |
Check is name exists in the file. Returns true if the name is found and false otherwise. | |
template<class T> | |
bool | get (T &var, const std::string &name, int num=-1) |
Get variable value if name can be found (and return true), otherwise keep old value (and return false). | |
bool | get_bool (const std::string &name, int num=-1) |
Interpret variable name as a bool. | |
int | get_int (const std::string &name, int num=-1) |
Interpret variable name as an integer. | |
double | get_double (const std::string &name, int num=-1) |
Interpret variable name as a double. | |
std::string | get_string (const std::string &name, int num=-1) |
Interpret variable name as a string. | |
vec | get_vec (const std::string &name, int num=-1) |
Interpret variable name as a vec. | |
ivec | get_ivec (const std::string &name, int num=-1) |
Interpret variable name as a ivec. | |
svec | get_svec (const std::string &name, int num=-1) |
Interpret variable name as a svec. | |
bvec | get_bvec (const std::string &name, int num=-1) |
Interpret variable name as a bvec. | |
mat | get_mat (const std::string &name, int num=-1) |
Interpret variable name as a mat. | |
imat | get_imat (const std::string &name, int num=-1) |
Interpret variable name as a imat. | |
smat | get_smat (const std::string &name, int num=-1) |
Interpret variable name as a smat. | |
bmat | get_bmat (const std::string &name, int num=-1) |
Interpret variable name as a bmat. |
Definition at line 105 of file parser.h.
|
Default Constructor.
Definition at line 45 of file parser.cpp. |
|
Constructor. Sets input file name.
Definition at line 50 of file parser.cpp. References init(). |
|
Constructor. Uses argc and argv (command line arguments).
Definition at line 56 of file parser.cpp. References init(). |
|
Constructor. Sets input file name and uses argc and argv (command line arguments).
Definition at line 62 of file parser.cpp. References init(). |
|
Constructor. Sets and Array of strings.
Definition at line 68 of file parser.cpp. References init(). |
|
Initialization function. Sets input file name.
Definition at line 254 of file parser.cpp. References it_assert, itpp::Array< T >::set_size(), and itpp::Array< T >::size(). Referenced by Parser(). |
|
Initialization function. Uses argc and argv (command line arguments).
Definition at line 271 of file parser.cpp. References itpp::Array< T >::set_size(). |
|
Initialization function. Sets input file name and uses argc and argv (command line arguments).
Definition at line 282 of file parser.cpp. References it_assert, itpp::Array< T >::set_size(), and itpp::Array< T >::size(). |
|
Initialization function. Sets and Array of strings.
Definition at line 306 of file parser.cpp. |
|
Sets silent mode if true, or verbose mode if false.
Definition at line 312 of file parser.cpp. |
|
Check is name exists in the file. Returns
Definition at line 317 of file parser.cpp. |
|
Get variable value if name can be found (and return true), otherwise keep old value (and return false).
|
|
Interpret variable name as a bool.
Definition at line 348 of file parser.cpp. References it_error. |
|
Interpret variable name as an integer.
Definition at line 358 of file parser.cpp. References it_error. |
|
Interpret variable name as a double.
Definition at line 368 of file parser.cpp. References it_error. |
|
Interpret variable name as a string.
Definition at line 378 of file parser.cpp. References it_error. |
|
Interpret variable name as a vec.
Definition at line 388 of file parser.cpp. References it_error. |
|
Interpret variable name as a ivec.
Definition at line 398 of file parser.cpp. References it_error. |
|
Interpret variable name as a svec.
Definition at line 408 of file parser.cpp. References it_error. |
|
Interpret variable name as a bvec.
Definition at line 418 of file parser.cpp. References it_error. |
|
Interpret variable name as a mat.
Definition at line 428 of file parser.cpp. References it_error. |
|
Interpret variable name as a imat.
Definition at line 438 of file parser.cpp. References it_error. |
|
Interpret variable name as a smat.
Definition at line 448 of file parser.cpp. References it_error. |
|
Interpret variable name as a bmat.
Definition at line 458 of file parser.cpp. References it_error. |
Generated on Fri Jan 11 08:51:41 2008 for IT++ by Doxygen 1.3.9.1