From 8bef5a90cdac47e0deaf4c45ad122046dce8f59f Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Wed, 10 Jun 2009 22:11:38 -0400 Subject: [PATCH] Enhancement - Context::constructFilter - After parsing the command line, a filter is now constructed. --- src/Context.cpp | 10 ++++++++++ src/Context.h | 1 + 2 files changed, 11 insertions(+) diff --git a/src/Context.cpp b/src/Context.cpp index dc29c5f28..a110b012e 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -435,6 +435,16 @@ std::cout << "# parse post-termination description '" << *arg << "'" << std::end if (validDescription (descCandidate)) task.set ("description", descCandidate); + + constructFilter (); +} + +//////////////////////////////////////////////////////////////////////////////// +// Add all the attributes in the task to the filter. +void Context::constructFilter () +{ + foreach (att, task) + filter.push_back (att->second); } //////////////////////////////////////////////////////////////////////////////// diff --git a/src/Context.h b/src/Context.h index 14422fcbc..fd34f5ab2 100644 --- a/src/Context.h +++ b/src/Context.h @@ -57,6 +57,7 @@ public: private: void loadCorrectConfigFile (); void parse (); + void constructFilter (); public: Config config;