-
Notifications
You must be signed in to change notification settings - Fork 74
v0.2.55..v0.2.56 changeset ElementToRelationMap.cpp
Garret Voltz edited this page Aug 14, 2020
·
3 revisions
diff --git a/hoot-core/src/main/cpp/hoot/core/index/ElementToRelationMap.cpp b/hoot-core/src/main/cpp/hoot/core/index/ElementToRelationMap.cpp
index ab417ac..472797b 100644
--- a/hoot-core/src/main/cpp/hoot/core/index/ElementToRelationMap.cpp
+++ b/hoot-core/src/main/cpp/hoot/core/index/ElementToRelationMap.cpp
@@ -48,14 +48,12 @@ void ElementToRelationMap::addRelation(const OsmMap& map,
{
public:
- HashMap<ElementId, set<long>>& _mapping;
- long _rid;
-
AddMemberVisitor(HashMap<ElementId, set<long>>& mapping, long rid) : _mapping(mapping)
{
_rid = rid;
LOG_VART(_rid);
}
+ virtual ~AddMemberVisitor() = default;
virtual void visit(const ConstElementPtr& e)
{
@@ -70,6 +68,10 @@ void ElementToRelationMap::addRelation(const OsmMap& map,
virtual QString getDescription() const { return ""; }
virtual std::string getClassName() const { return ""; }
+
+ protected:
+ HashMap<ElementId, set<long>>& _mapping;
+ long _rid;
};
AddMemberVisitor filter(_mapping, r->getId());
@@ -108,13 +110,11 @@ void ElementToRelationMap::removeRelation(const OsmMap& map,
{
public:
- HashMap<ElementId, set<long>>& _mapping;
- long _rid;
-
RemoveMemberVisitor(HashMap<ElementId, set<long>>& mapping, long rid) : _mapping(mapping)
{
_rid = rid;
}
+ virtual ~RemoveMemberVisitor() = default;
virtual QString getDescription() const { return ""; }
virtual std::string getClassName() const { return ""; }
@@ -129,6 +129,11 @@ void ElementToRelationMap::removeRelation(const OsmMap& map,
_mapping.erase(ep);
}
}
+
+ private:
+
+ HashMap<ElementId, set<long>>& _mapping;
+ long _rid;
};
RemoveMemberVisitor filter(_mapping, r->getId());
@@ -147,6 +152,7 @@ bool ElementToRelationMap::validate(const OsmMap& map) const
{
_found = false;
}
+ virtual ~ContainsElementVisitor() = default;
virtual QString getDescription() const { return ""; }
virtual std::string getClassName() const { return ""; }
@@ -179,6 +185,7 @@ bool ElementToRelationMap::validate(const OsmMap& map) const
{
_good = true;
}
+ virtual ~CheckVisitor() = default;
virtual QString getDescription() const { return ""; }
virtual std::string getClassName() const { return ""; }