Skip to content

v0.2.55..v0.2.56 changeset AddressTagKeys.h

Garret Voltz edited this page Aug 14, 2020 · 3 revisions
diff --git a/hoot-core/src/main/cpp/hoot/core/conflate/address/AddressTagKeys.h b/hoot-core/src/main/cpp/hoot/core/conflate/address/AddressTagKeys.h
index cd8c551..30c224f 100644
--- a/hoot-core/src/main/cpp/hoot/core/conflate/address/AddressTagKeys.h
+++ b/hoot-core/src/main/cpp/hoot/core/conflate/address/AddressTagKeys.h
@@ -42,13 +42,20 @@ class AddressTagKeys;
 typedef std::shared_ptr<AddressTagKeys> AddressTagKeysPtr;
 
 /**
- * Allows for mapping an address part type to a range of valid OSM tag keys (Singleton)
+ * Allows for mapping an address part type to a range of valid OSM tag keys
  */
 class AddressTagKeys
 {
 public:
 
-  static AddressTagKeys& getInstance();
+  static const QString HOUSE_NUMBER_TAG_NAME;
+  static const QString STREET_TAG_NAME;
+  static const QString CITY_TAG_NAME;
+  static const QString FULL_ADDRESS_TAG_NAME;
+  static const QString FULL_ADDRESS_TAG_NAME_2;
+  static const QString HOUSE_NAME_TAG_NAME;
+
+  AddressTagKeys();
 
   /**
    * Returns the tag keys of all address tags on an element
@@ -90,20 +97,10 @@ private:
 
   QString _getAddressTag(const Tags& tags, const QString& addressTagType, bool key) const;
 
-  friend class AddressScoreExtractorTest;
-
-  //extra tags to search for addresses in
+  // extra tags to search for addresses in
   QSet<QString> _additionalTagKeys;
-  //maps address tag types to valid address tag keys
-  QMultiMap<QString, QString> _addressTypeToTagKeys;
-
-  AddressTagKeys();
-  /**  Default destructor */
-  ~AddressTagKeys() = default;
-  /** Delete copy constructor and assignment operator */
-  AddressTagKeys(const AddressTagKeys&) = delete;
-  AddressTagKeys& operator=(const AddressTagKeys&) = delete;
-
+  // maps address tag types to valid address tag keys
+  static QMultiMap<QString, QString> _addressTypeToTagKeys;
 };
 
 }
Clone this wiki locally