Bridge++
Ver. 1.3.x
|
Parameter manager with YAML parser. More...
#include <parameterManager_YAML.h>
Public Member Functions | |
ParameterManager_YAML () | |
void | read_params (const std::string ¶ms_file, Parameters *params) |
read parameters from file. More... | |
void | read_params (const std::string ¶ms_file, unique_ptr< Parameters > ¶ms) |
read parameters from file. More... | |
void | read_params (std::istream &, Parameters *params) |
read parameters from input file stream. More... | |
![]() | |
ParameterManager () | |
virtual | ~ParameterManager () |
void | set_parameter_verboselevel (const Bridge::VerboseLevel vl) |
Static Public Attributes | |
static const std::string | class_name = "ParameterManager_YAML" |
![]() | |
static const std::string | class_name = "ParameterManager" |
Private Member Functions | |
int | set_key_and_value (std::string &keystr, std::string &valstr, std::string &line) |
extract key and value from a given line. More... | |
int | remove_space (std::string &) |
remove spaces from both side of a string. More... | |
void | convert_int_vector (std::vector< int > &vec, std::string &valstr) |
convert from string to int vector. More... | |
void | convert_double_vector (std::vector< double > &vec, std::string &valstr) |
convert from string to double vector. More... | |
Additional Inherited Members | |
![]() | |
static void | read (const std::string ¶ms_file, Parameters *params) |
static void | read (const std::string ¶ms_file, unique_ptr< Parameters > ¶ms) |
![]() | |
Bridge::VerboseLevel | m_vl |
Parameter manager with YAML parser.
This is a simple parser to read parameters from a file prepared with YAML format. Only simple cases were checked. [17 Jul 2012 H.Matsufuru]
Definition at line 30 of file parameterManager_YAML.h.
|
inline |
Definition at line 35 of file parameterManager_YAML.h.
|
private |
convert from string to double vector.
Definition at line 315 of file parameterManager_YAML.cpp.
|
private |
convert from string to int vector.
Definition at line 261 of file parameterManager_YAML.cpp.
|
virtual |
read parameters from file.
Implements ParameterManager.
Definition at line 28 of file parameterManager_YAML.cpp.
|
inlinevirtual |
read parameters from file.
Reimplemented from ParameterManager.
Definition at line 41 of file parameterManager_YAML.h.
void ParameterManager_YAML::read_params | ( | std::istream & | fin, |
Parameters * | params | ||
) |
read parameters from input file stream.
Definition at line 81 of file parameterManager_YAML.cpp.
|
private |
remove spaces from both side of a string.
Definition at line 241 of file parameterManager_YAML.cpp.
|
private |
extract key and value from a given line.
Definition at line 215 of file parameterManager_YAML.cpp.
|
static |
Definition at line 33 of file parameterManager_YAML.h.