CLI
- Relocated public methods to top. - Removed const for methods, which are no longer const.
This commit is contained in:
83
src/CLI.cpp
83
src/CLI.cpp
@@ -118,6 +118,51 @@ void CLI::add (const std::string& arg)
|
|||||||
dump ("CLI::add");
|
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 ()
|
void CLI::aliasExpansion ()
|
||||||
{
|
{
|
||||||
@@ -262,44 +307,6 @@ bool CLI::canonicalize (
|
|||||||
return false;
|
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
|
void CLI::dump (const std::string& label) const
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -39,9 +39,9 @@ public:
|
|||||||
void entity (const std::string&, const std::string&);
|
void entity (const std::string&, const std::string&);
|
||||||
void initialize (int, const char**);
|
void initialize (int, const char**);
|
||||||
void add (const std::string&);
|
void add (const std::string&);
|
||||||
const std::string getFilter () const;
|
const std::string getFilter ();
|
||||||
const std::vector <std::string> getWords () const;
|
const std::vector <std::string> getWords ();
|
||||||
const std::vector <std::string> getModifications () const;
|
const std::vector <std::string> getModifications ();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void aliasExpansion ();
|
void aliasExpansion ();
|
||||||
|
|||||||
Reference in New Issue
Block a user