shortcut to get a param value
This commit is contained in:
parent
1c4cdae663
commit
ae919bc712
2 changed files with 10 additions and 0 deletions
|
|
@ -112,6 +112,12 @@ eoParser::eoParser ( unsigned _argc, char **_argv , string _programDescription,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
std::string eoParser::get( const std::string & name) const
|
||||||
|
{
|
||||||
|
return getParamWithLongName( name )->getValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
eoParam * eoParser::getParamWithLongName(const std::string& _name) const
|
eoParam * eoParser::getParamWithLongName(const std::string& _name) const
|
||||||
{
|
{
|
||||||
typedef std::multimap<std::string, eoParam*> MultiMapType;
|
typedef std::multimap<std::string, eoParam*> MultiMapType;
|
||||||
|
|
|
||||||
|
|
@ -156,6 +156,10 @@ public:
|
||||||
virtual bool isItThere(eoParam& _param) const
|
virtual bool isItThere(eoParam& _param) const
|
||||||
{ return getValue(_param).first; }
|
{ return getValue(_param).first; }
|
||||||
|
|
||||||
|
|
||||||
|
std::string get( const std::string & name) const;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get a handle on a param from its longName
|
* get a handle on a param from its longName
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Reference in a new issue