-
Notifications
You must be signed in to change notification settings - Fork 74
v0.2.53..v0.2.54 changeset OsmMapOperation.h
Garret Voltz edited this page Mar 31, 2020
·
1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/ops/OsmMapOperation.h b/hoot-core/src/main/cpp/hoot/core/ops/OsmMapOperation.h
index c05c9a2..433d3c6 100644
--- a/hoot-core/src/main/cpp/hoot/core/ops/OsmMapOperation.h
+++ b/hoot-core/src/main/cpp/hoot/core/ops/OsmMapOperation.h
@@ -22,7 +22,7 @@
* This will properly maintain the copyright information. DigitalGlobe
* copyrights will be updated automatically.
*
- * @copyright Copyright (C) 2015, 2017, 2018, 2019 DigitalGlobe (http://www.digitalglobe.com/)
+ * @copyright Copyright (C) 2015, 2017, 2018, 2019, 2020 DigitalGlobe (http://www.digitalglobe.com/)
*/
#ifndef OsmMapOperation_H
@@ -30,6 +30,8 @@
// Hoot
#include <hoot/core/info/ApiEntityInfo.h>
+#include <hoot/core/criterion/FilteredByCriteria.h>
+#include <hoot/core/info/OperationStatusInfo.h>
// Standard
#include <string>
@@ -37,7 +39,7 @@
// Boost
#include <boost/any.hpp>
-//Qt
+// Qt
#include <QString>
namespace hoot
@@ -51,8 +53,12 @@ class OsmMap;
* Due to needing an entire map, this does not support streaming I/O. If you do not need the
* entire input map in memory at one time (operation logic does not require it and you are not
* running in the conflate pipeline), consider using ElementVisitor instead.
+ *
+ * @todo We could eventually remove the default empty string implementations of OperationStatusInfo
+ * methods and require them to be implemented in children.
*/
-class OsmMapOperation : public ApiEntityInfo
+class OsmMapOperation : public ApiEntityInfo, public FilteredByCriteria,
+ public OperationStatusInfo
{
public:
@@ -75,7 +81,42 @@ public:
*/
virtual boost::any getResult() { boost::any ptr; return ptr; }
- long getNumAffected() const { return _numAffected; }
+ /**
+ * @see OperationStatusInfo
+ */
+ virtual long getNumFeaturesAffected() const { return _numAffected; }
+
+ /**
+ * @see OperationStatusInfo
+ */
+ virtual long getNumFeaturesProcessed() const { return _numProcessed; }
+
+ /**
+ * @see OperationStatusInfo
+ */
+ virtual QString getInitStatusMessage() const { return ""; }
+
+ /**
+ * @see OperationStatusInfo
+ */
+ virtual QString getCompletedStatusMessage() const { return ""; }
+
+ /**
+ * @see FilteredByCriteria
+ *
+ * An empty list returned here means that the operation is associated no specific criteria and
+ * can be run against any feature type. Any operations that want to control which feature types
+ * they are run against during conflation should populate this list. The list is treated in a
+ * logical OR fashion.
+ */
+ virtual QStringList getCriteria() const { return QStringList(); }
+
+ /**
+ * Returns the operation's class name
+ *
+ * @return class name string
+ */
+ virtual std::string getClassName() const = 0;
protected: