- Implemented ::getLimit.
This commit is contained in:
Paul Beckingham 2014-10-31 23:29:54 -04:00
parent 8863458879
commit fa890f9961
2 changed files with 13 additions and 0 deletions

View file

@ -475,6 +475,18 @@ std::string CLI::getCommand () const
return "";
}
////////////////////////////////////////////////////////////////////////////////
std::string CLI::getLimit () const
{
std::vector <A>::const_iterator a;
for (a = _args.begin (); a != _args.end (); ++a)
if (a->hasTag ("PSEUDO") &&
a->attribute ("canonical") == "limit")
return a->attribute ("value");
return "0";
}
////////////////////////////////////////////////////////////////////////////////
const std::string CLI::dump (const std::string& title /* = "CLI Parser" */) const
{

View file

@ -75,6 +75,7 @@ public:
const std::vector <std::string> getModifications ();
bool canonicalize (std::string&, const std::string&, const std::string&) const;
std::string getCommand () const;
std::string getLimit () const;
const std::string dump (const std::string& title = "CLI Parser") const;
private: