#include <param_map.h>
Public メソッド | |
ParamMap () | |
default constructor. create registrer | |
ParamMap (const std::string &option_name) | |
construct with option name string | |
~ParamMap () | |
destructor. nothing to do | |
const std::string & | optionName () const |
get the name of parameter space | |
const std::vector< ParamPtr > & | parameters () const |
get the container of all parameters | |
const std::map< std::string, ParamPtr > & | longNameMap () const |
get the long name parameter map | |
const std::map< std::string, ParamPtr > & | shortNameMap () const |
get the short name parameter map | |
ParamMap & | add (ParamMap ¶m_map) |
copy parameter map from argument | |
Registrar & | add () |
get a parameter registrar | |
Registrar & | add (ParamPtr param) |
add new parameter entry | |
void | remove (const std::string &long_name) |
remove registered parameter pointer | |
ParamPtr | findLongName (const std::string &long_name) |
get parameter entry that has the argument name | |
ParamPtr | findShortName (const std::string &short_name) |
get parameter entry that has the argument name | |
std::ostream & | printHelp (std::ostream &os, const bool with_default=true) const |
output parameter usage by command line option style | |
std::ostream & | printValues (std::ostream &os) const |
output parameter name and value | |
構成 | |
class | Registrar |
convinience class to simplify parameter registration |
rcsc::ParamMap::ParamMap | ( | const std::string & | option_name | ) | [inline, explicit] |
construct with option name string
option_name | option name string |
const std::string& rcsc::ParamMap::optionName | ( | ) | const [inline] |
get the name of parameter space
const std::vector< ParamPtr >& rcsc::ParamMap::parameters | ( | ) | const [inline] |
get the container of all parameters
const std::map< std::string, ParamPtr >& rcsc::ParamMap::longNameMap | ( | ) | const [inline] |
get the long name parameter map
const std::map< std::string, ParamPtr >& rcsc::ParamMap::shortNameMap | ( | ) | const [inline] |
get the short name parameter map
copy parameter map from argument
param_map | reference to the parameter map |
Registrar& rcsc::ParamMap::add | ( | ) | [inline] |
get a parameter registrar
ParamMap::Registrar & rcsc::ParamMap::add | ( | ParamPtr | param | ) |
add new parameter entry
param | shared pointer of parameter entry |
void rcsc::ParamMap::remove | ( | const std::string & | long_name | ) |
remove registered parameter pointer
long_name | parameter name string |
ParamPtr rcsc::ParamMap::findLongName | ( | const std::string & | long_name | ) |
get parameter entry that has the argument name
long_name | long version parameter name string |
ParamPtr rcsc::ParamMap::findShortName | ( | const std::string & | short_name | ) |
get parameter entry that has the argument name
short_name | set of the parameter name character |
std::ostream & rcsc::ParamMap::printHelp | ( | std::ostream & | os, | |
const bool | with_default = true | |||
) | const |
output parameter usage by command line option style
os | reference to output streamf | |
with_default | if true, default value is printed. |
std::ostream & rcsc::ParamMap::printValues | ( | std::ostream & | os | ) | const |
output parameter name and value
os | reference to output stream |