v0.2.47..v0.2.48 changeset SetTagValueVisitor.h
Garret Voltz edited this page Sep 27, 2019
·
1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/visitors/SetTagValueVisitor.h b/hoot-core/src/main/cpp/hoot/core/visitors/SetTagValueVisitor.h
index 265e453..762a384 100644
--- a/hoot-core/src/main/cpp/hoot/core/visitors/SetTagValueVisitor.h
+++ b/hoot-core/src/main/cpp/hoot/core/visitors/SetTagValueVisitor.h
@@ -48,9 +48,14 @@ public:
static std::string className() { return "hoot::SetTagValueVisitor"; }
SetTagValueVisitor();
- SetTagValueVisitor(const QString& key, const QString& value, bool appendToExistingValue = false,
- const QString& criterionName = "", bool overwriteExistingTag = true,
- bool negateCriterion = false);
+ SetTagValueVisitor(
+ const QStringList& keys, const QStringList& values, bool appendToExistingValue = false,
+ const QString& criterionName = "", const bool overwriteExistingTag = true,
+ const bool negateCriterion = false);
+ SetTagValueVisitor(
+ const QString& key, const QString& value, bool appendToExistingValue = false,
+ const QString& criterionName = "", const bool overwriteExistingTag = true,
+ const bool negateCriterion = false);
virtual void addCriterion(const ElementCriterionPtr& e);
@@ -58,8 +63,9 @@ public:
virtual void visit(const std::shared_ptr<Element>& e);
- virtual QString getDescription() const
- { return "Adds or updates one or more tags with a specified key/value combination"; }
+ void setTag(const ElementPtr& e, const QString& k, const QString& v);
+
+ virtual QString getDescription() const { return "Adds or updates specific tags on elements"; }
void setNegateCriterion(bool negate) { _negateCriterion = negate; }
@@ -70,7 +76,7 @@ public:
private:
- QStringList _k, _v;
+ QStringList _keys, _vals;
//if true; will not overwrite existing keys and will append values to them
bool _appendToExistingValue;
//a customizable filter
@@ -80,7 +86,6 @@ private:
//This allows for negating the criterion as an option sent in from the command line.
bool _negateCriterion;
- void _setTag(const ElementPtr& e, const QString& k, const QString& v);
void _setCriterion(const QString& criterionName);
};