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