- Implemented ::getCommand.
This commit is contained in:
Paul Beckingham 2014-10-31 23:11:40 -04:00
parent 6324e3b63a
commit 6056ca4cd7
2 changed files with 12 additions and 0 deletions

View file

@ -464,6 +464,17 @@ bool CLI::canonicalize (
return false;
}
////////////////////////////////////////////////////////////////////////////////
std::string CLI::getCommand () const
{
std::vector <A>::const_iterator a;
for (a = _args.begin (); a != _args.end (); ++a)
if (a->hasTag ("CMD"))
return a->attribute ("canonical");
return "";
}
////////////////////////////////////////////////////////////////////////////////
const std::string CLI::dump (const std::string& title /* = "CLI Parser" */) const
{