diff --git a/src/CLI.cpp b/src/CLI.cpp index ea9a4715c..56237e0f0 100644 --- a/src/CLI.cpp +++ b/src/CLI.cpp @@ -475,6 +475,18 @@ std::string CLI::getCommand () const return ""; } +//////////////////////////////////////////////////////////////////////////////// +std::string CLI::getLimit () const +{ + std::vector ::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 { diff --git a/src/CLI.h b/src/CLI.h index 3c8a53a00..b02dddbf6 100644 --- a/src/CLI.h +++ b/src/CLI.h @@ -75,6 +75,7 @@ public: const std::vector 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: