summaryrefslogtreecommitdiff
path: root/src/mbgl/style/bucket_parameters.hpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-04-26 16:39:56 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-06-02 14:51:39 -0700
commitc902f9098b331302aaa1baac77d1575db624a132 (patch)
tree211901cd04454aedbac40c469198438e46d7038c /src/mbgl/style/bucket_parameters.hpp
parent18149cbcc27a926f280b08d8d0e09104b2147688 (diff)
downloadqtlocation-mapboxgl-c902f9098b331302aaa1baac77d1575db624a132.tar.gz
[core] Rationalize naming for style-related code
Diffstat (limited to 'src/mbgl/style/bucket_parameters.hpp')
-rw-r--r--src/mbgl/style/bucket_parameters.hpp65
1 files changed, 65 insertions, 0 deletions
diff --git a/src/mbgl/style/bucket_parameters.hpp b/src/mbgl/style/bucket_parameters.hpp
new file mode 100644
index 0000000000..f85e1e17ef
--- /dev/null
+++ b/src/mbgl/style/bucket_parameters.hpp
@@ -0,0 +1,65 @@
+#pragma once
+
+#include <mbgl/map/mode.hpp>
+#include <mbgl/tile/tile_id.hpp>
+#include <mbgl/style/filter.hpp>
+
+#include <functional>
+#include <atomic>
+
+namespace mbgl {
+
+class TileID;
+class GeometryTileLayer;
+class GeometryTileFeature;
+class SpriteStore;
+class GlyphAtlas;
+class GlyphStore;
+class CollisionTile;
+class FeatureIndex;
+
+namespace style {
+
+class BucketParameters {
+public:
+ BucketParameters(const OverscaledTileID& tileID_,
+ const GeometryTileLayer& layer_,
+ const std::atomic<bool>& obsolete_,
+ uintptr_t tileUID_,
+ bool& partialParse_,
+ SpriteStore& spriteStore_,
+ GlyphAtlas& glyphAtlas_,
+ GlyphStore& glyphStore_,
+ FeatureIndex& featureIndex_,
+ const MapMode mode_)
+ : tileID(tileID_),
+ layer(layer_),
+ obsolete(obsolete_),
+ tileUID(tileUID_),
+ partialParse(partialParse_),
+ spriteStore(spriteStore_),
+ glyphAtlas(glyphAtlas_),
+ glyphStore(glyphStore_),
+ featureIndex(featureIndex_),
+ mode(mode_) {}
+
+ bool cancelled() const {
+ return obsolete;
+ }
+
+ void eachFilteredFeature(const Filter&, std::function<void (const GeometryTileFeature&, std::size_t index, const std::string& layerName)>);
+
+ const OverscaledTileID& tileID;
+ const GeometryTileLayer& layer;
+ const std::atomic<bool>& obsolete;
+ uintptr_t tileUID;
+ bool& partialParse;
+ SpriteStore& spriteStore;
+ GlyphAtlas& glyphAtlas;
+ GlyphStore& glyphStore;
+ FeatureIndex& featureIndex;
+ const MapMode mode;
+};
+
+} // namespace style
+} // namespace mbgl