mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
CLI
- Relocated public methods to top. - Removed const for methods, which are no longer const.
This commit is contained in:
parent
f353e1f3d5
commit
34fd7b4b04
2 changed files with 48 additions and 41 deletions
83
src/CLI.cpp
83
src/CLI.cpp
|
@ -118,6 +118,51 @@ void CLI::add (const std::string& arg)
|
|||
dump ("CLI::add");
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
const std::string CLI::getFilter ()
|
||||
{
|
||||
// Remove all the syntactic sugar.
|
||||
unsweetenTags ();
|
||||
|
||||
std::string filter = "";
|
||||
|
||||
if (_filter.size ())
|
||||
{
|
||||
filter = "(";
|
||||
|
||||
std::vector <std::string>::const_iterator i;
|
||||
for (i = _filter.begin (); i != _filter.end (); ++i)
|
||||
{
|
||||
if (i != _filter.begin ())
|
||||
filter += ' ';
|
||||
|
||||
filter += *i;
|
||||
}
|
||||
|
||||
filter += ')';
|
||||
}
|
||||
|
||||
return filter;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
const std::vector <std::string> CLI::getWords ()
|
||||
{
|
||||
std::vector <std::string> words;
|
||||
// TODO Processing here.
|
||||
return words;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
const std::vector <std::string> CLI::getModifications ()
|
||||
{
|
||||
// Remove all the syntactic sugar.
|
||||
|
||||
std::vector <std::string> modifications;
|
||||
// TODO Processing here.
|
||||
return modifications;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void CLI::aliasExpansion ()
|
||||
{
|
||||
|
@ -262,44 +307,6 @@ bool CLI::canonicalize (
|
|||
return false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
const std::string CLI::getFilter () const
|
||||
{
|
||||
std::string filter = "";
|
||||
|
||||
if (_filter.size ())
|
||||
{
|
||||
filter = "(";
|
||||
|
||||
std::vector <std::string>::const_iterator i;
|
||||
for (i = _filter.begin (); i != _filter.end (); ++i)
|
||||
{
|
||||
if (i != _filter.begin ())
|
||||
filter += ' ';
|
||||
|
||||
filter += *i;
|
||||
}
|
||||
|
||||
filter += ')';
|
||||
}
|
||||
|
||||
return filter;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
const std::vector <std::string> CLI::getWords () const
|
||||
{
|
||||
std::vector <std::string> words;
|
||||
return words;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
const std::vector <std::string> CLI::getModifications () const
|
||||
{
|
||||
std::vector <std::string> modifications;
|
||||
return modifications;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void CLI::dump (const std::string& label) const
|
||||
{
|
||||
|
|
|
@ -39,9 +39,9 @@ public:
|
|||
void entity (const std::string&, const std::string&);
|
||||
void initialize (int, const char**);
|
||||
void add (const std::string&);
|
||||
const std::string getFilter () const;
|
||||
const std::vector <std::string> getWords () const;
|
||||
const std::vector <std::string> getModifications () const;
|
||||
const std::string getFilter ();
|
||||
const std::vector <std::string> getWords ();
|
||||
const std::vector <std::string> getModifications ();
|
||||
|
||||
private:
|
||||
void aliasExpansion ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue