summaryrefslogtreecommitdiff
path: root/src/mbgl/map/vector_tile.hpp
diff options
context:
space:
mode:
authorJustin R. Miller <incanus@codesorcery.net>2015-03-04 13:37:03 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-03-09 11:57:31 -0700
commit41c3b82d3e2a160cfa52d5d7c3e2e02eb81f32c0 (patch)
treea2404a7e7819911dfcbb7c4a928f111811d5288d /src/mbgl/map/vector_tile.hpp
parent831264d5305b5352b7e8d419d29750119a5a2cf9 (diff)
downloadqtlocation-mapboxgl-41c3b82d3e2a160cfa52d5d7c3e2e02eb81f32c0.tar.gz
refs #928: bookmarking working build of refactor
Diffstat (limited to 'src/mbgl/map/vector_tile.hpp')
-rw-r--r--src/mbgl/map/vector_tile.hpp48
1 files changed, 16 insertions, 32 deletions
diff --git a/src/mbgl/map/vector_tile.hpp b/src/mbgl/map/vector_tile.hpp
index bfa9e086ab..f83eebb1ed 100644
--- a/src/mbgl/map/vector_tile.hpp
+++ b/src/mbgl/map/vector_tile.hpp
@@ -2,6 +2,7 @@
#define MBGL_MAP_VECTOR_TILE
#include <mbgl/map/geometry_tile.hpp>
+#include <mbgl/geometry/pbf_geometry.hpp>
#include <mbgl/style/filter_expression.hpp>
#include <mbgl/util/pbf.hpp>
@@ -9,54 +10,37 @@ namespace mbgl {
class VectorTileLayer;
-class VectorTileFeature : public GeometryTileFeature<pbf> {
+class VectorTileFeature : public GeometryTileFeature {
public:
- VectorTileFeature(pbf, const VectorTileLayer&);
+ VectorTileFeature(pbf, const GeometryTileLayer&);
+
+ Geometry nextGeometry();
private:
- const pbf feature_pbf;
+ pbf geometry_pbf;
+ bool multigeometry = false;
};
-std::ostream& operator<<(std::ostream&, const GeometryTileFeature<pbf>&);
-
-class VectorTileTagExtractor : public GeometryTileTagExtractor<pbf> {
+class FilteredVectorTileLayer : public GeometryFilteredTileLayer {
public:
- VectorTileTagExtractor(const VectorTileLayer&);
+ FilteredVectorTileLayer(const VectorTileLayer&, const FilterExpression&);
- void setTags(const pbf&);
- mapbox::util::optional<Value> getValue(const std::string &key) const;
+ GeometryTileFeature nextMatchingFeature();
private:
- pbf tags_pbf;
-};
-
-class FilteredVectorTileLayer : public GeometryFilteredTileLayer<pbf> {
-public:
- class iterator : public GeometryFilteredTileLayer<pbf>::iterator {
- public:
- iterator(const FilteredVectorTileLayer&, const pbf&);
- void operator++();
- bool operator!=(const iterator& other) const;
- const pbf& operator*() const;
-
- private:
- pbf feature_pbf;
- pbf data_pbf;
- };
+ pbf feature_pbf;
-public:
- FilteredVectorTileLayer(const VectorTileLayer&, const FilterExpression&);
-
- iterator begin() const;
- iterator end() const;
};
class VectorTileLayer : public GeometryTileLayer {
+ friend class FilteredVectorTileLayer;
public:
VectorTileLayer(pbf);
-public:
- const pbf layer_pbf;
+ GeometryTileFeature nextFeature();
+
+private:
+ pbf feature_pbf;
};
class VectorTile : public GeometryTile {