CLI
- Stubbed ::unsweetenIDs.
This commit is contained in:
34
src/CLI.cpp
34
src/CLI.cpp
@@ -272,22 +272,23 @@ void CLI::analyze ()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Find argument types.
|
||||||
aliasExpansion ();
|
aliasExpansion ();
|
||||||
findOverrides ();
|
findOverrides ();
|
||||||
categorize ();
|
categorize ();
|
||||||
|
|
||||||
|
// Remove all the syntactic sugar.
|
||||||
|
unsweetenTags ();
|
||||||
|
unsweetenAttributes ();
|
||||||
|
unsweetenAttributeModifiers ();
|
||||||
|
unsweetenPatterns ();
|
||||||
|
unsweetenIDs ();
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Extract all the FILTER-tagged items.
|
// Extract all the FILTER-tagged items.
|
||||||
const std::string CLI::getFilter ()
|
const std::string CLI::getFilter ()
|
||||||
{
|
{
|
||||||
// Remove all the syntactic sugar.
|
|
||||||
unsweetenTags ();
|
|
||||||
unsweetenAttributes ();
|
|
||||||
unsweetenAttributeModifiers ();
|
|
||||||
unsweetenPatterns ();
|
|
||||||
// TODO all the other types: id, uuid ...
|
|
||||||
|
|
||||||
std::string filter = "";
|
std::string filter = "";
|
||||||
if (_args.size ())
|
if (_args.size ())
|
||||||
{
|
{
|
||||||
@@ -847,6 +848,25 @@ void CLI::unsweetenPatterns ()
|
|||||||
_args = reconstructed;
|
_args = reconstructed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
void CLI::unsweetenIDs ()
|
||||||
|
{
|
||||||
|
std::vector <A> reconstructed;
|
||||||
|
std::vector <A>::iterator a;
|
||||||
|
for (a = _args.begin (); a != _args.end (); ++a)
|
||||||
|
{
|
||||||
|
if (a->hasTag ("FILTER"))
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
reconstructed.push_back (*a);
|
||||||
|
}
|
||||||
|
|
||||||
|
_args = reconstructed;
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void CLI::dump (const std::string& label) const
|
void CLI::dump (const std::string& label) const
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ private:
|
|||||||
void unsweetenAttributes ();
|
void unsweetenAttributes ();
|
||||||
void unsweetenAttributeModifiers ();
|
void unsweetenAttributeModifiers ();
|
||||||
void unsweetenPatterns ();
|
void unsweetenPatterns ();
|
||||||
|
void unsweetenIDs ();
|
||||||
void dump (const std::string&) const;
|
void dump (const std::string&) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
Reference in New Issue
Block a user