summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-06-07 15:23:24 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-06-13 10:57:46 -0700
commit078392eda96e5232d7f4e9e486ee33782ed4487e (patch)
treed256149d32b2375f24d56a2df8f7b5f2a3bb8b12
parent0035eb0122445c1405ce67f0f21b96fb45749d90 (diff)
downloadqtlocation-mapboxgl-078392eda96e5232d7f4e9e486ee33782ed4487e.tar.gz
[core] Merge annotation_tile_data.{hpp,cpp} into annotation_tile.{hpp,cpp}
-rw-r--r--src/mbgl/annotation/annotation_manager.cpp1
-rw-r--r--src/mbgl/annotation/annotation_tile.cpp15
-rw-r--r--src/mbgl/annotation/annotation_tile.hpp20
-rw-r--r--src/mbgl/style/source.cpp2
-rw-r--r--src/mbgl/tile/annotation_tile_data.cpp21
-rw-r--r--src/mbgl/tile/annotation_tile_data.hpp26
6 files changed, 36 insertions, 49 deletions
diff --git a/src/mbgl/annotation/annotation_manager.cpp b/src/mbgl/annotation/annotation_manager.cpp
index f52cf860cf..5b87b41f61 100644
--- a/src/mbgl/annotation/annotation_manager.cpp
+++ b/src/mbgl/annotation/annotation_manager.cpp
@@ -5,7 +5,6 @@
#include <mbgl/annotation/fill_annotation_impl.hpp>
#include <mbgl/annotation/style_sourced_annotation_impl.hpp>
#include <mbgl/style/source.hpp>
-#include <mbgl/tile/annotation_tile_data.hpp>
#include <mbgl/style/style.hpp>
#include <mbgl/style/layers/symbol_layer.hpp>
#include <mbgl/style/layers/symbol_layer_impl.hpp>
diff --git a/src/mbgl/annotation/annotation_tile.cpp b/src/mbgl/annotation/annotation_tile.cpp
index dd2afca127..48415c4f34 100644
--- a/src/mbgl/annotation/annotation_tile.cpp
+++ b/src/mbgl/annotation/annotation_tile.cpp
@@ -2,11 +2,26 @@
#include <mbgl/annotation/annotation_manager.hpp>
#include <mbgl/util/constants.hpp>
#include <mbgl/storage/file_source.hpp>
+#include <mbgl/style/update_parameters.hpp>
#include <utility>
namespace mbgl {
+AnnotationTileData::AnnotationTileData(const OverscaledTileID& overscaledTileID,
+ std::string sourceID,
+ const style::UpdateParameters& parameters)
+ : GeometryTileData(overscaledTileID, sourceID, parameters.style, parameters.mode),
+ annotationManager(parameters.annotationManager) {
+ annotationManager.addTileData(*this);
+}
+
+AnnotationTileData::~AnnotationTileData() {
+ annotationManager.removeTileData(*this);
+}
+
+void AnnotationTileData::setNecessity(Necessity) {}
+
AnnotationTileFeature::AnnotationTileFeature(FeatureType type_, GeometryCollection geometries_,
std::unordered_map<std::string, std::string> properties_)
: type(type_),
diff --git a/src/mbgl/annotation/annotation_tile.hpp b/src/mbgl/annotation/annotation_tile.hpp
index 8e8d76286e..0046253665 100644
--- a/src/mbgl/annotation/annotation_tile.hpp
+++ b/src/mbgl/annotation/annotation_tile.hpp
@@ -1,9 +1,29 @@
#pragma once
#include <mbgl/tile/geometry_tile.hpp>
+#include <mbgl/tile/geometry_tile_data.hpp>
namespace mbgl {
+class AnnotationManager;
+
+namespace style {
+class UpdateParameters;
+}
+
+class AnnotationTileData : public GeometryTileData {
+public:
+ AnnotationTileData(const OverscaledTileID&,
+ std::string sourceID,
+ const style::UpdateParameters&);
+ ~AnnotationTileData();
+
+ void setNecessity(Necessity) final;
+
+private:
+ AnnotationManager& annotationManager;
+};
+
class AnnotationTileFeature : public GeometryTileFeature {
public:
AnnotationTileFeature(FeatureType, GeometryCollection,
diff --git a/src/mbgl/style/source.cpp b/src/mbgl/style/source.cpp
index ac5111aa94..ace4e25e3e 100644
--- a/src/mbgl/style/source.cpp
+++ b/src/mbgl/style/source.cpp
@@ -20,9 +20,9 @@
#include <mbgl/util/tile_cover.hpp>
#include <mbgl/tile/raster_tile_data.hpp>
-#include <mbgl/tile/annotation_tile_data.hpp>
#include <mbgl/tile/geojson_tile.hpp>
#include <mbgl/tile/vector_tile_data.hpp>
+#include <mbgl/annotation/annotation_tile.hpp>
#include <mbgl/style/parser.hpp>
#include <mbgl/gl/debugging.hpp>
diff --git a/src/mbgl/tile/annotation_tile_data.cpp b/src/mbgl/tile/annotation_tile_data.cpp
deleted file mode 100644
index c6fed3ff53..0000000000
--- a/src/mbgl/tile/annotation_tile_data.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-#include <mbgl/tile/annotation_tile_data.hpp>
-#include <mbgl/style/update_parameters.hpp>
-#include <mbgl/annotation/annotation_manager.hpp>
-
-namespace mbgl {
-
-AnnotationTileData::AnnotationTileData(const OverscaledTileID& overscaledTileID,
- std::string sourceID,
- const style::UpdateParameters& parameters)
- : GeometryTileData(overscaledTileID, sourceID, parameters.style, parameters.mode),
- annotationManager(parameters.annotationManager) {
- annotationManager.addTileData(*this);
-}
-
-AnnotationTileData::~AnnotationTileData() {
- annotationManager.removeTileData(*this);
-}
-
-void AnnotationTileData::setNecessity(Necessity) {}
-
-} // namespace mbgl
diff --git a/src/mbgl/tile/annotation_tile_data.hpp b/src/mbgl/tile/annotation_tile_data.hpp
deleted file mode 100644
index c999cba167..0000000000
--- a/src/mbgl/tile/annotation_tile_data.hpp
+++ /dev/null
@@ -1,26 +0,0 @@
-#pragma once
-
-#include <mbgl/tile/geometry_tile_data.hpp>
-
-namespace mbgl {
-
-class AnnotationManager;
-
-namespace style {
-class UpdateParameters;
-}
-
-class AnnotationTileData : public GeometryTileData {
-public:
- AnnotationTileData(const OverscaledTileID&,
- std::string sourceID,
- const style::UpdateParameters&);
- ~AnnotationTileData();
-
- void setNecessity(Necessity) final;
-
-private:
- AnnotationManager& annotationManager;
-};
-
-} // namespace mbgl