CLI
- Implemented ::getLimit.
This commit is contained in:
12
src/CLI.cpp
12
src/CLI.cpp
@@ -475,6 +475,18 @@ std::string CLI::getCommand () const
|
|||||||
return "";
|
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
|
const std::string CLI::dump (const std::string& title /* = "CLI Parser" */) const
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ public:
|
|||||||
const std::vector <std::string> getModifications ();
|
const std::vector <std::string> getModifications ();
|
||||||
bool canonicalize (std::string&, const std::string&, const std::string&) const;
|
bool canonicalize (std::string&, const std::string&, const std::string&) const;
|
||||||
std::string getCommand () const;
|
std::string getCommand () const;
|
||||||
|
std::string getLimit () const;
|
||||||
const std::string dump (const std::string& title = "CLI Parser") const;
|
const std::string dump (const std::string& title = "CLI Parser") const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
Reference in New Issue
Block a user