Commit c11ed94cc7d6ee04b71124a94bb647ff5453ef65

Authored by bklare
1 parent 1d54a835

Update to filtermetadata

openbr/plugins/metadata/filtermetadata.cpp
@@ -23,10 +23,10 @@ namespace br @@ -23,10 +23,10 @@ namespace br
23 * \ingroup transforms 23 * \ingroup transforms
24 * \brief Filters templates such that the only remaining template wills have metadata values witihin the 24 * \brief Filters templates such that the only remaining template wills have metadata values witihin the
25 * the specified ranges. 25 * the specified ranges.
26 - * \br_property QString key1,key2 The meta-data key(s) to filter on  
27 - * \br_property float value1,value2 The values to compare the values of key1 and key2 entires against 26 + * \br_property QString key1 The meta-data key(s) to filter on
  27 + * \br_property float value1 The values to compare the values of key1 and key2 entires against
28 * \br_property QString compareType1 The comparison operation to perform. "le" -> val(key1) <= value1, "lt" -> val(key1) < value1, 28 * \br_property QString compareType1 The comparison operation to perform. "le" -> val(key1) <= value1, "lt" -> val(key1) < value1,
29 - * "ge" -> val(key1) >= value1, "gt" -> val(key1) > value1. 29 + * "ge" -> val(key1) >= value1, "gt" -> val(key1) > value1, "eq" -> val(key) == value1.
30 * \author Brendan Klare \cite bklare 30 * \author Brendan Klare \cite bklare
31 */ 31 */
32 class FilterMetadataTransform : public UntrainableMetaTransform 32 class FilterMetadataTransform : public UntrainableMetaTransform
@@ -50,6 +50,8 @@ class FilterMetadataTransform : public UntrainableMetaTransform @@ -50,6 +50,8 @@ class FilterMetadataTransform : public UntrainableMetaTransform
50 pass = val1 < val2; 50 pass = val1 < val2;
51 else if (compareType == "le") 51 else if (compareType == "le")
52 pass = val1 <= val2; 52 pass = val1 <= val2;
  53 + else if (compareType == "eq")
  54 + pass = val1 == val2;
53 else 55 else
54 qDebug() << "Unknown compare type: " << compareType; 56 qDebug() << "Unknown compare type: " << compareType;
55 return pass; 57 return pass;