]> git.donarmstrong.com Git - bamtools.git/blobdiff - src/utils/bamtools_filter_engine.h
Added length property to filter tool.
[bamtools.git] / src / utils / bamtools_filter_engine.h
index 9ea1e8d2138823cf22363a54f7ff6f0206d04721..9fb2f591fa3ee21c328989b23874563e6c96801d 100644 (file)
@@ -1,9 +1,8 @@
 // ***************************************************************************
 // bamtools_filter_engine.h (c) 2010 Derek Barnett, Erik Garrison
 // Marth Lab, Department of Biology, Boston College
-// All rights reserved.
 // ---------------------------------------------------------------------------
-// Last modified: 19 November 2010
+// Last modified: 3 May 2013
 // ---------------------------------------------------------------------------
 // Provides a generic filter engine based on filter-sets of properties,
 // with possible "rules" (compound logical expressions) to create more complex
 #ifndef BAMTOOLS_FILTER_ENGINE_H
 #define BAMTOOLS_FILTER_ENGINE_H
 
-#include <utils/bamtools_filter_properties.h>
-#include <utils/bamtools_filter_ruleparser.h>
-#include <utils/bamtools_utilities.h>
-#include <utils/utils_global.h>
+#include "utils/utils_global.h"
+#include "utils/bamtools_filter_properties.h"
+#include "utils/bamtools_filter_ruleparser.h"
+#include "utils/bamtools_utilities.h"
+
 #include <algorithm>
 #include <iostream>
 #include <map>
@@ -294,7 +294,6 @@ bool FilterEngine<FilterChecker>::evaluateFilterRules(const T& query) {
     
     std::stack<bool> resultStack;
     FilterMap::const_iterator filterIter;
-    FilterMap::const_iterator filterEnd  = m_filters.end();
     std::queue<std::string> ruleQueueCopy = m_ruleQueue;
     while ( !ruleQueueCopy.empty() ) {
         const std::string& token = ruleQueueCopy.front();
@@ -325,7 +324,7 @@ bool FilterEngine<FilterChecker>::evaluateFilterRules(const T& query) {
         else {
             // look up PropertyFilter that matches this token 
             filterIter = m_filters.find(token);
-            BAMTOOLS_ASSERT_MESSAGE( (filterIter != filterEnd), "Filter mentioned in rule, not found in FilterEngine" );
+            BAMTOOLS_ASSERT_MESSAGE( (filterIter != m_filters.end() ), "Filter mentioned in rule, not found in FilterEngine" );
             const PropertyFilter& filter = (*filterIter).second;
             bool result = m_checker.check(filter, query);
             resultStack.push( result );