v0.2.48..v0.2.49 changeset ConflatableElementCriterion.h
Garret Voltz edited this page Oct 2, 2019
·
1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/criterion/ConflatableElementCriterion.h b/hoot-core/src/main/cpp/hoot/core/criterion/ConflatableElementCriterion.h
index 3008c53..4d612e7 100644
--- a/hoot-core/src/main/cpp/hoot/core/criterion/ConflatableElementCriterion.h
+++ b/hoot-core/src/main/cpp/hoot/core/criterion/ConflatableElementCriterion.h
@@ -28,7 +28,7 @@
#define CONFLATABLE_ELEMENT_CRITERION_H
// hoot
-#include <hoot/core/criterion/ElementCriterion.h>
+#include <hoot/core/criterion/GeometryTypeCriterion.h>
namespace hoot
{
@@ -38,23 +38,14 @@ namespace hoot
* feature type; e.g. BuildingCriterion. All ElementCriterion used for identifying conflatable
* features should inherit from this class
*/
-class ConflatableElementCriterion : public ElementCriterion
+class ConflatableElementCriterion : public GeometryTypeCriterion
{
public:
- enum ConflatableGeometryType
- {
- Point = 0,
- Line,
- Polygon
- };
-
static std::string className() { return "hoot::ConflatableElementCriterion"; }
virtual ~ConflatableElementCriterion() {}
- virtual ConflatableGeometryType getGeometryType() const = 0;
-
/**
* Determines which criteria consider an element as conflatable
*
@@ -64,8 +55,21 @@ public:
*/
static QStringList getConflatableCriteriaForElement(const ConstElementPtr& e);
+ /**
+ * Returns instantiations of conflatable criteria index by class name
+ *
+ * @return a conflatable criteria map
+ */
static QMap<QString, ElementCriterionPtr> getConflatableCriteria();
+ /**
+ * Returns all ConflatableElementCriterion class names for a given geometry type
+ *
+ * @param type geometry type
+ * @return a list of class names inheriting from ConflatableElementCriterion
+ */
+ static QStringList getCriterionClassNamesByType(const GeometryType& type);
+
private:
// criterion class names to criterion objects