Skip to content

v0.2.54..v0.2.55 changeset Tags.h

Garret Voltz edited this page Aug 14, 2020 · 1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/elements/Tags.h b/hoot-core/src/main/cpp/hoot/core/elements/Tags.h
index da120cc..cbbc891 100644
--- a/hoot-core/src/main/cpp/hoot/core/elements/Tags.h
+++ b/hoot-core/src/main/cpp/hoot/core/elements/Tags.h
@@ -68,6 +68,7 @@ public:
 
   Tags();
   Tags(const QString& key, const QString& value);
+  Tags(const QString& kvp);
 
   void addNote(const QString& note);
 
@@ -210,6 +211,17 @@ public:
   bool dataOnlyEqual(const Tags& other) const;
 
   /**
+   * Determines if two sets of tags have the same information values
+   *
+   * This may have overlap with dataOnlyEqual, however the two have differences...worth looking
+   * into at some point.
+   *
+   * @param other tags to compare with
+   * @return true if both sets of tags have the same information values; false otherwise
+   */
+  bool hasSameNonMetadataTags(const Tags& other) const;
+
+  /**
    * Get a list of all non-'hoot::*' tags
    */
   QStringList getDataOnlyValues(const Tags& tags) const;
@@ -398,6 +410,24 @@ public:
    */
   static bool onlyOneContainsKvp(const Tags& tags1, const Tags& tags2, const QString& kvp);
 
+  /**
+   * Determines if two sets of tags contain non-metadata information
+   *
+   * @param tags1 first set of tags to examine
+   * @param tags2 second set of tags to examine
+   * @return true if both sets of tags contain non-metadata information; false otherwise
+   */
+  static bool bothHaveInformation(const Tags& tags1, const Tags& tags2);
+
+  /**
+   * Determines if one of two sets of tags contain non-metadata information
+   *
+   * @param tags1 first set of tags to examine
+   * @param tags2 second set of tags to examine
+   * @return true if exactly one of sets of tags contain non-metadata information; false otherwise
+   */
+  static bool onlyOneHasInformation(const Tags& tags1, const Tags& tags2);
+
 private:
 
   void _valueRegexParser(const QString& str, QString& num, QString& units) const;
Clone this wiki locally