From c4bb9fbc96a262cb2eea7aeb77706d75238d0eee Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 19 Oct 2014 23:17:49 -0400 Subject: [PATCH] CLI - Stubbed ::unsweetenIDs. --- src/CLI.cpp | 34 +++++++++++++++++++++++++++------- src/CLI.h | 1 + 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/src/CLI.cpp b/src/CLI.cpp index f4a7854e1..74324fee1 100644 --- a/src/CLI.cpp +++ b/src/CLI.cpp @@ -272,22 +272,23 @@ void CLI::analyze () } } + // Find argument types. aliasExpansion (); findOverrides (); categorize (); + + // Remove all the syntactic sugar. + unsweetenTags (); + unsweetenAttributes (); + unsweetenAttributeModifiers (); + unsweetenPatterns (); + unsweetenIDs (); } //////////////////////////////////////////////////////////////////////////////// // Extract all the FILTER-tagged items. const std::string CLI::getFilter () { - // Remove all the syntactic sugar. - unsweetenTags (); - unsweetenAttributes (); - unsweetenAttributeModifiers (); - unsweetenPatterns (); - // TODO all the other types: id, uuid ... - std::string filter = ""; if (_args.size ()) { @@ -847,6 +848,25 @@ void CLI::unsweetenPatterns () _args = reconstructed; } +//////////////////////////////////////////////////////////////////////////////// +void CLI::unsweetenIDs () +{ + std::vector reconstructed; + std::vector ::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 { diff --git a/src/CLI.h b/src/CLI.h index 99546668e..066809a5d 100644 --- a/src/CLI.h +++ b/src/CLI.h @@ -81,6 +81,7 @@ private: void unsweetenAttributes (); void unsweetenAttributeModifiers (); void unsweetenPatterns (); + void unsweetenIDs (); void dump (const std::string&) const; public: