X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2Futils%2Fbamtools_filter_engine.h;h=cc9312081ab03d98c8b2644c9e12060a1fe41f51;hb=c5363861478f495b41a2ad99028326f85feeb905;hp=924b043119b7cd3b96e6826aa18371ca7cb5a28b;hpb=c66ba836246a1eada3557a5c8dcc9d3558ed093b;p=bamtools.git diff --git a/src/utils/bamtools_filter_engine.h b/src/utils/bamtools_filter_engine.h index 924b043..cc93120 100644 --- a/src/utils/bamtools_filter_engine.h +++ b/src/utils/bamtools_filter_engine.h @@ -3,7 +3,7 @@ // Marth Lab, Department of Biology, Boston College // All rights reserved. // --------------------------------------------------------------------------- -// Last modified: 21 September 2010 +// Last modified: 29 September 2010 // --------------------------------------------------------------------------- // Provides a generic filter engine based on filter-sets of properties, // with possible "rules" (compound logical expressions) to create more complex @@ -126,7 +126,7 @@ class FilterEngine { // token parsing (for property filter generation) public: template - bool parseToken(const std::string& token, T& value, PropertyFilterValue::ValueCompareType& type); + static bool parseToken(const std::string& token, T& value, PropertyFilterValue::ValueCompareType& type); // query evaluation public: @@ -377,10 +377,8 @@ bool FilterEngine::parseToken(const std::string& token, T& value, switch ( firstChar ) { case ( FilterEngine::NOT_CHAR ) : - strippedToken = token.substr(1); type = PropertyFilterValue::NOT; - break; case ( FilterEngine::GREATER_THAN_CHAR ) : @@ -435,7 +433,6 @@ bool FilterEngine::parseToken(const std::string& token, T& value, break; default : - // check for str* case (STARTS_WITH) if ( token.at( token.length() - 1 ) == FilterEngine::WILDCARD_CHAR ) { if ( token.length() == 2 ) return false;