Skip to content

v0.2.48..v0.2.49 changeset RemoveElementsVisitor.h

Garret Voltz edited this page Oct 2, 2019 · 1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/visitors/RemoveElementsVisitor.h b/hoot-core/src/main/cpp/hoot/core/visitors/RemoveElementsVisitor.h
index c37cfe1..968e54d 100644
--- a/hoot-core/src/main/cpp/hoot/core/visitors/RemoveElementsVisitor.h
+++ b/hoot-core/src/main/cpp/hoot/core/visitors/RemoveElementsVisitor.h
@@ -29,8 +29,7 @@
 
 // hoot
 #include <hoot/core/elements/OsmMapConsumer.h>
-#include <hoot/core/elements/ElementVisitor.h>
-#include <hoot/core/criterion/ElementCriterionConsumer.h>
+#include <hoot/core/visitors/MultipleCriterionConsumerVisitor.h>
 #include <hoot/core/util/Configurable.h>
 #include <hoot/core/info/OperationStatusInfo.h>
 #include <hoot/core/util/StringUtils.h>
@@ -41,8 +40,8 @@ namespace hoot
 /**
  * Removes any elements where that satisfy a criterion
  */
-class RemoveElementsVisitor : public ElementVisitor, public OsmMapConsumer,
-    public ElementCriterionConsumer, public Configurable, public OperationStatusInfo
+class RemoveElementsVisitor : public MultipleCriterionConsumerVisitor, public OsmMapConsumer,
+  public Configurable, public OperationStatusInfo
 {
 public:
 
@@ -50,8 +49,6 @@ public:
 
   RemoveElementsVisitor(bool negateCriteria = false);
 
-  virtual void addCriterion(const ElementCriterionPtr& crit);
-
   virtual void visit(const ElementPtr& e);
 
   virtual void setConfiguration(const Settings& conf);
@@ -60,7 +57,6 @@ public:
   virtual void setOsmMap(const OsmMap* /*map*/) { assert(false); }
 
   void setRecursive(bool recursive) { _recursive = recursive; }
-  void setChainCriteria(bool chain) { _chainCriteria = chain; }
 
   static void removeWays(const std::shared_ptr<OsmMap>& pMap, const ElementCriterionPtr& pCrit);
 
@@ -79,15 +75,9 @@ public:
 private:
 
   OsmMap* _map;
-  std::vector<ElementCriterionPtr> _criteria;
   bool _recursive;
   int _count;
-  //This allows for negating the criterion as an option sent in from the command line.
-  bool _negateCriteria;
-  bool _chainCriteria;
   long _startElementCount;
-
-  bool _criteriaSatisfied(const ConstElementPtr& e) const;
 };
 
 
Clone this wiki locally