diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-12-04 18:29:42 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-12-04 20:02:50 +0100 |
commit | abafb52f37beb5659efc2105ccd1568e1f754898 (patch) | |
tree | 6a60636d3497560ca61e5aae5f6d7061c4f18553 /src/mbgl/map/tile_parser.hpp | |
parent | bff6aeb4da41dee1f5f1cfa0be81b6c257257253 (diff) | |
download | qtlocation-mapboxgl-abafb52f37beb5659efc2105ccd1568e1f754898.tar.gz |
make most headers private
Diffstat (limited to 'src/mbgl/map/tile_parser.hpp')
-rw-r--r-- | src/mbgl/map/tile_parser.hpp | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/src/mbgl/map/tile_parser.hpp b/src/mbgl/map/tile_parser.hpp new file mode 100644 index 0000000000..beae3af831 --- /dev/null +++ b/src/mbgl/map/tile_parser.hpp @@ -0,0 +1,77 @@ +#ifndef MBGL_MAP_TILE_PARSER +#define MBGL_MAP_TILE_PARSER + +#include <mbgl/map/vector_tile.hpp> +#include <mbgl/style/filter_expression.hpp> +#include <mbgl/text/glyph.hpp> +#include <mbgl/util/ptr.hpp> +#include <mbgl/util/noncopyable.hpp> +#include <cstdint> +#include <iosfwd> +#include <string> + +namespace mbgl { + +class Bucket; +class TexturePool; +class FontStack; +class GlyphAtlas; +class GlyphStore; +class SpriteAtlas; +class Sprite; +class Style; +class StyleBucket; +class StyleBucketFill; +class StyleBucketRaster; +class StyleBucketLine; +class StyleBucketSymbol; +class StyleLayerGroup; +class VectorTileData; +class Collision; +class TexturePool; + +class TileParser : private util::noncopyable +{ +public: + TileParser(const std::string &data, VectorTileData &tile, + const util::ptr<const Style> &style, + GlyphAtlas & glyphAtlas, + GlyphStore & glyphStore, + SpriteAtlas & spriteAtlas, + const util::ptr<Sprite> &sprite, + TexturePool& texturePool); + ~TileParser(); + +public: + void parse(); + +private: + bool obsolete() const; + void parseStyleLayers(util::ptr<StyleLayerGroup> group); + std::unique_ptr<Bucket> createBucket(util::ptr<StyleBucket> bucket_desc); + + std::unique_ptr<Bucket> createFillBucket(const VectorTileLayer& layer, const FilterExpression &filter, const StyleBucketFill &fill); + std::unique_ptr<Bucket> createRasterBucket(const StyleBucketRaster &raster); + std::unique_ptr<Bucket> createLineBucket(const VectorTileLayer& layer, const FilterExpression &filter, const StyleBucketLine &line); + std::unique_ptr<Bucket> createSymbolBucket(const VectorTileLayer& layer, const FilterExpression &filter, const StyleBucketSymbol &symbol); + + template <class Bucket> void addBucketGeometries(Bucket& bucket, const VectorTileLayer& layer, const FilterExpression &filter); + +private: + const VectorTile vector_data; + VectorTileData& tile; + + // Cross-thread shared data. + util::ptr<const Style> style; + GlyphAtlas & glyphAtlas; + GlyphStore & glyphStore; + SpriteAtlas & spriteAtlas; + util::ptr<Sprite> sprite; + TexturePool& texturePool; + + std::unique_ptr<Collision> collision; +}; + +} + +#endif |