Skip to content

v0.2.52..v0.2.53 changeset NonConflatableCriterion.h

Garret Voltz edited this page Feb 12, 2020 · 1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/criterion/NonConflatableCriterion.h b/hoot-core/src/main/cpp/hoot/core/criterion/NonConflatableCriterion.h
index 7e71490..6bd3cd7 100644
--- a/hoot-core/src/main/cpp/hoot/core/criterion/NonConflatableCriterion.h
+++ b/hoot-core/src/main/cpp/hoot/core/criterion/NonConflatableCriterion.h
@@ -22,13 +22,16 @@
  * This will properly maintain the copyright information. DigitalGlobe
  * copyrights will be updated automatically.
  *
- * @copyright Copyright (C) 2018, 2019 DigitalGlobe (http://www.digitalglobe.com/)
+ * @copyright Copyright (C) 2018, 2019, 2020 DigitalGlobe (http://www.digitalglobe.com/)
  */
 #ifndef NONCONFLATABLECRITERION_H
 #define NONCONFLATABLECRITERION_H
 
 // hoot
+#include <hoot/core/elements/OsmMap.h>
 #include <hoot/core/criterion/ElementCriterion.h>
+#include <hoot/core/elements/ConstOsmMapConsumer.h>
+#include <hoot/core/util/Configurable.h>
 
 // Qt
 #include <QList>
@@ -40,7 +43,8 @@ namespace hoot
  * A filter that will remove elements that aren't conflatable by Hootenanny. These are elements
  * for which we have no matchers defined.
  */
-class NonConflatableCriterion : public ElementCriterion
+class NonConflatableCriterion : public ElementCriterion, public ConstOsmMapConsumer,
+  public Configurable
 {
 
 public:
@@ -48,12 +52,15 @@ public:
   static std::string className() { return "hoot::NonConflatableCriterion"; }
 
   NonConflatableCriterion();
+  NonConflatableCriterion(ConstOsmMapPtr map);
 
   virtual bool isSatisfied(const ConstElementPtr& e) const override;
 
+  virtual void setConfiguration(const Settings& conf);
+
   virtual ElementCriterionPtr clone()
   {
-    return ElementCriterionPtr(new NonConflatableCriterion());
+    return ElementCriterionPtr(new NonConflatableCriterion(_map));
   }
 
   virtual QString getDescription() const { return "Identifies features that are not conflatable"; }
@@ -61,6 +68,13 @@ public:
   virtual QString toString() const override
   { return QString::fromStdString(className()).remove("hoot::"); }
 
+  virtual void setOsmMap(const OsmMap* map) { _map = map->shared_from_this(); }
+
+private:
+
+  ConstOsmMapPtr _map;
+
+  bool _ignoreChildren;
 };
 
 }
Clone this wiki locally