-// returns false if query does not pass any filters on 'propertyName'
-// returns true if property unknown (i.e. nothing has been set for this property... so query is considered to pass filter)
-template<typename T>
-bool FilterEngine::check(const std::string& propertyName, const T& query) {
-
- // check enabled properties list
- // return true if no properties enabled at all OR if property is unknown to FilterEngine
- const std::vector<std::string> enabledProperties = enabledPropertyNames();
- if ( enabledProperties.empty() ) return true;
- const bool found = std::binary_search( enabledProperties.begin(), enabledProperties.end(), propertyName );
- if ( !found ) return true;
-
- // iterate over all filters in FilterEngine
- FilterMap::const_iterator filterIter = m_filters.begin();
- FilterMap::const_iterator filterEnd = m_filters.end();
- for ( ; filterIter != filterEnd; ++filterIter ) {
-
- // check query against this filter
- const PropertyFilter& filter = (*filterIter).second;
- if ( !filter.check(propertyName, query) ) return false;
-
-
-// // see if filter set has this property enabled
-// const PropertyFilter& filter = (*filterIter).second;
-// PropertyMap::const_iterator propIter = filter.Properties.find(propertyName);
-// if ( propIter != filter.Properties.end() ) {
-//
-// // if so, check query against filter, return false if check fails
-// const PropertyFilterValue& propertyFilter = (*propIter).second;
-// if ( !propertyFilter.check(query) ) return false;
-// }
+// sets user-specified rule string & signals update of rule-expression queue
+template<typename FilterChecker>
+inline void FilterEngine<FilterChecker>::setRule(const std::string& ruleString) {
+ if ( m_ruleString != ruleString) {
+ m_ruleString = ruleString;
+ buildRuleQueue();